aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/views
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-30 17:56:36 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-30 17:56:36 +0000
commit723644d298bcd212fb19bdfb8e471fcebcb2d814 (patch)
treea2e680d6eee6a6f2491b18f7847b2901e898b594 /mod/tinymce/views
parent7d48c5edcc0ee7106fc061d00e0a8678459a7ca5 (diff)
downloadelgg-723644d298bcd212fb19bdfb8e471fcebcb2d814.tar.gz
elgg-723644d298bcd212fb19bdfb8e471fcebcb2d814.tar.bz2
Embed's elggEmbedInsertContent() now supports multiple losely coupled views to handle custom insertion js. Plugin order no longer matters.
git-svn-id: http://code.elgg.org/elgg/trunk@6596 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/tinymce/views')
-rw-r--r--mod/tinymce/views/default/embed/addcontentjs.php4
-rw-r--r--mod/tinymce/views/default/tinymce/embed_custom_insert_js.php8
2 files changed, 8 insertions, 4 deletions
diff --git a/mod/tinymce/views/default/embed/addcontentjs.php b/mod/tinymce/views/default/embed/addcontentjs.php
deleted file mode 100644
index 90ff6a348..000000000
--- a/mod/tinymce/views/default/embed/addcontentjs.php
+++ /dev/null
@@ -1,4 +0,0 @@
-
- if(window.tinyMCE)
- window.tinyMCE.execCommand("mceInsertContent",true,content);
- \ No newline at end of file
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..84f98c405
--- /dev/null
+++ b/mod/tinymce/views/default/tinymce/embed_custom_insert_js.php
@@ -0,0 +1,8 @@
+ if (window.tinyMCE) {
+ var editor = window.tinyMCE.get(textAreaName);
+
+ if (editor) {
+ editor.execCommand("mceInsertContent", true, content);
+ }
+ }
+ \ No newline at end of file