aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/views/default
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
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')
-rw-r--r--mod/tinymce/views/default/input/longtext.php29
-rw-r--r--mod/tinymce/views/default/tinymce/css.php56
2 files changed, 70 insertions, 15 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))
diff --git a/mod/tinymce/views/default/tinymce/css.php b/mod/tinymce/views/default/tinymce/css.php
index 121c24440..b524040e5 100644
--- a/mod/tinymce/views/default/tinymce/css.php
+++ b/mod/tinymce/views/default/tinymce/css.php
@@ -1,17 +1,47 @@
-blockquote {
- margin:10px;
- border:1px solid #efefef;
- padding:4px;
+#elgg_page_contents .mceButton {
+background-color: #e9e8e8;
+ border-color: #B2B2B2;
+ margin:4px;
+ padding:2px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
}
-
-strong {
- font-weight:bold;
+#elgg_page_contents a.mceButtonEnabled:hover,
+#elgg_page_contents a.mceButtonActive,
+#elgg_page_contents a.mceButtonSelected {
+ background-color: #d5d5d5;
+ border-color: #777 !important;
}
-
-ul {
- list-style: disc;
+#elgg_page_contents .mceFocus .mceTop .mceLeft {
+ background: #444444;
+ border-left: 1px solid #999;
+ border-top: 1px solid #999;
+ -moz-border-radius: 4px 0 0 0;
+ -webkit-border-top-left-radius: 4px;
+ -khtml-border-top-left-radius: 4px;
+ border-top-left-radius: 4px;
}
-
-ol {
- list-style: decimal;
+#elgg_page_contents .mceFocus .mceTop .mceRight {
+ background: #444444;
+ border-right: 1px solid #999;
+ border-top: 1px solid #999;
+ border-top-right-radius: 4px;
+ -khtml-border-top-right-radius: 4px;
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius: 0 4px 0 0;
+}
+#elgg_page_contents .mceLayout{
+border: 1px solid #CCC;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+}
+#elgg_page_contents table.mceLayout tr.mceFirst td {border-top:0px solid #CCC}
+#elgg_page_contents table.mceLayout tr.mceLast td {border-bottom:0px solid #CCC}
+#elgg_page_contents #blogbody_toolbar1{}
+#elgg_page_contents .mceToolbar{}
+#elgg_page_contents #blogbody_ifr{height:400px !important;} /* blogs */
+#pagesForm #description_ifr {height:400px !important;} /* pages */
+#elgg_page_contents .mceIframeContainer{}
+.wp_themeSkin .mceButtonDisabled {
+ border-color: #ccc !important;
} \ No newline at end of file