[oXygen-sdk] plugin access to existing document types?
Oxygen XML Editor Support
support at oxygenxml.com
Fri Feb 22 01:58:46 CST 2013
Hi Rebecca,
Please see some answers below:
> 1) Is there a way in the APIs to determine what type Oxygen has detected
> an open file to be, e.g. if it is EAD, TEI, or something else?
Not directly but implementing a Workspace Access plugin type you can get
access to the WSEditor API for a certain opened URL.
Then you can use the API:
> ro.sync.exml.workspace.api.editor.WSEditorBase.createContentReader()
to read a little content from the editor and see the name of the root
element (create for example a SAX parser with a custom content handler
and break the parsing after the root element is encountered by throwing
a SAXParseException).
> 2) Is there a way for the plugin to add a CSS file to an existing document
> type definition? I'd like to add some custom styling for the elements and
> attributes that our plugin adds; I could just provide the CSS via URL and
> tell users how to add it in their preferences, but I was wondering if
> there was a better way to do something like that.
Out of curiosity, how does your plugin add new elements and attributes
to the existing frameworks?
We plan to add API which would allow you to set an additional CSS (or
CSS content) for styling a certain opened editor.
In Oxygen 14.2 we added a type of plugin extension called StylesFilter
plugin:
> http://www.oxygenxml.com/doc/ug-oxygen/#concepts/stylesfilter-plugin.html
Basically with such a plugin implementation, you receive callbacks in
the StylesFilter implementation to add additional styles to each
element. The styles need to be individually set the Java code so if you
need to add a lot of styles this could get cumbersome.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
On 2/22/2013 1:50 AM, Koeser, Rebecca Sutton wrote:
> Hi, all.
>
> I was wondering if there is a way for a plugin to interact with existing
> document types. I'm working on a plugin with functionality that will work
> in both EAD and TEI, and there are a couple of things I was wondering
> about.
>
> 1) Is there a way in the APIs to determine what type Oxygen has detected
> an open file to be, e.g. if it is EAD, TEI, or something else?
>
> 2) Is there a way for the plugin to add a CSS file to an existing document
> type definition? I'd like to add some custom styling for the elements and
> attributes that our plugin adds; I could just provide the CSS via URL and
> tell users how to add it in their preferences, but I was wondering if
> there was a better way to do something like that.
>
> Thanks in advance for any advice,
> Rebecca
>
>
> ________________________________
>
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
>
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>
More information about the oXygen-sdk
mailing list