handling of attributes

The code I inserted adds elementAttributes when the corresponding cssClassApplier is called (apply class) on a selection which already has a span and a class. So far, only the new class was added without considering the attribute.

Vice versa, the attribute has also to be removed when the corresponding cssClassApplier is called again (remove class).

I am defining attributes like this:

var conf = {
    normalize: false,
    applyToEditableOnly: true,
    elementAttributes: {
	myattr: -1
    }
};

var link = rangy.createCssClassApplier('myclass', conf);