How to modify the font size of the element using an attribute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to modify the font size of the element using an attribute.
Hi everybody!
Anyone knows how to modify the font size of the element using any its attribute?
Example:
In my DTD, I've this element:
<!ELEMENT para EMPTY>
<!ATTLIST para
font-size NUMBER #IMPLIED
>
How to use this attribute 'font-size' to set the font size?
This appear a easy case, but I haven't seen this function in Arbortext.
- Labels:
-
Content Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey again Robson,
This would be resolved similar to the example I provided for the field with only an X in it.
The functionality isn't in Editor itself, but in the Styler component.
You would create a new context, with an attribute check on the font-size field.
Of course, each context can only assign one specific font size, so you would need to have a context for each font size you expect users to input. So it might look similar to (replacing 'os' with 'font-size'):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Rafael,
Actually, I need that when I type the attribute on the xml, the font adjusts automatically, like works with the graphics (when I change the attribute of the height, it adjusts the height automatically).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for all!
I solved this case using the APP.
For this, I saw the interface style and changed the font's height. Like this:
style.height = arguments[0].attributes.font-size+'pt';
