rich text editor - javascript: Google Closure - RichTextEditor plugin -
i making custom plugin rich texteditor sets span class selected text, like: <span class="myclass">text</span>
ok, pretend have following text:
this test. now after selecting test , clicking button trigger plugin output:
this <span class="myclass">test</span>. now after select whole text , click button again, output:
<span class="myclass">this <span class="myclass">test</span>.</span> any idea how fix this?
you use rangy library , class applier module.
var applier = rangy.createcssclassapplier("myclass"); applier.applytoselection();
Comments
Post a Comment