javascript - Find ckeditor instance -
I want to use and manipulate the contents of a Texter where the ckeditor is used to start using the editor Previously my original code was:
(function ($) {"use strict"; $ (document) .ready (function () {for (var i = 0; I & lt ; = 10; i ++) {$ ('# edit-button' + i) Click (function () {var tag = $ (this) .attr ("value"); var id = "edit-body -und -0-value "; / * Text of IDE * / var element = document.getElementById (id); var start = element.selectionStart; var end = element.selection end- var tex T = element.value; var prefix = text.substring (0, start); var selected = text.substring (start, end); var suffix = text. Substring (end); selected = "[" + + + "+ "+" + + + "+ + + +" + "+] +"; Element.value = Prefix + selected + suffix element; selection RT = start; Element.selectionEnd = start + selected.length ; The description is false;});}});} JQuery;
This is enabled when the editor is enabled.
I feel that I need to use a few different objects then the 'element' object, the ceciditer object, and then I can use the function described here:
But how do I get the Cecditer object?
The CDdator is added to the Doppl, so I know very little about it and I am very uncertain about how to use it or to know what information to see Please.
On this page:
$ ('textarea.editor') .ckeditor ();
is used to create an object (?) But I already have a ccditer example that I need to find. Can I select the editor for some given lessons? Using the Jquery adapter, you can get the ckeditor "object" in this way:
For, you want
$ ('$' ('textarea.editor').
This is using version 4.x of ckeditor.
Comments
Post a Comment