Changeset 5766
- Timestamp:
- Mar 15, 2008, 5:32:10 PM (15 years ago)
- Location:
- OpenPNE/branches/work/ebihara/prj_deco_diary/public_html/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/work/ebihara/prj_deco_diary/public_html/js/pne.js
r5765 r5766 30 30 theme_advanced_buttons2 : "", 31 31 theme_advanced_buttons3 : "", 32 valid_elements : "b,u,s,i,font[color|size]" 32 valid_elements : "b/strong,u,s/strike,i,font[color|size],p,br", 33 force_p_newlines : true, 34 force_br_newlines : true 33 35 }); 34 36 } -
OpenPNE/branches/work/ebihara/prj_deco_diary/public_html/js/tiny_mce/plugins/openpne/editor_plugin.js
r5765 r5766 12 12 // change the editor setting 13 13 ed.settings.inline_styles = false; 14 ed.settings.content_css = url + "/css/editor.css"; 14 15 15 16 // command … … 71 72 } 72 73 }); 73 ed.onChange.add(function(ed, l) { // for debug74 console.debug(l.content);75 });76 74 }, 77 75 … … 98 96 function rep(re, str) { 99 97 s = s.replace(re, str); 100 console.debug(RegExp.lastMatch, str);101 98 }; 102 99 103 console.debug("previewToText Before", s);104 100 rep(/<font size=\"2\">(.*?)<\/font>/gi,"<op:small>$1</op:small>"); 105 101 rep(/<font size=\"7\">(.*?)<\/font>/gi,"<op:large>$1</op:large>"); … … 111 107 rep(/<(b|u|s|i)>/gi,"<op:$1>"); 112 108 rep(/<\/(b|u|s|i)>/gi,"</op:$1>"); 113 rep(/<br \/>/gi,"\n");114 rep(/<br\/>/gi,"\n");115 rep(/<br>/gi,"\n");116 109 rep(/<p>/gi,""); 117 110 rep(/<\/p>/gi,"\n"); 111 rep(/<br\s?\/?>/gi,"\n"); 118 112 rep(/ /gi," "); 119 113 rep(/"/gi,"\""); … … 121 115 rep(/>/gi,">"); 122 116 rep(/&/gi,"&"); 123 console.debug("previewToText After", s); 117 124 118 return s; 125 119 }, … … 132 126 }; 133 127 134 console.debug("textToPreview Before", s);135 128 rep(/</gi,"<"); 136 129 rep(/>/gi,">"); 137 130 rep(/\n/gi,"<br />"); 138 131 rep(/<op:color:?(.*?)>(.*?)<\/op:color>/gi,"<font color=\"$1;\">$2</font>"); 139 rep(/<op:large>(.*?)<\/op:large>/gi,"<font size=\"7\">$1</ span>");140 rep(/<op:small>(.*?)<\/op:small>/gi,"<font size=\"2\">$1</ span>");132 rep(/<op:large>(.*?)<\/op:large>/gi,"<font size=\"7\">$1</font>"); 133 rep(/<op:small>(.*?)<\/op:small>/gi,"<font size=\"2\">$1</font>"); 141 134 rep(/<op:(b|u|s|i)>/gi,"<$1>"); 142 135 rep(/<\/op:(b|u|s|i)>/gi,"</$1>"); 143 console.debug("textToPreview After", s); 136 144 137 return s; 145 138 }
Note: See TracChangeset
for help on using the changeset viewer.