cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Insert symbols tool on the toolbar in editor

bfriesen
18-Opal

Insert symbols tool on the toolbar in editor

Is there a way to create a frequently used symbols tool to insert them from the toolbar instead of going to the insert symbols menu all the time?

 

Bryon 

4 REPLIES 4

Hi Bryon,

 
I answered a question like this awhile ago, but I can't find any record of it. I found the code example in my files though.
 
The example below uses ACL to add two icons to a tool bar. The first icon inserts a _font Touchup processing instruction with yellow highlighting; the second inserts a _font Touchup PI with red highlighting. I think you will need the ACL command insert_entity to insert the desired character entities.
 
1. Create a graphic with the desired icons appropriately sized. In the code below, the file is named ToolbarHighlight.bmp. It contains two icon images.
 
2. Find editwindow.xml in custom/lib/dialogs. If it does not exist, copy it from lib/dialogs to custom/lib/dialogs.
 
3. Add your version of the highlighted code below to the desired location in editwindow.xml:
 
<imagegroup>
...
<imagelist imagewidth="16" path="ToolbarHighlight.bmp">
<image id="imageHighlightYellow"/>
<image id="imageHighlightRed"/>
</imagelist>
...
</imagegroup>
4. Add your version of the highlighted code below to the desired location:
 
<toolbar>
...
<checkbox command='td _font -none;it _font; mt BackColor="#FFFF00"'
id="highlight_Yellow" image="imageHighlightYellow"
statustext="Yellow highlighting" tiptext="Yellow highlighting">
</checkbox>
<checkbox command='td _font -none;it _font; mt BackColor="#FF0000"'
id="highlight_Red" image="imageHighlightRed"
statustext="Red highlighting" tiptext="Red highlighting">
</checkbox>
...
</toolbar>
 

Good luck!

Suzanne Napoleon
"WYSIWYG is last-century technology!"

Hi Bryon--

 

Yes, there is a mechanism for this in Arbortext. In the editor window, on the Advanced toolbar, there's an Insert Symbol button, with an Omega symbol on it (ClayHelberg_1-1585084252718.png). It includes a droplist arrow. If you click on the arrow, a list will pop up, giving quick access to pre-defined and recently used symbols (characters and character entities).

 

To preconfigure this, you can use the "set entitylist" command in your editinit.acl file. See the Help Center for details on how to add values. Basically, it's a space-delimited string of values you want to include. For named character entities, just include the name of the entity (without the &). For non-entity characters, you can use the standard XML numeric entity representation (e.g. "A" -> &#x41;).

 

For example, if you use

set entitylist="alpha beta gamma delta lt amp"

you'll get a menu like this:

ClayHelberg_0-1585084114358.png

Note that the menu will only show the characters when the caret is in a location where text can be inserted. If the caret is in a location where text is not allowed, it will appear empty even if you've defined a list.

 

--Clay

Thanks for the guidance. I have created a new file symbols.acl and placed it in my editinit folder. I read the help file (https://support.ptc.com/help/arbortext/r8.0.0.0/en/#page/Program%2Facl_ref%2Fhelp1060.html) and I do not see any symbols show up. Am i missing some information in my acl file?

 

Bryon

Hi Bryon--

Make sure you:

  • Have an XML/SGML document open
  • Position the caret in a location where you can enter text, e.g. in a paragraph or title element. If the caret is in a location where text cannot be inserted, it will appear empty.
  • Have selected the Advanced toolbar for display (you may need to select View->Toolbars->Advanced to see this button)
  • Click the small arrow next to the Insert Symbol toolbar button

--Clay

Announcements

Top Tags