
Originally Posted by
iRadiate
Thanks for the explanation Sarah, that is helpful.
One strange thing that may explain why I do not see the eraser (or any other items) ... when I insert an item into the ink overlay, it doesn't add the div tags like your screenshot shows. This is what I see:
2016-07-08_14-46-56.png
Sorry about that. My screenshot was misleading. I opened an existing Ink control, which already had all the HTML. The "Insert Item Attribute..." inserts the a5-item attribute. This attribute will need to be added to an HTML element, such as a <div>.
The Eraser tool in the default Ink Editor contains the following HTML:
Code:
<div a5-item="*eraser" class="inkButton inkButtonNoPad"><svg class="inkButtonEraser" style="width: 38px; height: 38px; stroke-width: 2px;"><path d="m 12,16 8,8 -3,2.5 -6.5,0 -4.5,-4.5 z" style="fill: none;" /><path d="m 20,8 8,8 -8,8 -8,-8 z" /><rect x="12" y="26" height="2" width="20" style="stroke: none;"/></svg></div>
The Eraser icon is defined by the <svg> tag. The <path> and <rect> tags are the actual SVG image.
The outer <div> contains the a5-item, "*eraser".
If you wanted, you could display text instead of the SVG image:
Code:
<div a5-item="*eraser">Eraser Tool</div>
Or an image:
Code:
<div a5-item="*eraser"><img src="/path/to/eraser.png"/></div>
If you look at the Overlay definition for the Ink Editor (found in Predefined Controls), you will notice that there is a mix of a5-items that start with * and a5-items that don't start with a *. The ones that start with a * are built-in Alpha Anywhere a5-items with specific behaviors that you can modify through other settings in the Ink's properties.
The ones with no * are defined on the "items" tab in the Overlay definition. You can define your own tools by creating an a5-item defined on the Items tab.
Near as I can tell, we have no way to also insert the HTML for tools. Not to say that this will never change. We're working on making the Ink Control easier to use/define.
Was this more helpful?
Bookmarks