rangy
rangy copied to clipboard
Generalize the Class Applier to Tag Applier
I find the Class Applier module very useful, but there is a problem: it cannot be used to wrap the selection with plain old simple tags, without any class. This makes sense, given that the module is called Class Applier, but I think the module would be even more useful if it were generalized to a Tag Applier that can wrap the selection with arbitrary tags, and only optionally add a class to those tags.
You can do that using the surroundContents method!