AddHighlight with style
Posted: Tue Dec 21, 2021 4:46 pm
Hi,
A Plugin has been developed which marks the content of the XML based on a terminology termbase and some rule.
Non-persistent highlighter has been used to mark the content. At first glance it worked pretty well, but after I tried several files I found that if the file reference any styles, the marking slightly shifted.
So this is the file without formatting: And this is the file with some formatting If the CSS file content is empty, I get the same results.
I simply use this code.
Can you help why this happens and how can I solve this?
Thank you in advance
Best regards,
Balazs
A Plugin has been developed which marks the content of the XML based on a terminology termbase and some rule.
Non-persistent highlighter has been used to mark the content. At first glance it worked pretty well, but after I tried several files I found that if the file reference any styles, the marking slightly shifted.
So this is the file without formatting: And this is the file with some formatting If the CSS file content is empty, I get the same results.
I simply use this code.
Code: Select all
AuthorHighlighter highlighter = authorPageAccess.getHighlighter();
ColorHighlightPainter painter = new ColorHighlightPainter(withColor, 20, 10);
highlighter.addHighlight(startOffset , startOffset + length, painter, null);
Thank you in advance
Best regards,
Balazs