CSS selector for  

Oxygen general issues.
honyk
Posts: 176
Joined: Wed Apr 29, 2009 4:55 pm

CSS selector for  

Post by honyk »

Hello,

is there any way in Oxygen to apply different css style to   than to other entities?

Jan
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: CSS selector for  

Post by sorin_ristache »

Hello,

No, that is not possible. In CSS you cannot specify a style for an entity or for an element with specific content. Even if an application implemented a custom CSS extension for that other CSS based rendering applications (like Web browsers) would not support that. If you want a special visual marker at the location of an   maybe you can insert a special XML element there?


Regards,
Sorin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: CSS selector for  

Post by sorin_ristache »

I am sorry, it is possible but you have to add your own implementation of ro.sync.ecss.extensions.api.StylesFilter to your document type in Preferences. You have to add your StylesFilter implementation on the Extensions tab of the dialog for editing the document type. You add it either in the extensions bundle class of that document type or in the CSS styles filter field of the Extensions tab.

In the StylesFilter.filter() implementation you find   by checking that the authorNode parameter is of type AuthorNode.NODE_TYPE_REFERENCE (which means it is an instance of AuthorReferenceNode) and that the method getReferenceType() of that AuthorReferenceNode node returns REFERENCE_TYPE_ENTITY. The name returned by AuthorNode.getName() must be the string "nbsp". You return from StylesFilter.filter() the CSS styles that you want to apply for  


Regards,
Sorin
Post Reply