Page 1 of 1

Highlight specific characters in OWA

Posted: Wed Jul 24, 2024 12:28 pm
by NicoAMP
Hello all,

I'd like to create a new feature for content proofreaders: highlight specific spaces used in textual content.

Let's take the case of non-breaking spaces.
If I use the   entity in my content, I can highlight it using the following CSS:

Code: Select all

oxy|entity[name='#160']
{
    background-color: blue !important;
}
But sometimes editors don't use the entity but the non-breaking space character directly.
In this case, CSS doesn't work.

Is there a way in Oxygen Web Author to highlight specific characters?

Thanks a lot for your help.

Regards,
Nicolas

Re: Highlight specific characters in OWA

Posted: Wed Jul 24, 2024 1:42 pm
by cosminef
Hello,

We have recorded an internal issue (WA-7665) regarding this aspect, it will be checked, and once it is resolved, you will be notified.

As a workaround, you can use this plugin [1] and add the following rule to the file web/static/style.css:

.oxy-document div[data-reference="true"][data-role="entity"][data-ent="#160"] {
background-color: green !important;
}


[1] https://github.com/oxygenxml/web-author ... i-with-css

Best,
Cosmin

Re: Highlight specific characters in OWA

Posted: Tue May 06, 2025 6:36 pm
by brian_smith
I tried installing this plugin and received messages about the plugin not being well-formed. It says various elements or entities must be followed by = or terminated by matching end-tags. I tried fixing these various attributes and entities but cannot find all of them. The last update was 4 years ago, so maybe it is just outdated?

Re: Highlight specific characters in OWA

Posted: Wed May 07, 2025 12:47 pm
by cosminef
Hello,

Thank you for reaching out.

Can you tell us which version of Web Author you're using and which browser you tried it with? We tried with the latest released version of Web Author, 27.1, and with the Chrome browser, and the plugin works: https://github.com/oxygenxml/web-author ... i-with-css

Also, did you follow the steps described in the README for installing [1] the plugin in Web Author?

Best,
Cosmin

[1] https://github.com/oxygenxml/web-author ... /README.md

Re: Highlight specific characters in OWA

Posted: Wed May 07, 2025 3:49 pm
by brian_smith
Hello,
I tried again and got it installed successfully. I am using Oxygen Web Author 27.1 with Ixia CCMS 7.5 and the most current MS Edge.
I tried adding the code in the post above to style.css but do not see evidence that it is working, even after restarting web services and the server.
image.png
image.png
image.png

Re: Highlight specific characters in OWA

Posted: Wed May 07, 2025 5:36 pm
by cosminef
Hello,

Try adding "!important" to your CSS rule to ensure it overrides other styles.

Code: Select all

.oxy-document div[data-reference="true"][data-role="entity"][data-ent="#160"] {
    background-color: green  !important;
}
Best,
Cosmin

Re: Highlight specific characters in OWA

Posted: Wed May 07, 2025 6:22 pm
by brian_smith
Thank you, that worked while in view mode. The highlights are not present when in editing mode. Is it possible to see the highlights in edit mode?

Re: Highlight specific characters in OWA

Posted: Fri May 09, 2025 3:16 pm
by cosminef
Hello,

Thank you for your reply.
We tried what we suggested you to try in edit mode, and it works. Can you help us with the steps to reproduce?

Best,