aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/views/default/js/tinymce.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/tinymce/views/default/js/tinymce.php')
-rw-r--r--mod/tinymce/views/default/js/tinymce.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/tinymce/views/default/js/tinymce.php b/mod/tinymce/views/default/js/tinymce.php
index 51e99c223..344d71b14 100644
--- a/mod/tinymce/views/default/js/tinymce.php
+++ b/mod/tinymce/views/default/js/tinymce.php
@@ -39,7 +39,7 @@ elgg.tinymce.init = function() {
editor_selector : "elgg-input-longtext",
theme : "advanced",
language : "<?php echo tinymce_get_site_language(); ?>",
- plugins : "lists,spellchecker,autosave,fullscreen,paste",
+ plugins : "lists,spellchecker,autosave,fullscreen,paste,inlinepopups",
relative_urls : false,
remove_script_host : false,
document_base_url : elgg.config.wwwroot,
@@ -66,6 +66,18 @@ elgg.tinymce.init = function() {
var text = elgg.echo('tinymce:word_count') + strip.split(' ').length + ' ';
tinymce.DOM.setHTML(tinymce.DOM.get(tinyMCE.activeEditor.id + '_path_row'), text);
});
+
+ ed.onInit.add(function(ed) {
+ // prevent Firefox from dragging/dropping files into editor
+ if (tinymce.isGecko) {
+ tinymce.dom.Event.add(ed.getBody().parentNode, "drop", function(e) {
+ if (e.dataTransfer.files.length > 0) {
+ e.preventDefault();
+ }
+ });
+ }
+ });
+
},
content_css: elgg.config.wwwroot + 'mod/tinymce/css/elgg_tinymce.css'
});