mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 15:19:57 +09:00
Add a simple editor based on contenteditable
This commit is contained in:
parent
ece4ce90c2
commit
a2c763661c
5 changed files with 221 additions and 0 deletions
16
modules/editor/skins/simpleeditor/js/interface.js
Normal file
16
modules/editor/skins/simpleeditor/js/interface.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function _getSimpleEditorInstance(editor_sequence) {
|
||||
return jQuery('#simpleeditor_instance_' + editor_sequence);
|
||||
}
|
||||
|
||||
function editorGetContent(editor_sequence) {
|
||||
return _getSimpleEditorInstance(editor_sequence).html().escape();
|
||||
}
|
||||
|
||||
function editorReplaceHTML(iframe_obj, content) {
|
||||
var editor_sequence = parseInt(iframe_obj.id.replace(/^.*_/, ''), 10);
|
||||
_getSimpleEditorInstance(editor_sequence).html(content);
|
||||
}
|
||||
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
return _getSimpleEditorInstance(editor_sequence).get(0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue