diff options
Diffstat (limited to 'mod/tinymce/views/default/tinymce/embed_custom_insert_js.php')
-rw-r--r-- | mod/tinymce/views/default/tinymce/embed_custom_insert_js.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php b/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php new file mode 100644 index 000000000..a861a4035 --- /dev/null +++ b/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php @@ -0,0 +1,14 @@ + if (window.tinyMCE) { + var editor = window.tinyMCE.get(textAreaId); + + if (editor) { + + // work around for IE/TinyMCE bug where TinyMCE loses insert carot + if ($.browser.msie) { + editor.focus(); + editor.selection.moveToBookmark(elgg.tinymce.bookmark); + } + + editor.execCommand("mceInsertContent", true, content); + } + } |