API
- getSelectText()
-
Get highlighted text.
$("#editor").getSelectText() - bbcode([bbcode])
-
Get/set BBcode text in editor.
$("#editor").bbcode(); //Get BBcode text $("#editor").bbcode(bbdata); //Set BBcode text - htmlcode([htmlcode])
-
Get/replace HTML content.
$("#editor").htmlcode(); //Get HTML content $("#editor").htmlcode(htmlcode); //Set HTML content - getHTMLByCommand(command,params)
-
Get an outcome of the execution of the command in the HTML. Where command - the command name, params - object variable
$("#editor").getHTMLByCommand("code",{seltext:"This is a program code"}); - getBBCodeByCommand(command,params)
-
Get an outcome of the execution of commands in BBcode text. Where command - the command name, params - object variable
$("#editor").getBBCodeByCommand("code",{seltext:"This is a program code"}); - insertAtCursor(data)
-
Insert text into the editor. Where data - insert text
$("#editor").getBBCodeByCommand(data); - execCommand(command,value)
-
Execute the command. Where command - the command name, value - value
$("#editor").execCommand("bold"); - sync()
-
Synchronize data between editor and textarea
$("#editor").sync();