[pLog-svn] r4403 - in plog/trunk/js/tinymce: . plugins/more
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Tue Dec 19 02:40:47 GMT 2006
Author: jondaley
Date: 2006-12-19 02:40:46 +0000 (Tue, 19 Dec 2006)
New Revision: 4403
Modified:
plog/trunk/js/tinymce/plugins/more/editor_plugin.js
plog/trunk/js/tinymce/tiny_mce-plog.js
Log:
merged changes 4381 through 4402 from the lifetype-1.1.3 branch. No changes on the 1.1.4 branch during this time, so next merge should start at 4403
Modified: plog/trunk/js/tinymce/plugins/more/editor_plugin.js
===================================================================
--- plog/trunk/js/tinymce/plugins/more/editor_plugin.js 2006-12-19 02:31:30 UTC (rev 4402)
+++ plog/trunk/js/tinymce/plugins/more/editor_plugin.js 2006-12-19 02:40:46 UTC (rev 4403)
@@ -5,7 +5,7 @@
getInfo : function() {
return {
longname : 'More',
- author : 'Jon Daley (based on the WordPress plugin)',
+ author : 'Jon Daley (based on the WordPress plugin with the same name)',
authorurl : 'http://jon.limedaley.com',
infourl : 'N/A',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
@@ -121,7 +121,7 @@
cleanup : function(type, content) {
switch (type) {
-
+ // move from html editor to wysiwyg editor
case "insert_to_editor":
var startPos = 0;
var altMore = tinyMCE.getLang('lang_more_more_alt');
@@ -129,7 +129,7 @@
// Parse all [@more@] tags and replace them with images
while ((startPos = content.indexOf('[@more@]', startPos)) != -1) {
// Insert image
- var contentAfter = content.substring(startPos + 11);
+ var contentAfter = content.substring(startPos + 8);
content = content.substring(0, startPos);
content += '<img src="' + (tinyMCE.getParam("theme_href") +
"/images/spacer.gif") + '" ';
@@ -140,14 +140,11 @@
startPos++;
}
-
- // It's supposed to be WYSIWYG, right?
- content = content.replace(new RegExp('&', 'g'), '&');
-
break;
+ // move from wysiwyg editor to html editor
case "get_from_editor":
- // Parse all img tags and replace them with [@more@]
+ // Parse all img tags and replace the "more" image with [@more@]
var startPos = -1;
while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
var endPos = content.indexOf('/>', startPos);
@@ -165,32 +162,6 @@
content = chunkBefore + embedHTML + chunkAfter;
}
}
-
- // If it says & in the WYSIWYG editor,
- // it should say & in the html.
- content = content.replace(new RegExp('&', 'g'), '&');
- content = content.replace(new RegExp('&nbsp;', 'g'), ' ');
-
- // Remove anonymous, empty paragraphs.
- content = content.replace(new RegExp('<p>(\\s| )*</p>', 'mg'), '');
-
- // Handle table badness.
- content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>');
- content = content.replace(new RegExp('<(tr|thead|tfoot)>.*?<((td|th)( [^>]*)?)>', 'mg'), '<$1><$2>');
- content = content.replace(new RegExp('</(td|th)>.*?<(td( [^>]*)?|th( [^>]*)?|/tr|/thead|/tfoot)>', 'mg'), '</$1><$2>');
- content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>');
- content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>');
-
- // Pretty it up for the source editor.
- var blocklist = 'blockquote|ul|ol|li|table|thead|tr|th|td|div|h\\d|pre|p';
- content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');
- content = content.replace(new RegExp('\\s*<(('+blocklist+')[^>]*)>\\s*', 'mg'), '\n<$1>');
- content = content.replace(new RegExp('<((li|/?tr|/?thead|/?tfoot)( [^>]*)?)>', 'g'), '\t<$1>');
- content = content.replace(new RegExp('<((td|th)( [^>]*)?)>', 'g'), '\t\t<$1>');
- content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'mg'), '<br />\n');
- content = content.replace(new RegExp('^\\s*', ''), '');
- content = content.replace(new RegExp('\\s*$', ''), '');
-
break;
}
Modified: plog/trunk/js/tinymce/tiny_mce-plog.js
===================================================================
--- plog/trunk/js/tinymce/tiny_mce-plog.js 2006-12-19 02:31:30 UTC (rev 4402)
+++ plog/trunk/js/tinymce/tiny_mce-plog.js 2006-12-19 02:40:46 UTC (rev 4403)
@@ -2,13 +2,13 @@
mode : "exact",
elements : "postText,postExtendedText",
theme : "advanced",
- plugins : "fullscreen,table,inlinepopups,insertdatetime,emotions,insertresource,insertvideo",
+ plugins : "fullscreen,table,inlinepopups,insertdatetime,emotions,insertresource,insertvideo,more",
relative_urls : false,
remove_script_host : false,
force_p_newlines : true,
cleanup_on_startup : true,
theme_advanced_buttons1 : "fontsizeselect,fontselect,forecolor,backcolor,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull",
- theme_advanced_buttons2 : "bullist,numlist,indent,outdent,separator,link,unlink,image,insertresource,insertvideo,emotions,separator,hr,insertdate,inserttime,separator,fullscreen,separator,code",
+ theme_advanced_buttons2 : "bullist,numlist,indent,outdent,separator,link,unlink,image,insertresource,insertvideo,emotions,separator,hr,insertdate,inserttime,separator,fullscreen,separator,code,more",
theme_advanced_buttons3 : "",
fullscreen_settings : {
theme_advanced_buttons3 : "tablecontrols"
More information about the pLog-svn
mailing list