Author mode CSS: any way to do this?
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 191
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Author mode CSS: any way to do this?
Post by martindholmes »
Hi all,
This may be an impossible goal, but it's worth asking:
I have documents which are tagged in stand-off mode, using anchor elements, like this:
where the first anchor marks the start of a range of text and the second marks the end of it. I would really like to be able to underline the text between the two anchors in a specific colour based on the @ana value of the first attribute. I've been looking at the oxy_xpath function and trying to imagine how I might do this, but I can't figure out a way. Can anyone suggest how this might be done? If it were possible, it would make Author mode a really fabulous tool for stand-off markup.
All help appreciated,
Martin
This may be an impossible goal, but it's worth asking:
I have documents which are tagged in stand-off mode, using anchor elements, like this:
Code: Select all
...This discussion covers <anchor next="#v2j_ht4_1hb" ana="e:institution" />institutional repositories<anchor xml:id="v2j_ht4_1hb"/> and library support....
All help appreciated,
Martin
-
- Posts: 9
- Joined: Sat Dec 31, 2016 10:05 pm
Re: Author mode CSS: any way to do this?
I found this answer which suggests it's not possible: https://stackoverflow.com/questions/716 ... een-2-tags, and which also suggests the more obvious use of your <anchor> elements to wrap the text. I'm assuming they may overlap though, so your kind of marker tags are required instead.
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Author mode CSS: any way to do this?
Hi Martin,
We have Java API to add non-persistent highlights to Oxygen's Author page:
https://www.oxygenxml.com/InstData/Edit ... hlighter--
Besides adding highlight ranges you also configure the painter which will take care of painting over each highlighted area.
For example this is an open source plugin (based on the Workspace Access plugin extension) which adds support for a custom spell checker in Oxygen:
https://github.com/danielnaber/oxygen-l ... ool-plugin
Regards,
Radu
We have Java API to add non-persistent highlights to Oxygen's Author page:
https://www.oxygenxml.com/InstData/Edit ... hlighter--
Besides adding highlight ranges you also configure the painter which will take care of painting over each highlighted area.
For example this is an open source plugin (based on the Workspace Access plugin extension) which adds support for a custom spell checker in Oxygen:
https://github.com/danielnaber/oxygen-l ... ool-plugin
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 191
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Author mode CSS: any way to do this?
Post by martindholmes »
Ah! I hadn't noticed that. I guess I should be able to use it with a caret listener to highlight ranges when the caret hits an anchor.
Thanks indeed,
Martin
Thanks indeed,
Martin
-
- Posts: 191
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Author mode CSS: any way to do this?
Post by martindholmes »
Looking at the AuthorCaretListener, I'm going to have to instantiate it when the editor is activated, of course. Is there any way to do this through a Document Type configuration in JavaScript, as I can do with regular Author actions, or will this have to be done through a plugin? It looks as though the extensions page of the Document Type configuration only allows Java classes.
Cheers,
Martin
Cheers,
Martin
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Author mode CSS: any way to do this?
Hi Martin,
Indeed the "Extensions" tab in the Document Type Association configuration dialog allows only Java extension classes to be added.
So you either need to implement a Java extension and add it in a JAR library referenced in the "Claspath" tab or from a plugin when an editor is opened and the current page is Author or when an editor page changes (and the current page is author) you would need to add the caret listener.
Regards,
Radu
Indeed the "Extensions" tab in the Document Type Association configuration dialog allows only Java extension classes to be added.
So you either need to implement a Java extension and add it in a JAR library referenced in the "Claspath" tab or from a plugin when an editor is opened and the current page is Author or when an editor page changes (and the current page is author) you would need to add the caret listener.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service