[oXygen-sdk] Form controls on (simple)table elements.
Alex Jitianu
alex_jitianu at sync.ro
Mon Apr 7 06:00:53 CDT 2014
Hello,
The table layout imposes a few restrictions. You must put the button
(actually any static content) on a BEFORE/AFTER pseudo element and also
very important, the "display" property for the element must be set to
"block":
@Override
public Styles filter(Styles styles, AuthorNode authorNode) {
if (authorNode.getType() == AuthorNode.NODE_TYPE_PSEUDO_ELEMENT
&&
PseudoElementInterface.BEFORE.equals(authorNode.getName())) {
AuthorElement realElement = (AuthorElement)
authorNode.getParent();
AttrValue attribute = realElement.getAttribute("class");
if (attribute.getValue().contains(" topic/simpletable ")) {
// The Before element of a simple table. It must be a block
if it is to be rendered.
styles.setProperty(Styles.KEY_DISPLAY, "block");
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(InplaceEditorCSSConstants.PROPERTY_TYPE,
InplaceEditorCSSConstants.TYPE_BUTTON);
properties.put(InplaceEditorCSSConstants.PROPERTY_ACTION_ID,
"insert.table");
StaticContent editorContent = new EditorContent(properties);
styles.setProperty(Styles.KEY_MIXED_CONTENT, new
StaticContent[] {editorContent});
}
}
return styles;
}
Best regards,
Alex
--
Alex Jitianu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
On 07-Apr-14 12:19 PM, Michael Anthony Smith wrote:
> We are writing a plugin based addon for oXygen that uses custom form
> controls to provide a set of alternatives for specified element, text,
> and attribute nodes. Here, a form control button is associated with
> each element or text node that has alternative versions, where as
> attribute change form control buttons are associated with their
> containing element.
>
> The initial testing of this form control approach is producing
> reasonable results, however when we associate a button with a DITA
> simpletable element no form control appears. I have looked to see if
> there is any documentation on the interaction between table elements
> and form controls, but found nothing that discusses this. Does anybody
> else have experience with associating custom form controls with table
> elements? Any insights welcome.
>
> Best regards,
> Anthony.
>
> PS: Note that due to a form-control/StyleFilter interaction issue with
> oXygen Editor 15.1 and 15.2, which will be fixed in the next release,
> we are currently developing our plugin using oXygen 15.0.
> *--*
> *Michael Anthony Smith*
> Senior Software Engineer
>
> *DeltaXML Ltd*/"Experts in information change"/
> *
> *
> *T*:+44 1684 532 140
> *E*:anthony.smith at deltaxml.com <mailto:anthony.smith at deltaxml.com>
> *W*:http://www.deltaxml.com <http://www.deltaxml.com/>
> Malvern Hills Science Park, Malvern, Worcs, WR14 3SZ, UK
> Registered in England 02528681 Reg. Office: Monsell House, WR8 0QN, UK
>
>
>
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20140407/225a592f/attachment.html>
More information about the oXygen-sdk
mailing list