I am trying to create a class application that will wrap the selection in the following element:
<code class="mainClass selector1 selector2">Selected Content</code>
I do the following:
var Applier = rangy.createClassApplier("mainClass", { elementTagName: "code", elementProperties: { className: [ "selector1", "selector2" ] } }); Applier.toggleSelection();
This gives the following:
<code class="mainClass selector1,selector2">Selected Content</code>
What is the syntax for creating an application so that it does what I'm trying to do?
source share