upgrading tinymce to 2.0.5.1
This commit is contained in:
parent
cb2a8d025e
commit
00d46f6148
342 changed files with 13043 additions and 11487 deletions
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('fullscreen','en,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');function TinyMCE_fullscreen_getInfo(){return{longname:'Fullscreen',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_fullscreen_getControlHTML(control_name){switch(control_name){case "fullscreen":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" onmousedown="return false;"><img id="{$editor_id}_fullscreen" src="{$pluginurl}/images/fullscreen.gif" title="{$lang_fullscreen_desc}" width="20" height="20" class="mceButton'+(tinyMCE.getParam('fullscreen_is_enabled')?'Selected':'Normal')+'" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_fullscreen_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);}return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('fullscreen','en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_FullScreenPlugin={getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"fullscreen":return tinyMCE.getButtonHTML(cn,'lang_fullscreen_desc','{$pluginurl}/images/fullscreen.gif','mceFullScreen');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(tinyMCE.getParam('fullscreen_is_enabled'))tinyMCE.switchClass(editor_id+'_fullscreen','mceButtonSelected');return true;}};tinyMCE.addPlugin("fullscreen",TinyMCE_FullScreenPlugin);
|
||||
|
|
@ -1,45 +1,63 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('fullscreen', 'en,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2006/03/14 17:33:39 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_fullscreen_getInfo() {
|
||||
return {
|
||||
longname : 'Fullscreen',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('fullscreen', 'en,tr,sv,cs,fr_ca,zh_cn,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');
|
||||
|
||||
var TinyMCE_FullScreenPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Fullscreen',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_fullscreen.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "fullscreen":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_fullscreen_desc', '{$pluginurl}/images/fullscreen.gif', 'mceFullScreen');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceFullScreen":
|
||||
if (tinyMCE.getParam('fullscreen_is_enabled')) {
|
||||
// In fullscreen mode
|
||||
window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));
|
||||
top.close();
|
||||
} else {
|
||||
tinyMCE.setWindowArg('editor_id', editor_id);
|
||||
|
||||
var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
|
||||
try { win.resizeTo(screen.availWidth, screen.availHeight); } catch (e) {}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
if (tinyMCE.getParam('fullscreen_is_enabled'))
|
||||
tinyMCE.switchClass(editor_id + '_fullscreen', 'mceButtonSelected');
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_fullscreen_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "fullscreen":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" onmousedown="return false;"><img id="{$editor_id}_fullscreen" src="{$pluginurl}/images/fullscreen.gif" title="{$lang_fullscreen_desc}" width="20" height="20" class="mceButton' + (tinyMCE.getParam('fullscreen_is_enabled') ? 'Selected' : 'Normal') + '" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function TinyMCE_fullscreen_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceFullScreen":
|
||||
if (tinyMCE.getParam('fullscreen_is_enabled')) {
|
||||
// In fullscreen mode
|
||||
window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));
|
||||
top.close();
|
||||
} else {
|
||||
tinyMCE.setWindowArg('editor_id', editor_id);
|
||||
|
||||
var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
tinyMCE.addPlugin("fullscreen", TinyMCE_FullScreenPlugin);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
patchCallback(settings, 'init_instance_callback');
|
||||
patchCallback(settings, 'file_browser_callback');
|
||||
patchCallback(settings, 'cleanup_callback');
|
||||
patchCallback(settings, 'execcommand_callback');
|
||||
patchCallback(settings, 'oninit');
|
||||
|
||||
// Set options
|
||||
|
|
@ -46,7 +47,7 @@
|
|||
|
||||
function setupContent(editor_id, body, doc) {
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var backInst = window.opener.tinyMCE.getInstanceById(tinyMCE.getParam('fullscreen_editor_id'));
|
||||
var content = window.opener.tinyMCE.getContent(tinyMCE.getParam('fullscreen_editor_id'));
|
||||
|
||||
// Setup title
|
||||
var divElm = document.createElement("div");
|
||||
|
|
@ -54,20 +55,37 @@
|
|||
document.title = divElm.innerHTML;
|
||||
|
||||
// Get content
|
||||
inst.getBody().innerHTML = backInst.getBody().innerHTML;
|
||||
inst.execCommand('mceSetContent', false, content);
|
||||
}
|
||||
|
||||
function unloadHandler(e) {
|
||||
moveContent();
|
||||
}
|
||||
|
||||
function moveContent() {
|
||||
var doc = tinyMCE.isMSIE ? window.frames['mce_editor_0'].window.document : document.getElementById('mce_editor_0').contentDocument;
|
||||
window.opener.tinyMCE.setInnerHTML(window.opener.tinyMCE.selectedInstance.getBody(), doc.body.innerHTML);
|
||||
}
|
||||
|
||||
// Add onunload
|
||||
tinyMCE.addEvent(window, "beforeunload", unloadHandler);
|
||||
|
||||
function doParentSubmit() {
|
||||
moveContent();
|
||||
|
||||
if (window.opener.tinyMCE.selectedInstance.formElement.form)
|
||||
window.opener.tinyMCE.selectedInstance.formElement.form.submit();
|
||||
|
||||
window.close();
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body style="margin: 0px; overflow: hidden; height: 100%" scrolling="no" scroll="no">
|
||||
<body style="margin: 0; overflow: hidden; height: 100%" scrolling="no" scroll="no">
|
||||
<form onsubmit="doParentSubmit();" style="height: 100%">
|
||||
<textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2005/10/18 13:59:42 spocke Exp $
|
||||
* $Id: cs.js,v 1.5 2006/01/11 14:25:48 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
fullscreen_title : 'Fuldskærmstilstand',
|
||||
fullscreen_desc : 'Tænd / sluk for fuldskærm'
|
||||
fullscreen_title : 'Fuldskærmstilstand',
|
||||
fullscreen_desc : 'Tænd / sluk for fuldskærm'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Simplified Chinese lang variables contributed by tom_cat (thomaswangyang@gmail.com)
|
||||
// Simplified Chinese lang variables contributed by TinyMCE_China_Team ( tinymce_china {AT} yahoogroups {DOT} com ).
|
||||
// visit our homepage at: http://www.cube316.net/tinymce/ for more information.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
fullscreen_title : '全屏模式',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue