From a6292dd0fecd4482fe863ed849d126b5281b1a8a Mon Sep 17 00:00:00 2001 From: hukl Date: Wed, 9 Sep 2009 12:07:57 +0200 Subject: huge tiny_mce update - now using the tiny_mce jquery build which allows tiny_mce to be initialized via jquery - great! --- .../tiny_mce/plugins/fullpage/css/fullpage.css | 0 .../tiny_mce/plugins/fullpage/editor_plugin.js | 2 +- .../tiny_mce/plugins/fullpage/editor_plugin_src.js | 8 ++++++-- .../tiny_mce/plugins/fullpage/fullpage.htm | 19 +++++++++---------- .../tiny_mce/plugins/fullpage/js/fullpage.js | 2 +- .../tiny_mce/plugins/fullpage/langs/en_dlg.js | 0 6 files changed, 17 insertions(+), 14 deletions(-) mode change 100755 => 100644 public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css mode change 100755 => 100644 public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js mode change 100755 => 100644 public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js mode change 100755 => 100644 public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm mode change 100755 => 100644 public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js mode change 100755 => 100644 public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js (limited to 'public/javascripts/tiny_mce/plugins/fullpage') diff --git a/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css b/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css old mode 100755 new mode 100644 diff --git a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js old mode 100755 new mode 100644 index 727beb5..8e11bfc --- a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.FullPagePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceFullPageProperties',function(){ed.windowManager.open({file:url+'/fullpage.htm',width:430+parseInt(ed.getLang('fullpage.delta_width',0)),height:495+parseInt(ed.getLang('fullpage.delta_height',0)),inline:1},{plugin_url:url,head_html:t.head});});ed.addButton('fullpage',{title:'fullpage.desc',cmd:'mceFullPageProperties'});ed.onBeforeSetContent.add(t._setContent,t);ed.onSetContent.add(t._setBodyAttribs,t);ed.onGetContent.add(t._getContent,t);},getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_setBodyAttribs:function(ed,o){var bdattr,i,len,kv,k,v,t,attr=this.head.match(/body(.*?)>/i);if(attr&&attr[1]){bdattr=attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(bdattr){for(i=0,len=bdattr.length;i',sp);t.head=c.substring(0,sp+1);ep=c.indexOf('\n';t.head+=ed.getParam('fullpage_default_doctype','');t.head+='\n\n\n'+ed.getParam('fullpage_default_title','Untitled document')+'\n';if(v=ed.getParam('fullpage_default_encoding'))t.head+='\n';if(v=ed.getParam('fullpage_default_font_family'))st+='font-family: '+v+';';if(v=ed.getParam('fullpage_default_font_size'))st+='font-size: '+v+';';if(v=ed.getParam('fullpage_default_text_color'))st+='color: '+v+';';t.head+='\n\n';t.foot='\n\n';}},_getContent:function(ed,o){var t=this;o.content=tinymce.trim(t.head)+'\n'+tinymce.trim(o.content)+'\n'+tinymce.trim(t.foot);}});tinymce.PluginManager.add('fullpage',tinymce.plugins.FullPagePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceFullPageProperties",function(){a.windowManager.open({file:b+"/fullpage.htm",width:430+parseInt(a.getLang("fullpage.delta_width",0)),height:495+parseInt(a.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:b,head_html:c.head})});a.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});a.onBeforeSetContent.add(c._setContent,c);a.onSetContent.add(c._setBodyAttribs,c);a.onGetContent.add(c._getContent,c)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_setBodyAttribs:function(d,a){var l,c,e,g,b,h,j,f=this.head.match(/body(.*?)>/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c",a);h.head=f.substring(0,a+1);j=f.indexOf("\n'}h.head+=d.getParam("fullpage_default_doctype",'');h.head+="\n\n\n"+d.getParam("fullpage_default_title","Untitled document")+"\n";if(g=d.getParam("fullpage_default_encoding")){h.head+='\n'}if(g=d.getParam("fullpage_default_font_family")){i+="font-family: "+g+";"}if(g=d.getParam("fullpage_default_font_size")){i+="font-size: "+g+";"}if(g=d.getParam("fullpage_default_text_color")){i+="color: "+g+";"}h.head+="\n\n";h.foot="\n\n"}},_getContent:function(a,c){var b=this;if(!c.source_view||!a.getParam("fullpage_hide_in_source_view")){c.content=tinymce.trim(b.head)+"\n"+tinymce.trim(c.content)+"\n"+tinymce.trim(b.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js old mode 100755 new mode 100644 index 019682d..c7d5aca --- a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -1,5 +1,5 @@ /** - * $Id: editor_plugin_src.js 920 2008-09-09 14:05:33Z spocke $ + * $Id: editor_plugin_src.js 1029 2009-02-24 22:32:21Z spocke $ * * @author Moxiecode * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. @@ -82,6 +82,9 @@ _setContent : function(ed, o) { var t = this, sp, ep, c = o.content, v, st = ''; + if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) + return; + // Parse out head, body and footer c = c.replace(/<(\/?)BODY/gi, '<$1body'); sp = c.indexOf(' -
@@ -26,27 +25,27 @@ - + - + - + - + - + - + - + - + @@ -95,7 +94,7 @@ - +
  
  
  
  
  
  
  
  
  
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js b/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js old mode 100755 new mode 100644 index 89059ef..dd3a29c --- a/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js @@ -123,7 +123,7 @@ function init() { // Parse xml and doctype xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); - docType = getReItem(/<\!DOCTYPE.*?>/gi, h, 0); + docType = getReItem(/<\!DOCTYPE.*?>/gi, h.replace(/\n/g, ''), 0).replace(/ +/g, ' '); f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1); // Parse title diff --git a/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js old mode 100755 new mode 100644 -- cgit v1.3