aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/embed/js.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/embed/views/default/embed/js.php')
-rw-r--r--mod/embed/views/default/embed/js.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/embed/views/default/embed/js.php b/mod/embed/views/default/embed/js.php
index c98fe63da..c8fe3bc53 100644
--- a/mod/embed/views/default/embed/js.php
+++ b/mod/embed/views/default/embed/js.php
@@ -6,14 +6,27 @@
?>
function elggEmbedInsertContent(content, textAreaName) {
content = ' ' + content + ' ';
+
+ // default input.
+ // if this doesn't match anything it won't add anything.
+ $('textarea[name=' + textAreaName + ']').val($('textarea[name=' + textAreaName + ']').val() + ' ' + content);
+
<?php
// This view includes the guts of the function to do the inserting.
// Anything that overrides input/longtext with its own editor
// needs to supply its own function here that inserts
// content into textAreaName.
// See TinyMCE as an example.
+
+ // for compatibility
+ // the old on that was overriden.
echo elgg_view('embed/addcontentjs');
+
+ // the one you should extend.
+ echo elgg_view('embed/custom_insert_js');
?>
+
+
$.facebox.close();
}