To create a new markup based on DefaultMarkup, the class de.knowwe.kdom.defaultMarkup.DefaultMarkupType needs to be extended. The following code snipplet shows a Hello-World extension of DefaultMarkup.
public class HelloWorldMarkup extends DefaultMarkupType {
private static final DefaultMarkup MARKUP;
static {
MARKUP = new DefaultMarkup("HelloWorld");
}
public HelloWorldMarkup() {
super(MARKUP);
}
}
The initialization of the DefaultMarkup object in the static block is required in that way to allow the plugin-framework to create a markup instance on start-up.
public class HelloWorldMarkup extends DefaultMarkupType {
public static final String IMAGE_KEY = "image";
private static final DefaultMarkup MARKUP;
static {
MARKUP = new DefaultMarkup("HelloWorld");
MARKUP.addAnnotation(Image_KEY, false);
}
public HelloWorldMarkup() {
super(MARKUP);
}
}