Page 1 of 1

CSS selector for  

Posted: Tue Aug 18, 2009 5:54 pm
by honyk
Hello,

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

Jan

Re: CSS selector for  

Posted: Wed Aug 19, 2009 10:42 am
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

Re: CSS selector for  

Posted: Wed Aug 19, 2009 11:18 am
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