aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/views/default/input
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-05 12:13:27 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-05 12:13:27 +0000
commit7b8a354160b01ebc9c4ca56c728905f6149e7fe9 (patch)
tree9a209c4e095782be285375a636fddb93b056f8e5 /mod/tinymce/views/default/input
parent7dc0e1c44e15189687636ef8632c41aa58a2b1be (diff)
downloadelgg-7b8a354160b01ebc9c4ca56c728905f6149e7fe9.tar.gz
elgg-7b8a354160b01ebc9c4ca56c728905f6149e7fe9.tar.bz2
Updated tinymce to new interface
git-svn-id: http://code.elgg.org/elgg/trunk@5287 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/tinymce/views/default/input')
-rw-r--r--mod/tinymce/views/default/input/longtext.php29
1 files changed, 27 insertions, 2 deletions
diff --git a/mod/tinymce/views/default/input/longtext.php b/mod/tinymce/views/default/input/longtext.php
index e49c6190e..be6bceacd 100644
--- a/mod/tinymce/views/default/input/longtext.php
+++ b/mod/tinymce/views/default/input/longtext.php
@@ -32,15 +32,40 @@
tinyMCE.init({
mode : "textareas",
theme : "advanced",
+ plugins : "safari,spellchecker,autosave,fullscreen,preview,paste",
relative_urls : false,
- theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,bullist,numlist,undo,redo,link,unlink,image,blockquote,code",
+ theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,bullist,numlist,undo,redo,link,unlink,image,blockquote,code,pastetext,pasteword,more,fullscreen,",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
- extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
+ theme_advanced_path : true,
+ extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
+ setup : function(ed) {
+ // Add a custom button
+ //ed.addButton('more', {
+ // title : 'more',
+ // image : '<?php echo $vars['url']; ?>mod/tinymce/graphics/more.gif',
+ // onclick : function() {
+ // ed.selection.setContent('{{more}}');
+ // }
+ //});
+
+ //show the number of words
+ ed.onLoadContent.add(function(ed, o) {
+ var strip = (tinyMCE.activeEditor.getContent()).replace(/(&lt;([^&gt;]+)&gt;)/ig,"");
+ var text = " Word count:" + strip.split(' ').length;
+ tinymce.DOM.setHTML(tinymce.DOM.get(tinyMCE.activeEditor.id + '_path_row'), text);
+ });
+
+ ed.onKeyUp.add(function(ed, e) {
+ var strip = (tinyMCE.activeEditor.getContent()).replace(/(&lt;([^&gt;]+)&gt;)/ig,"");
+ var text = " Word count:" + strip.split(' ').length;
+ tinymce.DOM.setHTML(tinymce.DOM.get(tinyMCE.activeEditor.id + '_path_row'), text);
+ });
+ }
});
function toggleEditor(id) {
if (!tinyMCE.get(id))