* - style-like (no bias change, inherits inside)
* - link-like (bias away, with priority overriding containers).
* - spell-like (metadata, never inherits)
*/
AnnotationRegistry registry = root.createExtension();
registry.registerBehaviour(STYLE_KEY, new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT));
registry.registerBehaviour(LINK_KEY, new AnnotationBehaviour() {
public BiasDirection getBias(StringMap<Object> left, StringMap<Object> right,
CursorDirection cursor) {
assert left.containsKey(LINK_KEY) && right.containsKey(LINK_KEY);
return left.get(LINK_KEY) == null ? BiasDirection.LEFT : BiasDirection.RIGHT; // away