HTML Entity doesn't work in author mode
Post here questions and problems related to oXygen frameworks/document types.
  HTML Entity doesn't work in author mode
Hi,
I have a custom character map for the needs of my company unfortunately Non-breaking space (and hyphen) character doesn't work as intended.
With this code I have a Non-breaking space that works once published in pdf but it has no "non-breaking" influence in author mode.
With Unicode that works in pdf and in author mode but It's indistinguishable from any other space (indistinguishable in text mode as well). Sure, we can use the option in Preferences/Editor/"Show TAB/NBSP/EOL/EOF marks" but honestly you need to have good eyes to tell the difference between the two and it's a little overkill for just a rarely used (but important) character.
I would prefer to use HTML entities because you can select them in css with and add a colored background. Isn't there a way to make the "non-breaking" work in author mode?
I have a custom character map for the needs of my company unfortunately Non-breaking space (and hyphen) character doesn't work as intended.
Code: Select all
authorAccess.getDocumentController().insertXMLFragment(" ", caretOffset);
Code: Select all
authorAccess.getDocumentController().insertXMLFragment("\u00A0", caretOffset);
I would prefer to use HTML entities because you can select them in css with
Code: Select all
oxy|entity[name='nbsp']
Re:   HTML Entity doesn't work in author mode
Hi,
By this remark:
When the character is inserted as an entity reference, in our visual editor it's not really part of the text, we create a separate visual rendering node for it (this is why you can also change the color for it). But this means that Oxygen may also move the separate node on a different line. I'm afraid I do not have a workaround for this.
When it's inserted as a plain character, it becomes part of the entire text and we take care not to treat it as a regular space. Maybe to make it more visible you can use our non-persistent highlighter from an Oxygen plugin to add a highlight over it:
ro.sync.exml.workspace.api.editor.page. ... hlighter()
If you contact us via email (support@oxygenxml.com) we can give you some code to get you started, we built a similar example for someone who wanted to highlight soft hyphens.
Regards,
Radu
By this remark:
you mean that the line of text can still visually wrap at the boundaries of this character, right?but it has no "non-breaking" influence in author mode
When the character is inserted as an entity reference, in our visual editor it's not really part of the text, we create a separate visual rendering node for it (this is why you can also change the color for it). But this means that Oxygen may also move the separate node on a different line. I'm afraid I do not have a workaround for this.
When it's inserted as a plain character, it becomes part of the entire text and we take care not to treat it as a regular space. Maybe to make it more visible you can use our non-persistent highlighter from an Oxygen plugin to add a highlight over it:
ro.sync.exml.workspace.api.editor.page. ... hlighter()
If you contact us via email (support@oxygenxml.com) we can give you some code to get you started, we built a similar example for someone who wanted to highlight soft hyphens.
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)
- ↳ 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