Hello,
Using a custom form control appears to be a good solution. From
your other email I see that you've already started to investigate
this approach. A CSS selector is all you would need to control
when the form control is presented:
elem {
// Normal styles
}
elem[attr] {
content: oxy_editor(...)
}
We have some form controls samples in
{OxygenInstallDir}/samples/form-controls. Although their use is
not conditioned by an attribute value like you need you can easily
change the CSS selectors to implement this behavior (like
described above).
The steps required to create and use a custom form controls are:
- download the authorSDK [2]
- implement the custom form control by extending
ro.sync.ecss.extensions.api.editor.InplaceEditorRendererAdapter.
You can also take a look at
ro.sync.ecss.extensions.api.editor.AbstractInplaceEditor (it
offers some default implementations and some listeners management)
- pack the previous implementation in a JAR
- go to Oxygen and add the JAR inside the Classpath tab of the
framework [1]
- bind the form control in the CSS as described in [3].
[1]
http://www.oxygenxml.com/doc/ug-editor/index.html#topics/document-type-classpath-tab.html
[2]
http://oxygenxml.com/download_sdk.html?file=oxygenAuthorSDK.zip
[3]
http://www.oxygenxml.com/doc/ug-editor/index.html#topics/implementing-custom-form-controls.html
Best regards,
Alex
--
Alex Jitianu
<oXygen/> XML Editor, Schema Editor and XSLT
Editor/Debugger
http://www.oxygenxml.com
On 27-Feb-14 4:07 PM, Nathan wrote: