How can we add custom highlights to the Author document content?
Not Persistent Highlights. Such highlights are removed when the document is closed and then re-opened.
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.getHighlighter()to obtain an AuthorHighlighter which allows you to add a highlight between certain offsets with a certain painter.
For example you can use this support to implement your custom spell checker.
Persistent Highlights. Such highlights are saved in the XML content as processing instructions.
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.getPersistentHighlighter()to obtain an AuthorPersistentHighlighter which allows you to add a persistent highlight between certain offsets and containing certain custom properties and render it with a certain painter.
For example you can use this support to implement your own way of adding review comments.