2. Stylesheet extension method

What is a stylesheet extension method?

A stylesheet extension method is any method having the following signature:

StyleValue method_name(StyleValue[] args, Node contextNode, 
                       ViewFactoryBase viewFactory)

A stylesheet extension method may be any static method or an instance method of a stylesheet extension class.

Where to declare a stylesheet extension method?

In the CSS stylesheet used to style the document being edited, using the proprietary invoke() pseudo-function in XMLmind XML Editor - Support of Cascading Style Sheets (W3C CSS). Example:

cc:before {
    content: invoke("localize", "cc") ":";
}

How to implement a stylesheet extension method?

No requirements other than having the above signature. See sample stylesheet extension method.