highlighting/underlining in text mode?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Tue May 27, 2014 10:00 am
highlighting/underlining in text mode?
Hi,
I can get a highlighter in author mode like this:
Is there anything like that for text mode? It seems to exist, as this is what the spell checker does, but I could not find it in the API.
Thanks,
Daniel
I can get a highlighter in author mode like this:
Code: Select all
authorAccess.getEditorAccess().getHighlighter()
Thanks,
Daniel
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: highlighting/underlining in text mode?
Hi Daniel,
How exactly did you start using our API for the customization?
Did you implement a Workspace Access Plugin using our Plugins SDK?
http://www.oxygenxml.com/oxygen_sdk.htm ... ne_plugins
A Workspace Access Plugin allows you to see what editor is current selected (ro.sync.exml.workspace.api.editor.WSEditor API) and to see what editor mode (Text, Grid or Author) is currently selected using ro.sync.exml.workspace.api.editor.WSEditor.getCurrentPage().
Then this page can either be an instance of ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPage for the Author editing mode or ro.sync.exml.workspace.api.editor.page.text.xml.WSXMLTextEditorPage for the Text editing mode.
The Text and Author editing modes have totally different internal models. The Text editing mode is based on a regular Java Swing javax.swing.JTextArea and can be obtained using the API ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent() and then use the regular Swing API for adding highlights:
Maybe this similar topic would also help:
http://www.oxygenxml.com/forum/topic10519.html
Regards,
Radu
How exactly did you start using our API for the customization?
Did you implement a Workspace Access Plugin using our Plugins SDK?
http://www.oxygenxml.com/oxygen_sdk.htm ... ne_plugins
A Workspace Access Plugin allows you to see what editor is current selected (ro.sync.exml.workspace.api.editor.WSEditor API) and to see what editor mode (Text, Grid or Author) is currently selected using ro.sync.exml.workspace.api.editor.WSEditor.getCurrentPage().
Then this page can either be an instance of ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPage for the Author editing mode or ro.sync.exml.workspace.api.editor.page.text.xml.WSXMLTextEditorPage for the Text editing mode.
The Text and Author editing modes have totally different internal models. The Text editing mode is based on a regular Java Swing javax.swing.JTextArea and can be obtained using the API ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent() and then use the regular Swing API for adding highlights:
Code: Select all
WSTextEditorPage currentPage = (WSTextEditorPage)editor.getCurrentPage();
Object textComponent = currentPage.getTextComponent();
if (textComponent instanceof JTextArea) {
JTextArea textArea = (JTextArea) textComponent;
Highlighter highlighther = textArea.getHighlighter();
highlighther.addHighlight(p0, p1, p)
}
http://www.oxygenxml.com/forum/topic10519.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: highlighting/underlining in text mode?
By the way, a plugin for Oxygen can be bundled as an add-on and then installed over the web from an Oxygen installation:
http://www.oxygenxml.com/addons.html
Regards,
Radu
http://www.oxygenxml.com/addons.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 10
- Joined: Tue May 27, 2014 10:00 am
Re: highlighting/underlining in text mode?
Thanks, that does the trick.Radu wrote:The Text editing mode is based on a regular Java Swing javax.swing.JTextArea and can be obtained using the API ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent() and then use the regular Swing API for adding highlights:
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