Loading...
Loading...
Main editor methods (editor.method())
编辑器实例包含核心($),它是驱动所有子系统的内部引擎。可以通过 editor.$ 访问它,例如 editor.$.store、editor.$.selection、editor.$.format 等。
editor.isEmptyfcoptionalFrame context, if not present, currently selected frame context.
booleanplaceholder.resetOptionsnewOptionsOptions
voidAdd or reset option property (Editor is reloaded)
// Change toolbar buttons and height
editor.resetOptions({
buttonList: [['bold', 'italic'], ['image']],
height: '500px',
});changeFrameContextrootKeyRoot frame key.
voidChange the current root index.
// Switch to the 'body' frame in a multi-root editor
editor.changeFrameContext('body');
// Switch back to the 'header' frame
editor.changeFrameContext('header');destroyanyDestroy the suneditor