mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Ability to replace entire content in HTMLEditorField JS API
This commit is contained in:
parent
3c0bd405a1
commit
b15b5cd115
@ -106,6 +106,15 @@
|
|||||||
selectNode: function(node) {
|
selectNode: function(node) {
|
||||||
this.getInstance().selection.select(node);
|
this.getInstance().selection.select(node);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Replace entire content
|
||||||
|
*
|
||||||
|
* @param String HTML
|
||||||
|
* @param Object opts
|
||||||
|
*/
|
||||||
|
setContent: function(html, opts) {
|
||||||
|
this.getInstance().execCommand('mceSetContent', false, html, opts);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Insert content at the current caret position
|
* Insert content at the current caret position
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user