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,118 +1 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('template', 'en'); // <- Add a comma separated list of all supported languages
|
||||
|
||||
/****
|
||||
* Steps for creating a plugin from this template:
|
||||
*
|
||||
* 1. Change all "template" to the name of your plugin.
|
||||
* 2. Remove all the callbacks in this file that you don't need.
|
||||
* 3. Remove the popup.htm file if you don't need any popups.
|
||||
* 4. Add your custom logic to the callbacks you needed.
|
||||
* 5. Write documentation in a readme.txt file on how to use the plugin.
|
||||
* 6. Upload it under the "Plugins" section at sourceforge.
|
||||
*
|
||||
****/
|
||||
|
||||
/**
|
||||
* Gets executed when a editor instance is initialized
|
||||
*/
|
||||
function TinyMCE_template_initInstance(inst) {
|
||||
// You can take out plugin specific parameters
|
||||
alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when a editor needs to generate a button.
|
||||
*/
|
||||
function TinyMCE_template_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "template":
|
||||
return '<img id="{$editor_id}_template" src="{$pluginurl}/images/template.gif" title="{$lang_template_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceTemplate\', true);" />';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when a command is called.
|
||||
*/
|
||||
function TinyMCE_template_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
|
||||
case "mceTemplate":
|
||||
// Show UI/Popup
|
||||
if (user_interface) {
|
||||
// Open a popup window and send in some custom data in a window argument
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/template/popup.htm'; // Relative to theme
|
||||
template['width'] = 300;
|
||||
template['height'] = 200;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"});
|
||||
|
||||
// Let TinyMCE know that something was modified
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
} else {
|
||||
// Do a command this gets called from the template popup
|
||||
alert("execCommand: mceTemplate gets called from popup.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when the selection/cursor position was changed.
|
||||
*/
|
||||
function TinyMCE_template_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
// Deselect template button
|
||||
tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonNormal');
|
||||
|
||||
// Select template button if parent node is a strong or b
|
||||
if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B")
|
||||
tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonSelected');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when contents is inserted / retrived.
|
||||
*/
|
||||
function TinyMCE_template_cleanup(type, content) {
|
||||
switch (type) {
|
||||
case "get_from_editor":
|
||||
alert("[FROM] Value HTML string: " + content);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor":
|
||||
alert("[TO] Value HTML string: " + content);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
alert("[FROM] Value DOM Element " + content.innerHTML);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor_dom":
|
||||
alert("[TO] Value DOM Element: " + content.innerHTML);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
tinyMCE.importPluginLanguagePack('template','en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl');var TinyMCE_TemplatePlugin={getInfo:function(){return{longname:'Template plugin',author:'Your name',authorurl:'http://www.yoursite.com',infourl:'http://www.yoursite.com/docs/template.html',version:"1.0"};},initInstance:function(inst){alert("Initialization parameter:"+tinyMCE.getParam("template_someparam",false));inst.addShortcut('ctrl','t','lang_template_desc','mceTemplate');},getControlHTML:function(cn){switch(cn){case"template":return tinyMCE.getButtonHTML(cn,'lang_template_desc','{$pluginurl}/images/template.gif','mceTemplate',true);}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceTemplate":if(user_interface){var template=new Array();template['file']='../../plugins/template/popup.htm';template['width']=300;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,some_custom_arg:"somecustomdata"});tinyMCE.triggerNodeChange(false);}else{alert("execCommand: mceTemplate gets called from popup.");}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node.parentNode.nodeName=="STRONG"||node.parentNode.nodeName=="B"){tinyMCE.switchClass(editor_id+'_template','mceButtonSelected');return true;}tinyMCE.switchClass(editor_id+'_template','mceButtonNormal');},setupContent:function(editor_id,body,doc){},onChange:function(inst){},handleEvent:function(e){top.status="template plugin event: "+e.type;return true;},cleanup:function(type,content,inst){switch(type){case"get_from_editor":alert("[FROM] Value HTML string: "+content);break;case"insert_to_editor":alert("[TO] Value HTML string: "+content);break;case"get_from_editor_dom":alert("[FROM] Value DOM Element "+content.innerHTML);break;case"insert_to_editor_dom":alert("[TO] Value DOM Element: "+content.innerHTML);break;}return content;},_someInternalFunction:function(a,b){return 1;}};tinyMCE.addPlugin("template",TinyMCE_TemplatePlugin);
|
||||
|
|
@ -1,5 +1,14 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2006/02/22 20:06:23 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('template', 'en,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
|
||||
tinyMCE.importPluginLanguagePack('template', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
|
||||
|
||||
/****
|
||||
* Steps for creating a plugin from this template:
|
||||
|
|
@ -13,120 +22,217 @@ tinyMCE.importPluginLanguagePack('template', 'en,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,
|
|||
*
|
||||
****/
|
||||
|
||||
/**
|
||||
* Information about the plugin.
|
||||
*/
|
||||
function TinyMCE_template_getInfo() {
|
||||
return {
|
||||
longname : 'Template plugin',
|
||||
author : 'Your name',
|
||||
authorurl : 'http://www.yoursite.com',
|
||||
infourl : 'http://www.yoursite.com/docs/template.html',
|
||||
version : "1.0"
|
||||
};
|
||||
// Singleton class
|
||||
var TinyMCE_TemplatePlugin = {
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @returns Name/value array containing information about the plugin.
|
||||
* @type Array
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Template plugin',
|
||||
author : 'Your name',
|
||||
authorurl : 'http://www.yoursite.com',
|
||||
infourl : 'http://www.yoursite.com/docs/template.html',
|
||||
version : "1.0"
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets executed when a TinyMCE editor instance is initialized.
|
||||
*
|
||||
* @param {TinyMCE_Control} Initialized TinyMCE editor control instance.
|
||||
*/
|
||||
initInstance : function(inst) {
|
||||
// You can take out plugin specific parameters
|
||||
alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
|
||||
|
||||
// Register custom keyboard shortcut
|
||||
inst.addShortcut('ctrl', 't', 'lang_template_desc', 'mceTemplate');
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML code for a specific control or empty string if this plugin doesn't have that control.
|
||||
* A control can be a button, select list or any other HTML item to present in the TinyMCE user interface.
|
||||
* The variable {$editor_id} will be replaced with the current editor instance id and {$pluginurl} will be replaced
|
||||
* with the URL of the plugin. Language variables such as {$lang_somekey} will also be replaced with contents from
|
||||
* the language packs.
|
||||
*
|
||||
* @param {string} cn Editor control/button name to get HTML for.
|
||||
* @return HTML code for a specific control or empty string.
|
||||
* @type string
|
||||
*/
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "template":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_template_desc', '{$pluginurl}/images/template.gif', 'mceTemplate', true);
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes a specific command, this function handles plugin commands.
|
||||
*
|
||||
* @param {string} editor_id TinyMCE editor instance id that issued the command.
|
||||
* @param {HTMLElement} element Body or root element for the editor instance.
|
||||
* @param {string} command Command name to be executed.
|
||||
* @param {string} user_interface True/false if a user interface should be presented.
|
||||
* @param {mixed} value Custom value argument, can be anything.
|
||||
* @return true/false if the command was executed by this plugin or not.
|
||||
* @type
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
|
||||
case "mceTemplate":
|
||||
// Show UI/Popup
|
||||
if (user_interface) {
|
||||
// Open a popup window and send in some custom data in a window argument
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/template/popup.htm'; // Relative to theme
|
||||
template['width'] = 300;
|
||||
template['height'] = 200;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"});
|
||||
|
||||
// Let TinyMCE know that something was modified
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
} else {
|
||||
// Do a command this gets called from the template popup
|
||||
alert("execCommand: mceTemplate gets called from popup.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets called ones the cursor/selection in a TinyMCE instance changes. This is useful to enable/disable
|
||||
* button controls depending on where the user are and what they have selected. This method gets executed
|
||||
* alot and should be as performance tuned as possible.
|
||||
*
|
||||
* @param {string} editor_id TinyMCE editor instance id that was changed.
|
||||
* @param {HTMLNode} node Current node location, where the cursor is in the DOM tree.
|
||||
* @param {int} undo_index The current undo index, if this is -1 custom undo/redo is disabled.
|
||||
* @param {int} undo_levels The current undo levels, if this is -1 custom undo/redo is disabled.
|
||||
* @param {boolean} visual_aid Is visual aids enabled/disabled ex: dotted lines on tables.
|
||||
* @param {boolean} any_selection Is there any selection at all or is there only a cursor.
|
||||
*/
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
// Select template button if parent node is a strong or b
|
||||
if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B") {
|
||||
tinyMCE.switchClass(editor_id + '_template', 'mceButtonSelected');
|
||||
return true;
|
||||
}
|
||||
|
||||
// Deselect template button
|
||||
tinyMCE.switchClass(editor_id + '_template', 'mceButtonNormal');
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets called when a TinyMCE editor instance gets filled with content on startup.
|
||||
*
|
||||
* @param {string} editor_id TinyMCE editor instance id that was filled with content.
|
||||
* @param {HTMLElement} body HTML body element of editor instance.
|
||||
* @param {HTMLDocument} doc HTML document instance.
|
||||
*/
|
||||
setupContent : function(editor_id, body, doc) {
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets called when the contents of a TinyMCE area is modified, in other words when a undo level is
|
||||
* added.
|
||||
*
|
||||
* @param {TinyMCE_Control} inst TinyMCE editor area control instance that got modified.
|
||||
*/
|
||||
onChange : function(inst) {
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets called when TinyMCE handles events such as keydown, mousedown etc. TinyMCE
|
||||
* doesn't listen on all types of events so custom event handling may be required for
|
||||
* some purposes.
|
||||
*
|
||||
* @param {Event} e HTML editor event reference.
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
*/
|
||||
handleEvent : function(e) {
|
||||
// Display event type in statusbar
|
||||
top.status = "template plugin event: " + e.type;
|
||||
|
||||
return true; // Pass to next handler
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets called when HTML contents is inserted or retrived from a TinyMCE editor instance.
|
||||
* The type parameter contains what type of event that was performed and what format the content is in.
|
||||
* Possible valuses for type is get_from_editor, insert_to_editor, get_from_editor_dom, insert_to_editor_dom.
|
||||
*
|
||||
* @param {string} type Cleanup event type.
|
||||
* @param {mixed} content Editor contents that gets inserted/extracted can be a string or DOM element.
|
||||
* @param {TinyMCE_Control} inst TinyMCE editor instance control that performes the cleanup.
|
||||
* @return New content or the input content depending on action.
|
||||
* @type string
|
||||
*/
|
||||
cleanup : function(type, content, inst) {
|
||||
switch (type) {
|
||||
case "get_from_editor":
|
||||
alert("[FROM] Value HTML string: " + content);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor":
|
||||
alert("[TO] Value HTML string: " + content);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
alert("[FROM] Value DOM Element " + content.innerHTML);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor_dom":
|
||||
alert("[TO] Value DOM Element: " + content.innerHTML);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
// Private plugin internal methods
|
||||
|
||||
/**
|
||||
* This is just a internal plugin method, prefix all internal methods with a _ character.
|
||||
* The prefix is needed so they doesn't collide with future TinyMCE callback functions.
|
||||
*
|
||||
* @param {string} a Some arg1.
|
||||
* @param {string} b Some arg2.
|
||||
* @return Some return.
|
||||
* @type string
|
||||
*/
|
||||
_someInternalFunction : function(a, b) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets executed when a editor instance is initialized
|
||||
*/
|
||||
function TinyMCE_template_initInstance(inst) {
|
||||
// You can take out plugin specific parameters
|
||||
alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when a editor needs to generate a button.
|
||||
*/
|
||||
function TinyMCE_template_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "template":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceTemplate\', true);return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_template" src="{$pluginurl}/images/template.gif" title="{$lang_template_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when a command is called.
|
||||
*/
|
||||
function TinyMCE_template_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
// Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
|
||||
case "mceTemplate":
|
||||
// Show UI/Popup
|
||||
if (user_interface) {
|
||||
// Open a popup window and send in some custom data in a window argument
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/template/popup.htm'; // Relative to theme
|
||||
template['width'] = 300;
|
||||
template['height'] = 200;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, some_custom_arg : "somecustomdata"});
|
||||
|
||||
// Let TinyMCE know that something was modified
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
} else {
|
||||
// Do a command this gets called from the template popup
|
||||
alert("execCommand: mceTemplate gets called from popup.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when the selection/cursor position was changed.
|
||||
*/
|
||||
function TinyMCE_template_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
// Deselect template button
|
||||
tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonNormal');
|
||||
|
||||
// Select template button if parent node is a strong or b
|
||||
if (node.parentNode.nodeName == "STRONG" || node.parentNode.nodeName == "B")
|
||||
tinyMCE.switchClassSticky(editor_id + '_template', 'mceButtonSelected');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets executed when contents is inserted / retrived.
|
||||
*/
|
||||
function TinyMCE_template_cleanup(type, content) {
|
||||
switch (type) {
|
||||
case "get_from_editor":
|
||||
alert("[FROM] Value HTML string: " + content);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor":
|
||||
alert("[TO] Value HTML string: " + content);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
alert("[FROM] Value DOM Element " + content.innerHTML);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor_dom":
|
||||
alert("[TO] Value DOM Element: " + content.innerHTML);
|
||||
|
||||
// Do custom cleanup code here
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
// Adds the plugin class to the list of available TinyMCE plugins
|
||||
tinyMCE.addPlugin("template", TinyMCE_TemplatePlugin);
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
/* Remember to namespace the language parameters <your plugin>_<some name> */
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('advhr','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_advhr_getInfo(){return{longname:'Advanced HR',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_advhr_getControlHTML(control_name){switch(control_name){case "advhr":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_advhr_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=270;template['height']=180;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />');}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;}function TinyMCE_advhr_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonNormal');if(node==null)return;do{if(node.nodeName.toLowerCase()=="hr")tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonSelected');}while((node=node.parentNode));return true;}
|
||||
tinyMCE.importPluginLanguagePack('advhr','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_AdvancedHRPlugin={getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"advhr":return tinyMCE.getButtonHTML(cn,'lang_insert_advhr_desc','{$pluginurl}/images/advhr.gif','mceAdvancedHr');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />');}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="HR"){tinyMCE.switchClass(editor_id+'_advhr','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advhr','mceButtonNormal');return true;}};tinyMCE.addPlugin("advhr",TinyMCE_AdvancedHRPlugin);
|
||||
|
|
@ -1,75 +1,92 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advhr', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.19 $
|
||||
* $Date: 2006/02/10 16:29:37 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_advhr_getInfo() {
|
||||
return {
|
||||
longname : 'Advanced HR',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advhr', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
var TinyMCE_AdvancedHRPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced HR',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advhr.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
}
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "advhr":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the mceAdvanceHr command.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceAdvancedHr":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
|
||||
template['width'] = 250;
|
||||
template['height'] = 160;
|
||||
|
||||
template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0);
|
||||
|
||||
var size = "", width = "", noshade = "";
|
||||
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr") {
|
||||
tinyMCE.hrElement = tinyMCE.selectedElement;
|
||||
|
||||
if (tinyMCE.hrElement) {
|
||||
size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
|
||||
width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
|
||||
noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
|
||||
}
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
|
||||
} else {
|
||||
if (tinyMCE.isMSIE) {
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
|
||||
} else {
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName == "HR") {
|
||||
tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonSelected');
|
||||
return true;
|
||||
}
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonNormal');
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_advhr_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "advhr":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the mceAdvanceHr command.
|
||||
*/
|
||||
function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceAdvancedHr":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
|
||||
template['width'] = 270;
|
||||
template['height'] = 180;
|
||||
|
||||
template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0);
|
||||
|
||||
var size = "", width = "", noshade = "";
|
||||
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){
|
||||
tinyMCE.hrElement = tinyMCE.selectedElement;
|
||||
if (tinyMCE.hrElement) {
|
||||
size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
|
||||
width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
|
||||
noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
|
||||
}
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
|
||||
} else {
|
||||
if (tinyMCE.isMSIE) {
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
|
||||
} else {
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal');
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName.toLowerCase() == "hr")
|
||||
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected');
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
return true;
|
||||
}
|
||||
tinyMCE.addPlugin("advhr", TinyMCE_AdvancedHRPlugin);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ function init() {
|
|||
var formObj = document.forms[0];
|
||||
formObj.width.value = tinyMCE.getWindowArg('width');
|
||||
formObj.size.value = tinyMCE.getWindowArg('size');
|
||||
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'));
|
||||
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
|
||||
if (tinyMCE.getWindowArg('noshade')) {
|
||||
formObj.noshade.checked = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2005/10/18 13:59:21 spocke Exp $
|
||||
* $Id: cs.js,v 1.5 2006/01/11 14:25:47 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insert_advhr_desc : 'Indsæt / rediger horisontal bjælke',
|
||||
insert_advhr_desc : 'Indsæt / rediger horisontal linie',
|
||||
insert_advhr_width : 'Bredde',
|
||||
insert_advhr_size : 'Højde',
|
||||
insert_advhr_size : 'Højde',
|
||||
insert_advhr_noshade : 'Ingen skygge'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// UK lang variables
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insert_advhr_desc : 'Insert / edit Horizontale Rule',
|
||||
insert_advhr_desc : 'Horizontale rule',
|
||||
insert_advhr_width : 'Width',
|
||||
insert_advhr_size : 'Height',
|
||||
insert_advhr_noshade : 'No shadow'
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
insert_advhr_desc : '꿨흙/긍서 彊틱깃넹',
|
||||
|
|
|
|||
|
|
@ -1,40 +1,36 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{$lang_insert_link_title}</title>
|
||||
<title>{$lang_insert_advhr_desc}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="jscripts/rule.js"></script>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
input.radio {
|
||||
border: 1px none #000000;
|
||||
background-color: transparent;
|
||||
vertical-align: middle;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body onload="tinyMCEPopup.executeOnLoad('init();');">
|
||||
<form onsubmit="insertHR();return false;" action="#">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
|
||||
<form onsubmit="insertHR();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_advhr_desc}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2" class="title">{$lang_insert_advhr_desc}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">{$lang_insert_advhr_width}:</td>
|
||||
<td><label for="width">{$lang_insert_advhr_width}</label></td>
|
||||
<td nowrap="nowrap">
|
||||
<input name="width" type="text" id="width" value="" style="width: 50px; vertical-align: middle;" />
|
||||
<select name="width2" id="width2" style="width: 50px; vertical-align: middle;">
|
||||
<input id="width" name="width" type="text" value="" />
|
||||
<select name="width2" id="width2">
|
||||
<option value="">px</option>
|
||||
<option value="%">%</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">{$lang_insert_advhr_size}:</td>
|
||||
<td><select id="size" name="size" style="width: 100px;">
|
||||
<td><label for="size">{$lang_insert_advhr_size}</label></td>
|
||||
<td><select id="size" name="size">
|
||||
<option value="">Normal</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
|
|
@ -44,16 +40,22 @@
|
|||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top"><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
||||
<td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
|
||||
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" name="insert" value="{$lang_insert}" onclick="insertHR();" id="insert" /></td>
|
||||
<td align="right"><input type="button" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" id="cancel" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertHR();" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
|
||||
.checkbox {
|
||||
border: 0px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.panel_wrapper div.current {
|
||||
|
|
@ -25,11 +25,11 @@
|
|||
}
|
||||
|
||||
#prev {
|
||||
margin:0px;
|
||||
margin: 0;
|
||||
border: 1px
|
||||
solid black;
|
||||
width: 99%;
|
||||
height:150px;
|
||||
height: 150px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('advimage','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_advimage_getInfo(){return{longname:'Advanced image',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_advimage_getControlHTML(control_name){switch(control_name){case "image":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvImage\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_advimage" src="{$themeurl}/images/image.gif" title="{$lang_image_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';}return "";}function TinyMCE_advimage_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvImage":var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=480;template['height']=380;template['width']+=tinyMCE.getLang('lang_advimage_delta_width',0);template['height']+=tinyMCE.getLang('lang_advimage_delta_height',0);var inst=tinyMCE.getInstanceById(editor_id);var elm=inst.getFocusElement();if(elm!=null&&tinyMCE.getAttrib(elm,'class').indexOf('mceItem')!=-1)return true;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}function TinyMCE_advimage_cleanup(type,content){switch(type){case "insert_to_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=tinyMCE.getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=tinyMCE.getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;case "get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=tinyMCE.getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=tinyMCE.getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;}return content;}function TinyMCE_advimage_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advimage','mceButtonNormal');if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1)tinyMCE.switchClassSticky(editor_id+'_advimage','mceButtonSelected');}while((node=node.parentNode));return true;}
|
||||
tinyMCE.importPluginLanguagePack('advimage','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');var TinyMCE_AdvancedImagePlugin={getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"image":return tinyMCE.getButtonHTML(cn,'lang_image_desc','{$themeurl}/images/image.gif','mceAdvImage');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvImage":var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=480;template['height']=380;template['width']+=tinyMCE.getLang('lang_advimage_delta_width',0);template['height']+=tinyMCE.getLang('lang_advimage_delta_height',0);var inst=tinyMCE.getInstanceById(editor_id);var elm=inst.getFocusElement();if(elm!=null&&tinyMCE.getAttrib(elm,'class').indexOf('mceItem')!=-1)return true;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;case"get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseover',"this.src='"+src+"';");}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseout',"this.src='"+src+"';");}}break;}return content;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_advimage','mceButtonSelected');return true;}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advimage','mceButtonNormal');return true;},_getImageSrc:function(s){var sr,p=-1;if(!s)return"";if((p=s.indexOf('this.src='))!=-1){sr=s.substring(p+10);sr=sr.substring(0,sr.indexOf('\''));return sr;}return"";}};tinyMCE.addPlugin("advimage",TinyMCE_AdvancedImagePlugin);
|
||||
|
|
@ -1,113 +1,150 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advimage', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.30 $
|
||||
* $Date: 2006/02/10 16:29:37 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_advimage_getInfo() {
|
||||
return {
|
||||
longname : 'Advanced image',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advimage', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');
|
||||
|
||||
var TinyMCE_AdvancedImagePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced image',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advimage.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "image":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_image_desc', '{$themeurl}/images/image.gif', 'mceAdvImage');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mceAdvImage":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advimage/image.htm';
|
||||
template['width'] = 480;
|
||||
template['height'] = 380;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_advimage_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0);
|
||||
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = inst.getFocusElement();
|
||||
|
||||
if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1)
|
||||
return true;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
cleanup : function(type, content) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
|
||||
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
|
||||
|
||||
if ((src = this._getImageSrc(onmouseover)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
|
||||
|
||||
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
|
||||
}
|
||||
|
||||
if ((src = this._getImageSrc(onmouseout)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
|
||||
|
||||
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
|
||||
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
|
||||
|
||||
if ((src = this._getImageSrc(onmouseover)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
|
||||
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
|
||||
}
|
||||
|
||||
if ((src = this._getImageSrc(onmouseout)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
|
||||
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
|
||||
tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonSelected');
|
||||
return true;
|
||||
}
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonNormal');
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the image src from a scripted mouse over image str.
|
||||
*
|
||||
* @param {string} s String to get real src from.
|
||||
* @return Image src from a scripted mouse over image str.
|
||||
* @type string
|
||||
*/
|
||||
_getImageSrc : function(s) {
|
||||
var sr, p = -1;
|
||||
|
||||
if (!s)
|
||||
return "";
|
||||
|
||||
if ((p = s.indexOf('this.src=')) != -1) {
|
||||
sr = s.substring(p + 10);
|
||||
sr = sr.substring(0, sr.indexOf('\''));
|
||||
|
||||
return sr;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_advimage_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "image":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvImage\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_advimage" src="{$themeurl}/images/image.gif" title="{$lang_image_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function TinyMCE_advimage_execCommand(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mceAdvImage":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advimage/image.htm';
|
||||
template['width'] = 480;
|
||||
template['height'] = 380;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_advimage_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0);
|
||||
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = inst.getFocusElement();
|
||||
|
||||
if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1)
|
||||
return true;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_advimage_cleanup(type, content) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
|
||||
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseover)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
|
||||
|
||||
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
|
||||
}
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseout)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
|
||||
|
||||
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
|
||||
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseover)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
|
||||
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
|
||||
}
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseout)) != "") {
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
|
||||
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
function TinyMCE_advimage_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
tinyMCE.switchClassSticky(editor_id + '_advimage', 'mceButtonNormal');
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1)
|
||||
tinyMCE.switchClassSticky(editor_id + '_advimage', 'mceButtonSelected');
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
return true;
|
||||
}
|
||||
tinyMCE.addPlugin("advimage", TinyMCE_AdvancedImagePlugin);
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ function makeAttrib(attrib, value) {
|
|||
value = value.replace(/&/g, '&');
|
||||
value = value.replace(/\"/g, '"');
|
||||
value = value.replace(/</g, '<');
|
||||
value = value.replace(/>/g, '&gr;');
|
||||
value = value.replace(/>/g, '>');
|
||||
|
||||
return ' ' + attrib + '="' + value + '"';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,33 @@
|
|||
// UK lang variables
|
||||
/**
|
||||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2006/01/11 14:25:47 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insert_image_alt2 : 'Název obrázku',
|
||||
insert_image_onmousemove : 'Alternativní obrázek',
|
||||
insert_image_mouseover : 'pøi najetí myši',
|
||||
insert_image_mouseout : 'pøi odjetí myši'
|
||||
tinyMCE.addToLang('advimage',{
|
||||
tab_general : 'Obecné',
|
||||
tab_appearance : 'Vzhled',
|
||||
tab_advanced : 'Pokročilé',
|
||||
general : 'Obecné',
|
||||
title : 'Titulek',
|
||||
preview : 'Náhled',
|
||||
constrain_proportions : 'Zachovat rozměry',
|
||||
langdir : 'Směr textu',
|
||||
langcode : 'Kód jazyka',
|
||||
long_desc : 'Dlouhý popis odkazu',
|
||||
style : 'Styl',
|
||||
classes : 'Třídy',
|
||||
ltr : 'Z leva doprava',
|
||||
rtl : 'Z prava doleva',
|
||||
id : 'Id',
|
||||
image_map : 'Obrázková mapa',
|
||||
swap_image : 'Přepnout obrázek',
|
||||
alt_image : 'Alternativní obrázek',
|
||||
mouseover : 'pro přejetí myší',
|
||||
mouseout : 'pro odjetí myší',
|
||||
misc : 'Různé',
|
||||
example_img : 'Vzhled náhled obrázek',
|
||||
missing_alt : 'Jste si jistý(á), že chcete pokračovat bez vyplnění popisu obrázku? Bez popisu může být obrázek nepřístupný handicapovaným uživatelům, nebo těm kteří používají textový prohlížeč, nebo prohlíží stránky s vypnutým obrázky.'
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('advimage',{
|
||||
tab_general : 'Generelt',
|
||||
|
|
@ -13,8 +13,8 @@ langcode : 'Sprogkode',
|
|||
long_desc : 'Langt beskrivelseslink',
|
||||
style : 'Style',
|
||||
classes : 'Klasser',
|
||||
ltr : 'Venstre til højre',
|
||||
rtl : 'Højre til venstre',
|
||||
ltr : 'Venstre til højre',
|
||||
rtl : 'Højre til venstre',
|
||||
id : 'Id',
|
||||
image_map : 'Billedkort',
|
||||
swap_image : 'Alternativt billede',
|
||||
|
|
@ -22,5 +22,6 @@ alt_image : 'Alternative image',
|
|||
mouseover : 'ved mouse over',
|
||||
mouseout : 'ved mouse out',
|
||||
misc : 'Diverse',
|
||||
example_img : 'Appearance preview image'
|
||||
example_img : 'Appearance preview image',
|
||||
missing_alt : 'Er du sikker på at du vil fortsætte uden at indsætte en billedbeskrivelse? Uden den, kan billedet være utilgængeligt for brugere med handicap, eller for brugere med en tekst-browser, eller som har slået billedvisning fra.'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,47 +1,27 @@
|
|||
// French lang variables by Laurent Dran
|
||||
// Modifié par Normand Lamoureux le 2005-11-12
|
||||
// Modifier par Mathieu Gautheret
|
||||
|
||||
tinyMCE.addToLang('advlink',{
|
||||
general_tab : 'Général',
|
||||
popup_tab : 'Pop-up',
|
||||
events_tab : 'Événements',
|
||||
advanced_tab : 'Avancé',
|
||||
general_props : 'Propriétés générales',
|
||||
popup_props : 'Propriétés du pop-up',
|
||||
event_props : 'Événements',
|
||||
advanced_props : 'Propriétés avancées',
|
||||
popup_opts : 'Options',
|
||||
anchor_names : 'Ancres',
|
||||
target_same : 'Ovrir dans la même fenêtre/cadre',
|
||||
target_parent : 'Ouvrir dans la fenêtre/cadre parent',
|
||||
target_top : 'Ouvrir dans la fenêtre principale',
|
||||
target_blank : 'Ouvrir dans une nouvelle fenêtre',
|
||||
popup : 'Pop-up Javascript',
|
||||
popup_url : 'URL du pop-up',
|
||||
popup_name : 'Nom de la fenêtre',
|
||||
popup_return : 'Insérer \'return false;\'',
|
||||
popup_scrollbars : 'Montrer les barres de défilement',
|
||||
popup_statusbar : 'Montrer la barre de statut',
|
||||
popup_toolbar : 'Montrer la barre d\'outils',
|
||||
popup_menubar : 'Montrer la barre de menus',
|
||||
popup_location : 'Montrer la barre de titre',
|
||||
popup_resizable : 'Permettre le redimensionnement',
|
||||
popup_dependent : 'Dépendent (Mozilla/Firefox seulement)',
|
||||
popup_size : 'Taille',
|
||||
popup_position : 'Position (X/Y)',
|
||||
id : 'Id',
|
||||
style: 'Style en ligne',
|
||||
classes : 'Classe CSS',
|
||||
target_name : 'Nom de la cible',
|
||||
tinyMCE.addToLang('advimage',{
|
||||
tab_general : 'Générale',
|
||||
tab_appearance : 'Apparence',
|
||||
tab_advanced : 'Avancée',
|
||||
general : 'Générale',
|
||||
title : 'Titre',
|
||||
preview : 'Prévisualisation',
|
||||
constrain_proportions : 'Conserver les proportions',
|
||||
langdir : 'Sens d\'écriture',
|
||||
target_langcode : 'Code de langue de la cible',
|
||||
langcode : 'Code de langue du libellé',
|
||||
encoding : 'Encodage de la cible',
|
||||
mime : 'Type MIME de la cible',
|
||||
rel : 'Relation de la page vers la cible',
|
||||
rev : 'Relation de la cible vers la page',
|
||||
tabindex : 'Attribut tabindex',
|
||||
accesskey : 'Attribut accesskey',
|
||||
ltr : 'Vers la droite',
|
||||
rtl : 'Vers la gauche'
|
||||
});
|
||||
long_desc : 'Description du lien',
|
||||
style : 'Style',
|
||||
classes : 'Classes',
|
||||
ltr : 'De gauche à droite',
|
||||
rtl : 'De droite à gauche',
|
||||
id : 'Id',
|
||||
image_map : 'Image map',
|
||||
swap_image : 'Image d\'échange',
|
||||
alt_image : 'Image alternative',
|
||||
mouseover : 'Quand le pointeur est au dessus',
|
||||
mouseout : 'Quand le pointeur est en dehors',
|
||||
misc : 'Divers',
|
||||
example_img : 'Apparence prévisualisation image',
|
||||
missing_alt : 'Etes vous sur de vouloir continuer sans inclure une description de l\'image. Cette description est utile pour les utilisateurs ne pouvant pas afficher les images ou les ayant désactivées.'
|
||||
});
|
||||
|
|
@ -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('advimage',{
|
||||
tab_general : '一般',
|
||||
|
|
@ -22,6 +23,6 @@ alt_image : '
|
|||
mouseover : '鼠标在上面时',
|
||||
mouseout : '鼠标离开时',
|
||||
misc : '杂项',
|
||||
example_img : 'Appearance preview image',
|
||||
example_img : 'ÏÔʾ Ô¤ÀÀ ͼƬ',
|
||||
missing_alt : '您确认要在没有图片说明的情况下继续吗? 这样其他关闭图片浏览的用户将无法注意到你在这里有图片。'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('advlink','en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_advlink_getInfo(){return{longname:'Advanced link',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_advlink_getControlHTML(control_name){switch(control_name){case "link":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvLink\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_advlink" src="{$themeurl}/images/link.gif" title="{$lang_link_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';}return "";}function TinyMCE_advlink_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvLink":var anySelection=false;var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(anySelection||(focusElm!=null&&focusElm.nodeName=="A")){var template=new Array();template['file']='../../plugins/advlink/link.htm';template['width']=480;template['height']=400;template['width']+=tinyMCE.getLang('lang_advlink_delta_width',0);template['height']+=tinyMCE.getLang('lang_advlink_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});}return true;}return false;}function TinyMCE_advlink_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advlink','mceButtonDisabled',true);if(node==null)return;if(any_selection)tinyMCE.switchClassSticky(editor_id+'_advlink','mceButtonNormal',false);do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!="")tinyMCE.switchClassSticky(editor_id+'_advlink','mceButtonSelected',false);}while((node=node.parentNode));return true;}
|
||||
tinyMCE.importPluginLanguagePack('advlink','en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');var TinyMCE_AdvancedLinkPlugin={getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','k','lang_advlink_desc','mceAdvLink');},getControlHTML:function(cn){switch(cn){case"link":return tinyMCE.getButtonHTML(cn,'lang_link_desc','{$themeurl}/images/link.gif','mceAdvLink');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvLink":var anySelection=false;var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var selectedText=inst.selection.getSelectedText();if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(anySelection||(focusElm!=null&&focusElm.nodeName=="A")){var template=new Array();template['file']='../../plugins/advlink/link.htm';template['width']=480;template['height']=400;template['width']+=tinyMCE.getLang('lang_advlink_delta_width',0);template['height']+=tinyMCE.getLang('lang_advlink_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});}return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!=""){tinyMCE.switchClass(editor_id+'_advlink','mceButtonSelected');return true;}}while((node=node.parentNode));if(any_selection){tinyMCE.switchClass(editor_id+'_advlink','mceButtonNormal');return true;}tinyMCE.switchClass(editor_id+'_advlink','mceButtonDisabled');return true;}};tinyMCE.addPlugin("advlink",TinyMCE_AdvancedLinkPlugin);
|
||||
|
|
@ -1,69 +1,90 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advlink', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.24 $
|
||||
* $Date: 2006/02/10 16:29:38 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_advlink_getInfo() {
|
||||
return {
|
||||
longname : 'Advanced link',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advlink', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,cy,es,is,zh_tw,zh_tw_utf8,sk,da');
|
||||
|
||||
var TinyMCE_AdvancedLinkPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Advanced link',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_advlink.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
initInstance : function(inst) {
|
||||
inst.addShortcut('ctrl', 'k', 'lang_advlink_desc', 'mceAdvLink');
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "link":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_link_desc', '{$themeurl}/images/link.gif', 'mceAdvLink');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mceAdvLink":
|
||||
var anySelection = false;
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var focusElm = inst.getFocusElement();
|
||||
var selectedText = inst.selection.getSelectedText();
|
||||
|
||||
if (tinyMCE.selectedElement)
|
||||
anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0);
|
||||
|
||||
if (anySelection || (focusElm != null && focusElm.nodeName == "A")) {
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advlink/link.htm';
|
||||
template['width'] = 480;
|
||||
template['height'] = 400;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_advlink_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_advlink_delta_height', 0);
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") {
|
||||
tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonSelected');
|
||||
return true;
|
||||
}
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
if (any_selection) {
|
||||
tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonNormal');
|
||||
return true;
|
||||
}
|
||||
|
||||
tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonDisabled');
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_advlink_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "link":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvLink\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_advlink" src="{$themeurl}/images/link.gif" title="{$lang_link_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function TinyMCE_advlink_execCommand(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mceAdvLink":
|
||||
var anySelection = false;
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var focusElm = inst.getFocusElement();
|
||||
|
||||
if (tinyMCE.selectedElement)
|
||||
anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0);
|
||||
|
||||
if (anySelection || (focusElm != null && focusElm.nodeName == "A")) {
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advlink/link.htm';
|
||||
template['width'] = 480;
|
||||
template['height'] = 400;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_advlink_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_advlink_delta_height', 0);
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_advlink_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
tinyMCE.switchClassSticky(editor_id + '_advlink', 'mceButtonDisabled', true);
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
if (any_selection)
|
||||
tinyMCE.switchClassSticky(editor_id + '_advlink', 'mceButtonNormal', false);
|
||||
|
||||
do {
|
||||
if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "")
|
||||
tinyMCE.switchClassSticky(editor_id + '_advlink', 'mceButtonSelected', false);
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
return true;
|
||||
}
|
||||
tinyMCE.addPlugin("advlink", TinyMCE_AdvancedLinkPlugin);
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ function parseWindowOpen(onclick) {
|
|||
if (onclick.indexOf('return false;') != -1) {
|
||||
formObj.popupreturn.checked = true;
|
||||
onclick = onclick.replace('return false;', '');
|
||||
}
|
||||
} else
|
||||
formObj.popupreturn.checked = false;
|
||||
|
||||
var onClickData = parseLink(onclick);
|
||||
|
||||
|
|
@ -355,6 +356,9 @@ function buildOnClick() {
|
|||
// tinyMCE.debug(onclick);
|
||||
|
||||
formObj.onclick.value = onclick;
|
||||
|
||||
if (formObj.href.value == "")
|
||||
formObj.href.value = url;
|
||||
}
|
||||
|
||||
function setAttrib(elm, attrib, value) {
|
||||
|
|
@ -416,7 +420,7 @@ function insertAction() {
|
|||
// Create new anchor elements
|
||||
if (elm == null) {
|
||||
if (tinyMCE.isSafari)
|
||||
tinyMCEPopup.execCommand("mceInsertContent", false, '<a href="#mce_temp_url#">' + inst.getSelectedHTML() + '</a>');
|
||||
tinyMCEPopup.execCommand("mceInsertContent", false, '<a href="#mce_temp_url#">' + inst.selection.getSelectedHTML() + '</a>');
|
||||
else
|
||||
tinyMCEPopup.execCommand("createlink", false, "#mce_temp_url#");
|
||||
|
||||
|
|
@ -460,7 +464,7 @@ function setAllAttribs(elm) {
|
|||
var target = getSelectValue(formObj, 'targetlist');
|
||||
|
||||
// Make anchors absolute
|
||||
if (href.charAt(0) == '#')
|
||||
if (href.charAt(0) == '#' && tinyMCE.getParam('convert_urls'))
|
||||
href = tinyMCE.settings['document_base_url'] + href;
|
||||
|
||||
setAttrib(elm, 'href', convertURL(href, elm));
|
||||
|
|
|
|||
|
|
@ -2,27 +2,50 @@
|
|||
* 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:47 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insert_link_target_same : 'Otevřít ve stejném okně/rámu',
|
||||
insert_link_target_parent : 'Otevřít v rodičovském okně/rámu',
|
||||
insert_link_target_top : 'Otevřít v nejvyšším rámu (přepíše všechny rámy)',
|
||||
insert_link_target_blank : 'Otevřít v novém okně',
|
||||
insert_link_target_named : 'Otevřít v okně',
|
||||
insert_link_popup : 'JS-Popup',
|
||||
insert_link_popup_url : 'Popup URL',
|
||||
insert_link_popup_name : 'Název okna',
|
||||
insert_link_popup_return : 'Vložit \'return false\'',
|
||||
insert_link_popup_scrollbars : 'Ukázat posuvníky',
|
||||
insert_link_popup_statusbar : 'Ukázat stavový řádek',
|
||||
insert_link_popup_toolbar : 'Ukázat ovládací lištu',
|
||||
insert_link_popup_menubar : 'Ukázat menu',
|
||||
insert_link_popup_location : 'Ukázat lištu umístění',
|
||||
insert_link_popup_resizable : 'Proměnná velikost okna',
|
||||
insert_link_popup_size : 'Velikost',
|
||||
insert_link_popup_position : 'Umístění (X/Y)',
|
||||
insert_link_popup_missingtarget : 'Vložte název cíle nebo vyberte jinou volbu.'
|
||||
tinyMCE.addToLang('advlink',{
|
||||
general_tab : 'Obecné',
|
||||
popup_tab : 'Popup',
|
||||
events_tab : 'Události',
|
||||
advanced_tab : 'Pokročilé',
|
||||
general_props : 'Obecné vlastnosti',
|
||||
popup_props : 'Popup vlastnosti',
|
||||
event_props : 'Události',
|
||||
advanced_props : 'Advanced properties',
|
||||
popup_opts : 'Možnosti',
|
||||
anchor_names : 'Anchors',
|
||||
target_same : 'Otevřít v tomto okně / rámu',
|
||||
target_parent : 'Otevřít v rodičovském okně / rámu',
|
||||
target_top : 'Otevřít v hlavním rámci (nahradí všechny rámce)',
|
||||
target_blank : 'Otevřít v novém okně',
|
||||
popup : 'Javascript popup',
|
||||
popup_url : 'Popup URL',
|
||||
popup_name : 'Jméno okna',
|
||||
popup_return : 'Vložit \'return false\'',
|
||||
popup_scrollbars : 'Zobrazit posuvníky',
|
||||
popup_statusbar : 'Zobrazit stavový řádek',
|
||||
popup_toolbar : 'Zobrazit nástrojovou lištu',
|
||||
popup_menubar : 'Zobrazit menu',
|
||||
popup_location : 'Zobrazit pole s adresou',
|
||||
popup_resizable : 'Vytvořit okno, které jde zvětšovat/zmenšovat',
|
||||
popup_dependent : 'Závisí (jen pro Mozilla/Firefox)',
|
||||
popup_size : 'Velikost',
|
||||
popup_position : 'Pozice (X/Y)',
|
||||
id : 'Id',
|
||||
style: 'Styl',
|
||||
classes : 'Třídy',
|
||||
target_name : 'Jméno cíle',
|
||||
langdir : 'Jazykové nastavení',
|
||||
target_langcode : 'Cílový jazyk',
|
||||
langcode : 'Kód jazyka',
|
||||
encoding : 'Cílové kódování znaků',
|
||||
mime : 'Cílový MIME typ',
|
||||
rel : 'Vztah stránky k cíli',
|
||||
rev : 'Vztah cíle ke stránce',
|
||||
tabindex : 'Tabulátor',
|
||||
accesskey : 'Přístupové tlačítko',
|
||||
ltr : 'Z leva doprava',
|
||||
rtl : 'Z prava doleva'
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('advlink',{
|
||||
general_tab : 'Generelt',
|
||||
|
|
@ -10,37 +10,37 @@ popup_props : 'Popup egenskaber',
|
|||
event_props : 'Events',
|
||||
advanced_props : 'Advancerede egenskaber',
|
||||
popup_opts : 'Valgmuligheder',
|
||||
anchor_names : 'Bogmærker',
|
||||
target_same : 'Åbn i samme vindue / ramme',
|
||||
target_parent : 'Åbn i overordnet vindue / ramme',
|
||||
target_top : 'Åbn i topramme (erstatter alle rammer)',
|
||||
target_blank : 'Åbn i nyt vindue',
|
||||
anchor_names : 'Bogmærker',
|
||||
target_same : 'Åbn i samme vindue / ramme',
|
||||
target_parent : 'Åbn i overordnet vindue / ramme',
|
||||
target_top : 'Åbn i topramme (erstatter alle rammer)',
|
||||
target_blank : 'Åbn i nyt vindue',
|
||||
popup : 'Javascript popup',
|
||||
popup_url : 'Popup adresse',
|
||||
popup_name : 'Winduets navn',
|
||||
popup_return : 'Indsæt \'return false\'',
|
||||
popup_return : 'Indsæt \'return false\'',
|
||||
popup_scrollbars : 'Vis scrollbar',
|
||||
popup_statusbar : 'Vis statuslinje',
|
||||
popup_toolbar : 'Vis værktøjslinjer',
|
||||
popup_toolbar : 'Vis værktøjslinjer',
|
||||
popup_menubar : 'Vis menulinje',
|
||||
popup_location : 'Vis adresse',
|
||||
popup_resizable : 'Gør vinduet skalerbart',
|
||||
popup_dependent : 'Afhængigt (kun ved Mozilla/Firefox)',
|
||||
popup_size : 'Størrelse',
|
||||
popup_resizable : 'Gør vinduet skalerbart',
|
||||
popup_dependent : 'Afhængigt (kun ved Mozilla/Firefox)',
|
||||
popup_size : 'Størrelse',
|
||||
popup_position : 'Placering (X/Y)',
|
||||
id : 'Id',
|
||||
style: 'Style',
|
||||
classes : 'Klasser',
|
||||
target_name : 'Target navn',
|
||||
langdir : 'Sprogretning',
|
||||
target_langcode : 'Target sprog',
|
||||
langdir : 'Sprogretning',
|
||||
langcode : 'Sprogkode',
|
||||
encoding : 'Target karakterkode',
|
||||
encoding : 'Target tegnkode',
|
||||
mime : 'Target MIME type',
|
||||
rel : 'Relation mellem side og target',
|
||||
rev : 'Relation mellem target og side',
|
||||
tabindex : 'Tabindex',
|
||||
accesskey : 'Adgangsnøgle',
|
||||
ltr : 'Venstre til højre',
|
||||
rtl : 'Højre til venstre'
|
||||
accesskey : 'Genvejstast',
|
||||
ltr : 'Venstre til højre',
|
||||
rtl : 'Højre til venstre'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ popup_menubar : 'Vis meny bar',
|
|||
popup_location : 'Vis location bar',
|
||||
popup_resizable : 'Gjør vinduet skalerbart',
|
||||
popup_dependent : 'Avhengig vindu (Bare i Mozilla/Firefox)',
|
||||
popup_size : 'St&oring;rrelse',
|
||||
popup_size : 'Størrelse',
|
||||
popup_position : 'Posisjon (X/Y)',
|
||||
id : 'Id',
|
||||
style: 'Stil',
|
||||
|
|
@ -44,3 +44,4 @@ accesskey : 'Accesskey',
|
|||
ltr : 'Venstre mot høyre',
|
||||
rtl : 'Høyre mot venstre'
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// NL lang variables
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
tinyMCE.addToLang('advlink',{
|
||||
general_tab : 'Algemeen',
|
||||
popup_tab : 'Popup',
|
||||
events_tab : 'Gebeurtenissen',
|
||||
|
|
|
|||
|
|
@ -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('advlink',{
|
||||
general_tab : '一般',
|
||||
|
|
@ -40,7 +41,7 @@ mime : 'Ŀ
|
|||
rel : '页与目标的关系',
|
||||
rev : '目标与页的关系',
|
||||
tabindex : 'Tabindex',
|
||||
accesskey : 'Accesskey',
|
||||
accesskey : '우쌥숩',
|
||||
ltr : '从左到右',
|
||||
rtl : '从右到左'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
<tr>
|
||||
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{$lang_advlink_popup_statusbar}</label></td>
|
||||
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
|
||||
<td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{$lang_advlink_popup_return}</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('autosave','en,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');function TinyMCE_autosave_getInfo(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_autosave_beforeUnloadHandler(){var msg=tinyMCE.getLang("lang_autosave_unload_msg");var anyDirty=false;for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg;}return;}window.onbeforeunload=TinyMCE_autosave_beforeUnloadHandler;
|
||||
tinyMCE.importPluginLanguagePack('autosave','en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');var TinyMCE_AutoSavePlugin={getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},_beforeUnloadHandler:function(){var n,inst,anyDirty=false,msg=tinyMCE.getLang("lang_autosave_unload_msg");if(tinyMCE.getParam("fullscreen_is_enabled"))return;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg;}return;}};window.onbeforeunload=TinyMCE_AutoSavePlugin._beforeUnloadHandler;tinyMCE.addPlugin("autosave",TinyMCE_AutoSavePlugin);
|
||||
|
|
@ -1,30 +1,48 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('autosave', 'en,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2006/03/22 12:21:21 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_autosave_getInfo() {
|
||||
return {
|
||||
longname : 'Auto save',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('autosave', 'en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br');
|
||||
|
||||
var TinyMCE_AutoSavePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Auto save',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Private plugin internal methods
|
||||
|
||||
_beforeUnloadHandler : function() {
|
||||
var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg");
|
||||
|
||||
if (tinyMCE.getParam("fullscreen_is_enabled"))
|
||||
return;
|
||||
|
||||
for (n in tinyMCE.instances) {
|
||||
inst = tinyMCE.instances[n];
|
||||
|
||||
if (!tinyMCE.isInstance(inst))
|
||||
continue;
|
||||
|
||||
if (inst.isDirty())
|
||||
return msg;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_autosave_beforeUnloadHandler() {
|
||||
var msg = tinyMCE.getLang("lang_autosave_unload_msg");
|
||||
window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler;
|
||||
|
||||
var anyDirty = false;
|
||||
for (var n in tinyMCE.instances) {
|
||||
var inst = tinyMCE.instances[n];
|
||||
if (!tinyMCE.isInstance(inst))
|
||||
continue;
|
||||
|
||||
if (inst.isDirty())
|
||||
return msg;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
window.onbeforeunload = TinyMCE_autosave_beforeUnloadHandler;
|
||||
tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.1 2005/10/18 13:55:41 spocke Exp $
|
||||
* $Id: cs.js,v 1.2 2006/01/11 14:25:47 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
autosave_unload_msg : 'De ændringer, du har lavet, vil gå tabt, hvis du lukker denne side.'
|
||||
autosave_unload_msg : 'De ændringer, du har lavet, vil gå tabt, hvis du lukker denne side.'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
autosave_unload_msg : '如果您离开本页,您所作的修改将会消失。'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.contextMenuIEPopup {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
border: 0px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
|
@ -16,18 +16,14 @@
|
|||
.contextMenuItem, .contextMenuItemOver {
|
||||
}
|
||||
|
||||
.contextMenuItemOver {
|
||||
background-color: #B6BDD2;
|
||||
}
|
||||
|
||||
.contextMenuSeparator {
|
||||
width: 100%;
|
||||
background-color: #D4D0C8;
|
||||
border: 0px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.contextMenuImage, .contextMenuItemDisabled {
|
||||
border: 0px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.contextMenuIcon {
|
||||
|
|
@ -51,10 +47,28 @@
|
|||
.contextMenuText {
|
||||
font-family: Tahoma, Verdana, Arial, Helvetica;
|
||||
font-size: 11px;
|
||||
margin-left: 5px;
|
||||
margin-right: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.contextMenuItemDisabled {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
.contextMenuText a {
|
||||
display: block;
|
||||
line-height: 20px;
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contextMenuText a:hover {
|
||||
background-color: #B6BDD2;
|
||||
text-decoration: none !important;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,187 +1,221 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.29 $
|
||||
* $Date: 2006/02/13 15:09:28 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
//tinyMCE.importPluginLanguagePack('contextmenu', 'en,zh_cn,cs,fa,fr_ca,fr,de,nb');
|
||||
if (!tinyMCE.settings['contextmenu_skip_plugin_css'])
|
||||
//tinyMCE.importPluginLanguagePack('contextmenu', 'en,tr,zh_cn,cs,fa,fr_ca,fr,de,nb');
|
||||
if (!tinyMCE.settings['contextmenu_skip_plugin_css']) {
|
||||
tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/css/contextmenu.css");
|
||||
}
|
||||
|
||||
// Global contextmenu class instance
|
||||
var TinyMCE_contextmenu_contextMenu = null;
|
||||
var TinyMCE_ContextMenuPlugin = {
|
||||
// Private fields
|
||||
_contextMenu : null,
|
||||
|
||||
function TinyMCE_contextmenu_getInfo() {
|
||||
return {
|
||||
longname : 'Context menus',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Context menus',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
initInstance : function(inst) {
|
||||
// Is not working on MSIE 5.0 or Opera no contextmenu event
|
||||
if (tinyMCE.isMSIE5_0 && tinyMCE.isOpera)
|
||||
return;
|
||||
|
||||
TinyMCE_ContextMenuPlugin._contextMenu = new TinyMCE_ContextMenu({
|
||||
commandhandler : "TinyMCE_ContextMenuPlugin._commandHandler",
|
||||
spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif"
|
||||
});
|
||||
|
||||
// Add hide event handles
|
||||
tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_ContextMenuPlugin._hideContextMenu);
|
||||
tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu);
|
||||
tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu);
|
||||
tinyMCE.addEvent(document, "click", TinyMCE_ContextMenuPlugin._hideContextMenu);
|
||||
tinyMCE.addEvent(document, "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu);
|
||||
tinyMCE.addEvent(document, "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu);
|
||||
|
||||
// Attach contextmenu event
|
||||
if (tinyMCE.isGecko) {
|
||||
tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);});
|
||||
} else
|
||||
tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_ContextMenuPlugin._onContextMenu);
|
||||
},
|
||||
|
||||
// Private plugin internal methods
|
||||
|
||||
_onContextMenu : function(e) {
|
||||
var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
|
||||
var targetInst, body;
|
||||
|
||||
// Find instance
|
||||
if ((body = tinyMCE.getParentElement(elm, "body")) != null) {
|
||||
for (var n in tinyMCE.instances) {
|
||||
var inst = tinyMCE.instances[n];
|
||||
if (!tinyMCE.isInstance(inst))
|
||||
continue;
|
||||
|
||||
if (body == inst.getBody()) {
|
||||
targetInst = inst;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst);
|
||||
}
|
||||
},
|
||||
|
||||
_showContextMenu : function(e, inst) {
|
||||
function getAttrib(elm, name) {
|
||||
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
|
||||
}
|
||||
|
||||
var x, y, elm, contextMenu;
|
||||
var pos = tinyMCE.getAbsPosition(inst.iframeElement);
|
||||
|
||||
x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft);
|
||||
y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop);
|
||||
elm = tinyMCE.isMSIE ? e.srcElement : e.target;
|
||||
|
||||
contextMenu = this._contextMenu;
|
||||
contextMenu.inst = inst;
|
||||
|
||||
// Mozilla needs some time
|
||||
window.setTimeout(function () {
|
||||
var theme = tinyMCE.getParam("theme");
|
||||
|
||||
contextMenu.clearAll();
|
||||
var sel = inst.selection.getSelectedText().length != 0 || elm.nodeName == "IMG";
|
||||
|
||||
// Default items
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
|
||||
|
||||
if (sel || (elm ? (elm.nodeName == 'A') || (elm.nodeName == 'IMG') : false)) {
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/link.gif", "$lang_link_desc", inst.hasPlugin("advlink") ? "mceAdvLink" : "mceLink");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/unlink.gif", "$lang_unlink_desc", "unlink", "", (elm ? (elm.nodeName != 'A') && (elm.nodeName != 'IMG') : true));
|
||||
}
|
||||
|
||||
// Get element
|
||||
elm = tinyMCE.getParentElement(elm, "img,table,td" + (inst.hasPlugin("advhr") ? ',hr' : ''));
|
||||
if (elm) {
|
||||
switch (elm.nodeName) {
|
||||
case "IMG":
|
||||
contextMenu.addSeparator();
|
||||
|
||||
// If flash
|
||||
if (tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') != -1)
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
|
||||
else
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", inst.hasPlugin("advimage") ? "mceAdvImage" : "mceImage");
|
||||
break;
|
||||
|
||||
case "HR":
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/advhr/images/advhr.gif", "$lang_insert_advhr_desc", "mceAdvancedHr");
|
||||
break;
|
||||
|
||||
case "TABLE":
|
||||
case "TD":
|
||||
// Is table plugin loaded
|
||||
if (inst.hasPlugin("table")) {
|
||||
var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan");
|
||||
var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan");
|
||||
|
||||
colspan = colspan == "" ? "1" : colspan;
|
||||
rowspan = rowspan == "" ? "1" : rowspan;
|
||||
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null);
|
||||
|
||||
/* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyleft.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifycenter.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyright.gif", "$lang_justifyright_desc", "JustifyRight", "", false);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyfull.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete.gif", "$lang_table_del", "mceTableDelete");
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_row_before_desc", "mceTableInsertRowBefore");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_row_after_desc", "mceTableInsertRowAfter");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow");
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_col_before_desc", "mceTableInsertColBefore");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_col_after_desc", "mceTableInsertColAfter");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol");
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1"));
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Add table specific
|
||||
if (inst.hasPlugin("table")) {
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
|
||||
}
|
||||
}
|
||||
|
||||
contextMenu.show(x, y);
|
||||
}, 10);
|
||||
|
||||
// Cancel default handeling
|
||||
tinyMCE.cancelEvent(e);
|
||||
return false;
|
||||
},
|
||||
|
||||
_hideContextMenu : function() {
|
||||
if (TinyMCE_ContextMenuPlugin._contextMenu)
|
||||
TinyMCE_ContextMenuPlugin._contextMenu.hide();
|
||||
},
|
||||
|
||||
_commandHandler : function(command, value) {
|
||||
var cm = TinyMCE_ContextMenuPlugin._contextMenu;
|
||||
|
||||
cm.hide();
|
||||
|
||||
// UI must be true on these
|
||||
var ui = false;
|
||||
if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells")
|
||||
ui = true;
|
||||
|
||||
if (command == "Paste")
|
||||
value = null;
|
||||
|
||||
if (tinyMCE.getParam("dialog_type") == "modal" && tinyMCE.isMSIE) {
|
||||
// Cell properties will generate access denied error is this isn't done?!
|
||||
window.setTimeout(function() {
|
||||
cm.inst.execCommand(command, ui, value);
|
||||
}, 100);
|
||||
} else
|
||||
cm.inst.execCommand(command, ui, value);
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_contextmenu_initInstance(inst) {
|
||||
// Is not working on MSIE 5.0 or Opera no contextmenu event
|
||||
if (tinyMCE.isMSIE5_0 && tinyMCE.isOpera)
|
||||
return;
|
||||
|
||||
// Add hide event handles
|
||||
tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_contextmenu_hideContextMenu);
|
||||
tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_contextmenu_hideContextMenu);
|
||||
tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_contextmenu_hideContextMenu);
|
||||
tinyMCE.addEvent(document, "click", TinyMCE_contextmenu_hideContextMenu);
|
||||
tinyMCE.addEvent(document, "keypress", TinyMCE_contextmenu_hideContextMenu);
|
||||
tinyMCE.addEvent(document, "keydown", TinyMCE_contextmenu_hideContextMenu);
|
||||
|
||||
var contextMenu = new ContextMenu({
|
||||
commandhandler : "TinyMCE_contextmenu_commandHandler",
|
||||
spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif"
|
||||
});
|
||||
|
||||
// Register global reference
|
||||
TinyMCE_contextmenu_contextMenu = contextMenu;
|
||||
|
||||
// Attach contextmenu event
|
||||
if (tinyMCE.isGecko) {
|
||||
tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);});
|
||||
} else
|
||||
tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_contextmenu_onContextMenu);
|
||||
}
|
||||
|
||||
function TinyMCE_contextmenu_onContextMenu(e) {
|
||||
var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
|
||||
var targetInst, body;
|
||||
|
||||
// Find instance
|
||||
if ((body = tinyMCE.getParentElement(elm, "body")) != null) {
|
||||
for (var n in tinyMCE.instances) {
|
||||
var inst = tinyMCE.instances[n];
|
||||
if (!tinyMCE.isInstance(inst))
|
||||
continue;
|
||||
|
||||
if (body == inst.getBody()) {
|
||||
targetInst = inst;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst);
|
||||
}
|
||||
}
|
||||
|
||||
function TinyMCE_contextmenu_showContextMenu(e, inst) {
|
||||
function getAttrib(elm, name) {
|
||||
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
|
||||
}
|
||||
|
||||
var x, y, elm, contextMenu;
|
||||
var pos = tinyMCE.getAbsPosition(inst.iframeElement);
|
||||
|
||||
x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft);
|
||||
y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop);
|
||||
elm = tinyMCE.isMSIE ? e.srcElement : e.target;
|
||||
contextMenu = TinyMCE_contextmenu_contextMenu;
|
||||
contextMenu.inst = inst;
|
||||
|
||||
// Mozilla needs some time
|
||||
window.setTimeout(function () {
|
||||
var theme = tinyMCE.getParam("theme");
|
||||
|
||||
contextMenu.clearAll();
|
||||
var sel = inst.getSelectedText().length != 0 || elm.nodeName == "IMG";
|
||||
|
||||
// Default items
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
|
||||
|
||||
// Get element
|
||||
elm = tinyMCE.getParentElement(elm, "img,table,td");
|
||||
if (elm) {
|
||||
switch (elm.nodeName) {
|
||||
case "IMG":
|
||||
contextMenu.addSeparator();
|
||||
|
||||
// If flash
|
||||
if (tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') == 0)
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
|
||||
else
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", typeof(TinyMCE_advimage_getControlHTML) != "undefined" ? "mceAdvImage" : "mceImage");
|
||||
break;
|
||||
|
||||
case "TABLE":
|
||||
case "TD":
|
||||
// Is table plugin loaded
|
||||
if (typeof(TinyMCE_table_getControlHTML) != "undefined") {
|
||||
var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan");
|
||||
var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan");
|
||||
|
||||
colspan = colspan == "" ? "1" : colspan;
|
||||
rowspan = rowspan == "" ? "1" : rowspan;
|
||||
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null);
|
||||
|
||||
/* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyleft.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifycenter.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyright.gif", "$lang_justifyright_desc", "JustifyRight", "", false);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyfull.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete.gif", "$lang_table_del", "mceTableDelete");
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_row_before_desc", "mceTableInsertRowBefore");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_row_after_desc", "mceTableInsertRowAfter");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow");
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_col_before_desc", "mceTableInsertColBefore");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_col_after_desc", "mceTableInsertColAfter");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol");
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1"));
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Add table specific
|
||||
if (typeof(TinyMCE_table_getControlHTML) != "undefined") {
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
|
||||
}
|
||||
}
|
||||
|
||||
contextMenu.show(x, y);
|
||||
}, 10);
|
||||
|
||||
// Cancel default handeling
|
||||
tinyMCE.cancelEvent(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_contextmenu_hideContextMenu() {
|
||||
TinyMCE_contextmenu_contextMenu.hide();
|
||||
}
|
||||
|
||||
function TinyMCE_contextmenu_commandHandler(command, value) {
|
||||
TinyMCE_contextmenu_contextMenu.hide();
|
||||
|
||||
// UI must be true on these
|
||||
var ui = false;
|
||||
if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells")
|
||||
ui = true;
|
||||
|
||||
if (command == "Paste")
|
||||
value = null;
|
||||
|
||||
TinyMCE_contextmenu_contextMenu.inst.execCommand(command, ui, value);
|
||||
}
|
||||
tinyMCE.addPlugin("contextmenu", TinyMCE_ContextMenuPlugin);
|
||||
|
||||
// Context menu class
|
||||
|
||||
function ContextMenu(settings) {
|
||||
function TinyMCE_ContextMenu(settings) {
|
||||
// Default value function
|
||||
function defParam(key, def_val) {
|
||||
settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val;
|
||||
|
|
@ -198,8 +232,8 @@ function ContextMenu(settings) {
|
|||
this.contextMenuDiv.style.display = "none";
|
||||
this.contextMenuDiv.style.position = 'absolute';
|
||||
this.contextMenuDiv.style.zindex = 1000;
|
||||
this.contextMenuDiv.style.left = '0px';
|
||||
this.contextMenuDiv.style.top = '0px';
|
||||
this.contextMenuDiv.style.left = '0';
|
||||
this.contextMenuDiv.style.top = '0';
|
||||
this.contextMenuDiv.unselectable = "on";
|
||||
|
||||
document.body.appendChild(this.contextMenuDiv);
|
||||
|
|
@ -222,88 +256,92 @@ function ContextMenu(settings) {
|
|||
}
|
||||
};
|
||||
|
||||
ContextMenu.prototype.clearAll = function() {
|
||||
this.html = "";
|
||||
this.contextMenuDiv.innerHTML = "";
|
||||
};
|
||||
TinyMCE_ContextMenu.prototype = {
|
||||
clearAll : function() {
|
||||
this.html = "";
|
||||
this.contextMenuDiv.innerHTML = "";
|
||||
},
|
||||
|
||||
ContextMenu.prototype.addSeparator = function() {
|
||||
this.html += '<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="' + this.settings['spacer_image'] + '" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="' + this.settings['spacer_image'] + '" /></td></tr>';
|
||||
};
|
||||
addSeparator : function() {
|
||||
this.html += '<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="' + this.settings['spacer_image'] + '" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="' + this.settings['spacer_image'] + '" /></td></tr>';
|
||||
},
|
||||
|
||||
ContextMenu.prototype.addItem = function(icon, title, command, value, disabled) {
|
||||
if (title.charAt(0) == '$')
|
||||
title = tinyMCE.getLang(title.substring(1));
|
||||
addItem : function(icon, title, command, value, disabled) {
|
||||
if (title.charAt(0) == '$')
|
||||
title = tinyMCE.getLang(title.substring(1));
|
||||
|
||||
var onMouseDown = '';
|
||||
var html = '';
|
||||
var onMouseDown = '';
|
||||
var html = '';
|
||||
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
|
||||
onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;';
|
||||
else
|
||||
onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;';
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
|
||||
onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;';
|
||||
else
|
||||
onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;';
|
||||
|
||||
if (icon == "")
|
||||
icon = this.settings['spacer_image'];
|
||||
if (icon == "")
|
||||
icon = this.settings['spacer_image'];
|
||||
|
||||
if (!disabled)
|
||||
html += '<tr class="contextMenuItem" onmousedown="' + onMouseDown + '" onmouseover="tinyMCE.switchClass(this,\'contextMenuItemOver\');" onmouseout="tinyMCE.switchClass(this,\'contextMenuItem\');">';
|
||||
else
|
||||
html += '<tr class="contextMenuItemDisabled">';
|
||||
if (!disabled)
|
||||
html += '<tr class="contextMenuItem">';
|
||||
else
|
||||
html += '<tr class="contextMenuItemDisabled">';
|
||||
|
||||
html += '<td class="contextMenuIcon"><img src="' + icon + '" width="20" height="20" class="contextMenuImage" /></td>';
|
||||
html += '<td><div class="contextMenuText">';
|
||||
html += '<td class="contextMenuIcon"><img src="' + icon + '" width="20" height="20" class="contextMenuImage" /></td>';
|
||||
html += '<td><div class="contextMenuText">';
|
||||
html += '<a href="javascript:void(0);" onclick="' + onMouseDown + '" onmousedown="return false;"> ';
|
||||
|
||||
// Add text
|
||||
html += title;
|
||||
// Add text
|
||||
html += title;
|
||||
|
||||
html += '</div></td>';
|
||||
html += '</tr>';
|
||||
html += ' </a>';
|
||||
html += '</div></td>';
|
||||
html += '</tr>';
|
||||
|
||||
// Add to main
|
||||
this.html += html;
|
||||
};
|
||||
// Add to main
|
||||
this.html += html;
|
||||
},
|
||||
|
||||
ContextMenu.prototype.show = function(x, y) {
|
||||
if (this.html == "")
|
||||
return;
|
||||
show : function(x, y) {
|
||||
if (this.html == "")
|
||||
return;
|
||||
|
||||
var html = '';
|
||||
var html = '';
|
||||
|
||||
html += '<table border="0" cellpadding="0" cellspacing="0">';
|
||||
html += this.html;
|
||||
html += '</table>';
|
||||
html += '<a href="#"></a><table border="0" cellpadding="0" cellspacing="0">';
|
||||
html += this.html;
|
||||
html += '</table>';
|
||||
|
||||
this.contextMenuDiv.innerHTML = html;
|
||||
this.contextMenuDiv.innerHTML = html;
|
||||
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) {
|
||||
var width, height;
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) {
|
||||
var width, height;
|
||||
|
||||
// Get dimensions
|
||||
this.contextMenuDiv.style.display = "block";
|
||||
width = this.contextMenuDiv.offsetWidth;
|
||||
height = this.contextMenuDiv.offsetHeight;
|
||||
this.contextMenuDiv.style.display = "none";
|
||||
// Get dimensions
|
||||
this.contextMenuDiv.style.display = "block";
|
||||
width = this.contextMenuDiv.offsetWidth;
|
||||
height = this.contextMenuDiv.offsetHeight;
|
||||
this.contextMenuDiv.style.display = "none";
|
||||
|
||||
// Setup popup and show
|
||||
this.pop.document.body.innerHTML = '<div class="contextMenu">' + html + "</div>";
|
||||
this.pop.document.tinyMCE = tinyMCE;
|
||||
this.pop.document.contextMenu = this;
|
||||
this.pop.show(x, y, width, height);
|
||||
} else {
|
||||
this.contextMenuDiv.style.left = x + 'px';
|
||||
this.contextMenuDiv.style.top = y + 'px';
|
||||
this.contextMenuDiv.style.display = "block";
|
||||
// Setup popup and show
|
||||
this.pop.document.body.innerHTML = '<div class="contextMenu">' + html + "</div>";
|
||||
this.pop.document.tinyMCE = tinyMCE;
|
||||
this.pop.document.contextMenu = this;
|
||||
this.pop.show(x, y, width, height);
|
||||
} else {
|
||||
this.contextMenuDiv.style.left = x + 'px';
|
||||
this.contextMenuDiv.style.top = y + 'px';
|
||||
this.contextMenuDiv.style.display = "block";
|
||||
}
|
||||
},
|
||||
|
||||
hide : function() {
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera)
|
||||
this.pop.hide();
|
||||
else
|
||||
this.contextMenuDiv.style.display = "none";
|
||||
},
|
||||
|
||||
execCommand : function(command, value) {
|
||||
eval(this.settings['commandhandler'] + "(command, value);");
|
||||
}
|
||||
};
|
||||
|
||||
ContextMenu.prototype.hide = function() {
|
||||
if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera)
|
||||
this.pop.hide();
|
||||
else
|
||||
this.contextMenuDiv.style.display = "none";
|
||||
};
|
||||
|
||||
ContextMenu.prototype.execCommand = function(command, value) {
|
||||
eval(this.settings['commandhandler'] + "(command, value);");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('directionality','en,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');function TinyMCE_directionality_getInfo(){return{longname:'Directionality',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_directionality_getControlHTML(control_name){switch(control_name){case "ltr":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionLTR\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_ltr" src="{$pluginurl}/images/ltr.gif" title="{$lang_directionality_ltr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';case "rtl":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionRTL\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_rtl" src="{$pluginurl}/images/rtl.gif" title="{$lang_directionality_rtl_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_directionality_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case "mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true;}return false;}function TinyMCE_directionality_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonNormal',false);if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm){tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonDisabled',true);return;}var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClassSticky(editor_id+'_ltr','mceButtonSelected',false);else tinyMCE.switchClassSticky(editor_id+'_rtl','mceButtonSelected',false);return true;}
|
||||
tinyMCE.importPluginLanguagePack('directionality','en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_DirectionalityPlugin={getInfo:function(){return{longname:'Directionality',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"ltr":return tinyMCE.getButtonHTML(cn,'lang_directionality_ltr_desc','{$pluginurl}/images/ltr.gif','mceDirectionLTR');case"rtl":return tinyMCE.getButtonHTML(cn,'lang_directionality_rtl_desc','{$pluginurl}/images/rtl.gif','mceDirectionRTL');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case"mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true;}return false;},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm){tinyMCE.switchClass(editor_id+'_ltr','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_rtl','mceButtonDisabled');return true;}tinyMCE.switchClass(editor_id+'_ltr','mceButtonNormal');tinyMCE.switchClass(editor_id+'_rtl','mceButtonNormal');var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClass(editor_id+'_ltr','mceButtonSelected');else tinyMCE.switchClass(editor_id+'_rtl','mceButtonSelected');return true;}};tinyMCE.addPlugin("directionality",TinyMCE_DirectionalityPlugin);
|
||||
|
|
@ -1,81 +1,92 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('directionality', 'en,sv,fr_ca,zh_cn,cs,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/02/10 21:34:28 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_directionality_getInfo() {
|
||||
return {
|
||||
longname : 'Directionality',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('directionality', 'en,tr,sv,fr_ca,zh_cn,cs,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,pl,nl,fr,pt_br');
|
||||
|
||||
var TinyMCE_DirectionalityPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Directionality',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "ltr":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_directionality_ltr_desc', '{$pluginurl}/images/ltr.gif', 'mceDirectionLTR');
|
||||
|
||||
case "rtl":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_directionality_rtl_desc', '{$pluginurl}/images/rtl.gif', 'mceDirectionRTL');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceDirectionLTR":
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
|
||||
if (elm)
|
||||
elm.setAttribute("dir", "ltr");
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
return true;
|
||||
|
||||
case "mceDirectionRTL":
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
|
||||
if (elm)
|
||||
elm.setAttribute("dir", "rtl");
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
function getAttrib(elm, name) {
|
||||
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
|
||||
}
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
if (!elm) {
|
||||
tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonDisabled');
|
||||
tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonDisabled');
|
||||
return true;
|
||||
}
|
||||
|
||||
tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonNormal');
|
||||
tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonNormal');
|
||||
|
||||
var dir = getAttrib(elm, "dir");
|
||||
if (dir == "ltr" || dir == "")
|
||||
tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonSelected');
|
||||
else
|
||||
tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonSelected');
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_directionality_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "ltr":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionLTR\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_ltr" src="{$pluginurl}/images/ltr.gif" title="{$lang_directionality_ltr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
|
||||
case "rtl":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionRTL\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_rtl" src="{$pluginurl}/images/rtl.gif" title="{$lang_directionality_rtl_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function TinyMCE_directionality_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceDirectionLTR":
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
|
||||
if (elm)
|
||||
elm.setAttribute("dir", "ltr");
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
return true;
|
||||
|
||||
case "mceDirectionRTL":
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
|
||||
if (elm)
|
||||
elm.setAttribute("dir", "rtl");
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_directionality_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
function getAttrib(elm, name) {
|
||||
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
|
||||
}
|
||||
|
||||
tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonNormal', false);
|
||||
tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonNormal', false);
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
|
||||
if (!elm) {
|
||||
tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonDisabled', true);
|
||||
tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonDisabled', true);
|
||||
return;
|
||||
}
|
||||
|
||||
var dir = getAttrib(elm, "dir");
|
||||
if (dir == "ltr" || dir == "")
|
||||
tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonSelected', false);
|
||||
else
|
||||
tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonSelected', false);
|
||||
|
||||
return true;
|
||||
}
|
||||
tinyMCE.addPlugin("directionality", TinyMCE_DirectionalityPlugin);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.1 2005/10/18 13:55:41 spocke Exp $
|
||||
* $Id: cs.js,v 1.2 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('',{
|
||||
directionality_ltr_desc : 'Retning - venstre mod højre',
|
||||
directionality_rtl_desc : 'Retning - højre mod venstre'
|
||||
directionality_ltr_desc : 'Retning - venstre mod højre',
|
||||
directionality_rtl_desc : 'Retning - højre mod venstre'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
directionality_ltr_desc : '方向从左往右',
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('emotions','en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_emotions_getInfo(){return{longname:'Emotions',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_emotions_getControlHTML(control_name){switch(control_name){case "emotions":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_emotions_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=160;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('emotions','en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"emotions":return tinyMCE.getButtonHTML(cn,'lang_emotions_desc','{$pluginurl}/images/emotions.gif','mceEmotion');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=160;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;}return false;}};tinyMCE.addPlugin('emotions',TinyMCE_EmotionsPlugin);
|
||||
|
|
@ -1,51 +1,65 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('emotions', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.23 $
|
||||
* $Date: 2006/02/10 16:29:38 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_emotions_getInfo() {
|
||||
return {
|
||||
longname : 'Emotions',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('emotions', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
// Plucin static class
|
||||
var TinyMCE_EmotionsPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Emotions',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the emotions control.
|
||||
*/
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "emotions":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the mceEmotion command.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceEmotion":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
|
||||
template['width'] = 160;
|
||||
template['height'] = 160;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the emotions control.
|
||||
*/
|
||||
function TinyMCE_emotions_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "emotions":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the mceEmotion command.
|
||||
*/
|
||||
function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceEmotion":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
|
||||
template['width'] = 160;
|
||||
template['height'] = 160;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
// Register plugin
|
||||
tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin);
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 319 B |
|
|
@ -12,9 +12,9 @@ function insertEmotion(file_name, title) {
|
|||
title = title.replace(/&/g, '&');
|
||||
title = title.replace(/\"/g, '"');
|
||||
title = title.replace(/</g, '<');
|
||||
title = title.replace(/>/g, '&gr;');
|
||||
title = title.replace(/>/g, '>');
|
||||
|
||||
var html = '<img src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" mce_src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" border="0" alt="' + title + '" />';
|
||||
var html = '<img src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" mce_src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" border="0" alt="' + title + '" title="' + title + '" />';
|
||||
|
||||
tinyMCE.execCommand('mceInsertContent', false, html);
|
||||
tinyMCEPopup.close();
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('emotions',{
|
||||
title : 'Indsæt smiley',
|
||||
title : 'Indsæt smiley',
|
||||
desc : 'Smileys',
|
||||
cool : 'Cool',
|
||||
cry : 'Gråd',
|
||||
cool : 'Sej',
|
||||
cry : 'Gråd',
|
||||
embarassed : 'Forlegen',
|
||||
foot_in_mouth : 'Foden i munden',
|
||||
frown : 'Rynket pande',
|
||||
innocent : 'Uskyldig',
|
||||
kiss : 'Kys',
|
||||
laughing : 'Latter',
|
||||
money_mouth : 'Lækker mund',
|
||||
money_mouth : 'Lækker mund',
|
||||
sealed : 'Lukket af',
|
||||
smile : 'Smil',
|
||||
surprised : 'Overrasket',
|
||||
tongue_out : 'Ræk tunge',
|
||||
tongue_out : 'Ræk tunge',
|
||||
undecided : 'Usikker',
|
||||
wink : 'Blink',
|
||||
yell : 'Råb'
|
||||
yell : 'Råb'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
// 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('emotions',{
|
||||
title : '²åÈë±íÇé',
|
||||
desc : '񡀂',
|
||||
cool : 'Cool',
|
||||
cry : 'Cry',
|
||||
embarassed : 'Embarassed',
|
||||
cool : '酷',
|
||||
cry : '哭',
|
||||
embarassed : '尴尬',
|
||||
foot_in_mouth : 'Foot in mouth',
|
||||
frown : 'Frown',
|
||||
innocent : 'Innocent',
|
||||
kiss : 'Kiss',
|
||||
laughing : 'Laughing',
|
||||
frown : '皱眉',
|
||||
innocent : '无辜',
|
||||
kiss : '亲吻',
|
||||
laughing : '大笑',
|
||||
money_mouth : 'Money mouth',
|
||||
sealed : 'Sealed',
|
||||
smile : 'Smile',
|
||||
surprised : 'Surprised',
|
||||
tongue_out : 'Tongue out',
|
||||
undecided : 'Undecided',
|
||||
wink : 'Wink',
|
||||
yell : 'Yell'
|
||||
sealed : '保密',
|
||||
smile : '微笑',
|
||||
surprised : '惊讶',
|
||||
tongue_out : '吐舌',
|
||||
undecided : '犹豫',
|
||||
wink : '眨眼',
|
||||
yell : '大叫'
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,123 +1,103 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.34 $
|
||||
* $Date: 2006/02/10 16:29:39 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('flash', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk,pt_br');
|
||||
tinyMCE.importPluginLanguagePack('flash', 'en,tr,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk,pt_br');
|
||||
|
||||
function TinyMCE_flash_getInfo() {
|
||||
return {
|
||||
longname : 'Flash',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_flash.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
};
|
||||
var TinyMCE_FlashPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Flash',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_flash.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
function TinyMCE_flash_initInstance(inst) {
|
||||
if (!tinyMCE.settings['flash_skip_plugin_css'])
|
||||
tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/flash/css/content.css");
|
||||
}
|
||||
initInstance : function(inst) {
|
||||
if (!tinyMCE.settings['flash_skip_plugin_css'])
|
||||
tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/flash/css/content.css");
|
||||
},
|
||||
|
||||
function TinyMCE_flash_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "flash":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFlash\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_flash" src="{$pluginurl}/images/flash.gif" title="{$lang_flash_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "flash":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_flash_desc', '{$pluginurl}/images/flash.gif', 'mceFlash');
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
function TinyMCE_flash_parseAttributes(attribute_string) {
|
||||
var attributeName = "";
|
||||
var attributeValue = "";
|
||||
var withInName;
|
||||
var withInValue;
|
||||
var attributes = new Array();
|
||||
var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceFlash":
|
||||
var name = "", swffile = "", swfwidth = "", swfheight = "", action = "insert";
|
||||
var template = new Array();
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var focusElm = inst.getFocusElement();
|
||||
|
||||
if (attribute_string == null || attribute_string.length < 2)
|
||||
return null;
|
||||
template['file'] = '../../plugins/flash/flash.htm'; // Relative to theme
|
||||
template['width'] = 430;
|
||||
template['height'] = 175;
|
||||
|
||||
withInName = withInValue = false;
|
||||
template['width'] += tinyMCE.getLang('lang_flash_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_flash_delta_height', 0);
|
||||
|
||||
for (var i=0; i<attribute_string.length; i++) {
|
||||
var chr = attribute_string.charAt(i);
|
||||
// Is selection a image
|
||||
if (focusElm != null && focusElm.nodeName.toLowerCase() == "img") {
|
||||
name = tinyMCE.getAttrib(focusElm, 'class');
|
||||
|
||||
if ((chr == '"' || chr == "'") && !withInValue)
|
||||
withInValue = true;
|
||||
else if ((chr == '"' || chr == "'") && withInValue) {
|
||||
withInValue = false;
|
||||
if (name.indexOf('mceItemFlash') == -1) // Not a Flash
|
||||
return true;
|
||||
|
||||
var pos = attributeName.lastIndexOf(' ');
|
||||
if (pos != -1)
|
||||
attributeName = attributeName.substring(pos+1);
|
||||
// Get rest of Flash items
|
||||
swffile = tinyMCE.getAttrib(focusElm, 'alt');
|
||||
|
||||
attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
swffile = eval(tinyMCE.settings['urlconverter_callback'] + "(swffile, null, true);");
|
||||
|
||||
attributeName = "";
|
||||
attributeValue = "";
|
||||
} else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
|
||||
withInName = true;
|
||||
swfwidth = tinyMCE.getAttrib(focusElm, 'width');
|
||||
swfheight = tinyMCE.getAttrib(focusElm, 'height');
|
||||
action = "update";
|
||||
}
|
||||
|
||||
if (chr == '=' && withInName)
|
||||
withInName = false;
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", swffile : swffile, swfwidth : swfwidth, swfheight : swfheight, action : action});
|
||||
return true;
|
||||
}
|
||||
|
||||
if (withInName)
|
||||
attributeName += chr;
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
if (withInValue)
|
||||
attributeValue += chr;
|
||||
}
|
||||
cleanup : function(type, content) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
// Force relative/absolute
|
||||
if (tinyMCE.getParam('convert_urls')) {
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
|
||||
var src = tinyMCE.getAttrib(imgs[i], "alt");
|
||||
|
||||
return attributes;
|
||||
}
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
|
||||
function TinyMCE_flash_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceFlash":
|
||||
var name = "", swffile = "", swfwidth = "", swfheight = "", action = "insert";
|
||||
var template = new Array();
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
var focusElm = inst.getFocusElement();
|
||||
imgs[i].setAttribute('alt', src);
|
||||
imgs[i].setAttribute('title', src);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
template['file'] = '../../plugins/flash/flash.htm'; // Relative to theme
|
||||
template['width'] = 430;
|
||||
template['height'] = 175;
|
||||
|
||||
template['width'] += tinyMCE.getLang('lang_flash_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_flash_delta_height', 0);
|
||||
|
||||
// Is selection a image
|
||||
if (focusElm != null && focusElm.nodeName.toLowerCase() == "img") {
|
||||
name = tinyMCE.getAttrib(focusElm, 'class');
|
||||
|
||||
if (name.indexOf('mceItemFlash') == -1) // Not a Flash
|
||||
return true;
|
||||
|
||||
// Get rest of Flash items
|
||||
swffile = tinyMCE.getAttrib(focusElm, 'alt');
|
||||
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
swffile = eval(tinyMCE.settings['urlconverter_callback'] + "(swffile, null, true);");
|
||||
|
||||
swfwidth = tinyMCE.getAttrib(focusElm, 'width');
|
||||
swfheight = tinyMCE.getAttrib(focusElm, 'height');
|
||||
action = "update";
|
||||
}
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", swffile : swffile, swfwidth : swfwidth, swfheight : swfheight, action : action});
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_flash_cleanup(type, content) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
// Force relative/absolute
|
||||
if (tinyMCE.getParam('convert_urls')) {
|
||||
case "get_from_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
|
||||
|
|
@ -130,141 +110,178 @@ function TinyMCE_flash_cleanup(type, content) {
|
|||
imgs[i].setAttribute('title', src);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
|
||||
var src = tinyMCE.getAttrib(imgs[i], "alt");
|
||||
case "insert_to_editor":
|
||||
var startPos = 0;
|
||||
var embedList = new Array();
|
||||
|
||||
if (tinyMCE.getParam('convert_urls'))
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
// Fix the embed and object elements
|
||||
content = content.replace(new RegExp('<[ ]*embed','gi'),'<embed');
|
||||
content = content.replace(new RegExp('<[ ]*/embed[ ]*>','gi'),'</embed>');
|
||||
content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
|
||||
content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
|
||||
|
||||
imgs[i].setAttribute('alt', src);
|
||||
imgs[i].setAttribute('title', src);
|
||||
// Parse all embed tags
|
||||
while ((startPos = content.indexOf('<embed', startPos+1)) != -1) {
|
||||
var endPos = content.indexOf('>', startPos);
|
||||
var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 6, endPos));
|
||||
embedList[embedList.length] = attribs;
|
||||
}
|
||||
|
||||
// Parse all object tags and replace them with images from the embed data
|
||||
var index = 0;
|
||||
while ((startPos = content.indexOf('<object', startPos)) != -1) {
|
||||
if (index >= embedList.length)
|
||||
break;
|
||||
|
||||
var attribs = embedList[index];
|
||||
|
||||
// Find end of object
|
||||
endPos = content.indexOf('</object>', startPos);
|
||||
endPos += 9;
|
||||
|
||||
// Insert image
|
||||
var contentAfter = content.substring(endPos);
|
||||
content = content.substring(0, startPos);
|
||||
content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
|
||||
content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
|
||||
content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
|
||||
content += contentAfter;
|
||||
index++;
|
||||
|
||||
startPos++;
|
||||
}
|
||||
|
||||
// Parse all embed tags and replace them with images from the embed data
|
||||
var index = 0;
|
||||
while ((startPos = content.indexOf('<embed', startPos)) != -1) {
|
||||
if (index >= embedList.length)
|
||||
break;
|
||||
|
||||
var attribs = embedList[index];
|
||||
|
||||
// Find end of embed
|
||||
endPos = content.indexOf('>', startPos);
|
||||
endPos += 9;
|
||||
|
||||
// Insert image
|
||||
var contentAfter = content.substring(endPos);
|
||||
content = content.substring(0, startPos);
|
||||
content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
|
||||
content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
|
||||
content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
|
||||
content += contentAfter;
|
||||
index++;
|
||||
|
||||
startPos++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "get_from_editor":
|
||||
// Parse all img tags and replace them with object+embed
|
||||
var startPos = -1;
|
||||
|
||||
while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
|
||||
var endPos = content.indexOf('/>', startPos);
|
||||
var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 4, endPos));
|
||||
|
||||
// Is not flash, skip it
|
||||
if (attribs['class'] != "mceItemFlash")
|
||||
continue;
|
||||
|
||||
endPos += 2;
|
||||
|
||||
var embedHTML = '';
|
||||
var wmode = tinyMCE.getParam("flash_wmode", "");
|
||||
var quality = tinyMCE.getParam("flash_quality", "high");
|
||||
var menu = tinyMCE.getParam("flash_menu", "false");
|
||||
|
||||
// Insert object + embed
|
||||
embedHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
|
||||
embedHTML += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"';
|
||||
embedHTML += ' width="' + attribs["width"] + '" height="' + attribs["height"] + '">';
|
||||
embedHTML += '<param name="movie" value="' + attribs["title"] + '" />';
|
||||
embedHTML += '<param name="quality" value="' + quality + '" />';
|
||||
embedHTML += '<param name="menu" value="' + menu + '" />';
|
||||
embedHTML += '<param name="wmode" value="' + wmode + '" />';
|
||||
embedHTML += '<embed src="' + attribs["title"] + '" wmode="' + wmode + '" quality="' + quality + '" menu="' + menu + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + attribs["width"] + '" height="' + attribs["height"] + '"></embed></object>';
|
||||
|
||||
// Insert embed/object chunk
|
||||
chunkBefore = content.substring(0, startPos);
|
||||
chunkAfter = content.substring(endPos);
|
||||
content = chunkBefore + embedHTML + chunkAfter;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Pass through to next handler in chain
|
||||
return content;
|
||||
},
|
||||
|
||||
handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItemFlash') == 0) {
|
||||
tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
case "insert_to_editor":
|
||||
var startPos = 0;
|
||||
var embedList = new Array();
|
||||
tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
|
||||
|
||||
// Fix the embed and object elements
|
||||
content = content.replace(new RegExp('<[ ]*embed','gi'),'<embed');
|
||||
content = content.replace(new RegExp('<[ ]*/embed[ ]*>','gi'),'</embed>');
|
||||
content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
|
||||
content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
|
||||
return true;
|
||||
},
|
||||
|
||||
// Parse all embed tags
|
||||
while ((startPos = content.indexOf('<embed', startPos+1)) != -1) {
|
||||
var endPos = content.indexOf('>', startPos);
|
||||
var attribs = TinyMCE_flash_parseAttributes(content.substring(startPos + 6, endPos));
|
||||
embedList[embedList.length] = attribs;
|
||||
}
|
||||
// Private plugin internal functions
|
||||
|
||||
// Parse all object tags and replace them with images from the embed data
|
||||
var index = 0;
|
||||
while ((startPos = content.indexOf('<object', startPos)) != -1) {
|
||||
if (index >= embedList.length)
|
||||
break;
|
||||
_parseAttributes : function(attribute_string) {
|
||||
var attributeName = "";
|
||||
var attributeValue = "";
|
||||
var withInName;
|
||||
var withInValue;
|
||||
var attributes = new Array();
|
||||
var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
|
||||
|
||||
var attribs = embedList[index];
|
||||
if (attribute_string == null || attribute_string.length < 2)
|
||||
return null;
|
||||
|
||||
// Find end of object
|
||||
endPos = content.indexOf('</object>', startPos);
|
||||
endPos += 9;
|
||||
withInName = withInValue = false;
|
||||
|
||||
// Insert image
|
||||
var contentAfter = content.substring(endPos);
|
||||
content = content.substring(0, startPos);
|
||||
content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
|
||||
content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
|
||||
content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
|
||||
content += contentAfter;
|
||||
index++;
|
||||
for (var i=0; i<attribute_string.length; i++) {
|
||||
var chr = attribute_string.charAt(i);
|
||||
|
||||
startPos++;
|
||||
}
|
||||
if ((chr == '"' || chr == "'") && !withInValue)
|
||||
withInValue = true;
|
||||
else if ((chr == '"' || chr == "'") && withInValue) {
|
||||
withInValue = false;
|
||||
|
||||
// Parse all embed tags and replace them with images from the embed data
|
||||
var index = 0;
|
||||
while ((startPos = content.indexOf('<embed', startPos)) != -1) {
|
||||
if (index >= embedList.length)
|
||||
break;
|
||||
var pos = attributeName.lastIndexOf(' ');
|
||||
if (pos != -1)
|
||||
attributeName = attributeName.substring(pos+1);
|
||||
|
||||
var attribs = embedList[index];
|
||||
attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
|
||||
|
||||
// Find end of embed
|
||||
endPos = content.indexOf('>', startPos);
|
||||
endPos += 9;
|
||||
attributeName = "";
|
||||
attributeValue = "";
|
||||
} else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
|
||||
withInName = true;
|
||||
|
||||
// Insert image
|
||||
var contentAfter = content.substring(endPos);
|
||||
content = content.substring(0, startPos);
|
||||
content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
|
||||
content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
|
||||
content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
|
||||
content += contentAfter;
|
||||
index++;
|
||||
if (chr == '=' && withInName)
|
||||
withInName = false;
|
||||
|
||||
startPos++;
|
||||
}
|
||||
if (withInName)
|
||||
attributeName += chr;
|
||||
|
||||
break;
|
||||
if (withInValue)
|
||||
attributeValue += chr;
|
||||
}
|
||||
|
||||
case "get_from_editor":
|
||||
// Parse all img tags and replace them with object+embed
|
||||
var startPos = -1;
|
||||
while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
|
||||
var endPos = content.indexOf('/>', startPos);
|
||||
var attribs = TinyMCE_flash_parseAttributes(content.substring(startPos + 4, endPos));
|
||||
|
||||
// Is not flash, skip it
|
||||
if (attribs['class'] != "mceItemFlash")
|
||||
continue;
|
||||
|
||||
endPos += 2;
|
||||
|
||||
var embedHTML = '';
|
||||
var wmode = tinyMCE.getParam("flash_wmode", "");
|
||||
var quality = tinyMCE.getParam("flash_quality", "high");
|
||||
var menu = tinyMCE.getParam("flash_menu", "false");
|
||||
|
||||
// Insert object + embed
|
||||
embedHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
|
||||
embedHTML += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"';
|
||||
embedHTML += ' width="' + attribs["width"] + '" height="' + attribs["height"] + '">';
|
||||
embedHTML += '<param name="movie" value="' + attribs["title"] + '" />';
|
||||
embedHTML += '<param name="quality" value="' + quality + '" />';
|
||||
embedHTML += '<param name="menu" value="' + menu + '" />';
|
||||
embedHTML += '<param name="wmode" value="' + wmode + '" />';
|
||||
embedHTML += '<embed src="' + attribs["title"] + '" wmode="' + wmode + '" quality="' + quality + '" menu="' + menu + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + attribs["width"] + '" height="' + attribs["height"] + '"></embed></object>';
|
||||
|
||||
// Insert embed/object chunk
|
||||
chunkBefore = content.substring(0, startPos);
|
||||
chunkAfter = content.substring(endPos);
|
||||
content = chunkBefore + embedHTML + chunkAfter;
|
||||
}
|
||||
break;
|
||||
return attributes;
|
||||
}
|
||||
};
|
||||
|
||||
// Pass through to next handler in chain
|
||||
return content;
|
||||
}
|
||||
|
||||
function TinyMCE_flash_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
tinyMCE.switchClassSticky(editor_id + '_flash', 'mceButtonNormal');
|
||||
|
||||
if (node == null)
|
||||
return;
|
||||
|
||||
do {
|
||||
if (node.nodeName.toLowerCase() == "img" && tinyMCE.getAttrib(node, 'class').indexOf('mceItemFlash') == 0)
|
||||
tinyMCE.switchClassSticky(editor_id + '_flash', 'mceButtonSelected');
|
||||
} while ((node = node.parentNode));
|
||||
|
||||
return true;
|
||||
}
|
||||
tinyMCE.addPlugin("flash", TinyMCE_FlashPlugin);
|
||||
|
|
|
|||
|
|
@ -2,13 +2,15 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.6 2005/10/18 13:59:42 spocke Exp $
|
||||
* $Id: cs.js,v 1.8 2006/02/23 09:05:57 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insert_flash : 'Vložit/editovat Flash Movie',
|
||||
insert_flash_file : 'Flash soubor (.swf)',
|
||||
insert_flash_size : 'Velikost',
|
||||
insert_flash_list : 'Seznam',
|
||||
flash_props : 'Vlastnosti Flash'
|
||||
tinyMCE.addToLang('flash',{
|
||||
title : 'Vložit / editovat Flash',
|
||||
desc : 'Vložit / editovat Flash',
|
||||
file : 'Flash soubor (.swf)',
|
||||
size : 'Velikost',
|
||||
list : 'Flash soubory',
|
||||
props : 'Flash nastavení',
|
||||
general : 'Obecné'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('flash',{
|
||||
title : 'Indsæt / rediger Flash-film',
|
||||
desc : 'Indsæt / rediger Flash-film',
|
||||
title : 'Indsæt / rediger Flash-film',
|
||||
desc : 'Indsæt / rediger Flash-film',
|
||||
file : 'Flash-Fil (.swf)',
|
||||
size : 'Størrelse',
|
||||
size : 'Størrelse',
|
||||
list : 'Flash filer',
|
||||
props : 'Flash egenskaber',
|
||||
general : 'Genererelt'
|
||||
|
|
|
|||
|
|
@ -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('flash',{
|
||||
title : '꿨흙/긍서 Flash든緞',
|
||||
|
|
|
|||
|
|
@ -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 : '全屏模式',
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('iespell','cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_iespell_getInfo(){return{longname:'IESpell',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_iespell_getControlHTML(control_name){if(control_name=="iespell"&&(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_iespell_execCommand(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('iespell','en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_IESpellPlugin={getInfo:function(){return{longname:'IESpell (MSIE Only)',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){if(cn=="iespell"&&(tinyMCE.isMSIE&&!tinyMCE.isOpera))return tinyMCE.getButtonHTML(cn,'lang_iespell_desc','{$pluginurl}/images/iespell.gif','mceIESpell');return"";},execCommand:function(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}};tinyMCE.addPlugin("iespell",TinyMCE_IESpellPlugin);
|
||||
|
|
@ -1,49 +1,60 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.20 $
|
||||
* $Date: 2006/02/10 16:29:39 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');
|
||||
tinyMCE.importPluginLanguagePack('iespell', 'en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
function TinyMCE_iespell_getInfo() {
|
||||
return {
|
||||
longname : 'IESpell',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
};
|
||||
var TinyMCE_IESpellPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'IESpell (MSIE Only)',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the iespell control.
|
||||
*/
|
||||
function TinyMCE_iespell_getControlHTML(control_name) {
|
||||
// Is it the iespell control and is the brower MSIE.
|
||||
if (control_name == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera)) {
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
/**
|
||||
* Returns the HTML contents of the iespell control.
|
||||
*/
|
||||
getControlHTML : function(cn) {
|
||||
// Is it the iespell control and is the brower MSIE.
|
||||
if (cn == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera))
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_iespell_desc', '{$pluginurl}/images/iespell.gif', 'mceIESpell');
|
||||
|
||||
return "";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the mceIESpell command.
|
||||
*/
|
||||
function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle ieSpellCommand
|
||||
if (command == "mceIESpell") {
|
||||
try {
|
||||
var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
|
||||
ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
|
||||
} catch (e) {
|
||||
if (e.number == -2146827859) {
|
||||
if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
|
||||
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
|
||||
} else
|
||||
alert("Error Loading ieSpell: Exception " + e.number);
|
||||
/**
|
||||
* Executes the mceIESpell command.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle ieSpellCommand
|
||||
if (command == "mceIESpell") {
|
||||
try {
|
||||
var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
|
||||
ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
|
||||
} catch (e) {
|
||||
if (e.number == -2146827859) {
|
||||
if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
|
||||
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
|
||||
} else
|
||||
alert("Error Loading ieSpell: Exception " + e.number);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
tinyMCE.addPlugin("iespell", TinyMCE_IESpellPlugin);
|
||||
|
|
|
|||
|
|
@ -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,7 +1,7 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
iespell_desc : 'Lav stavekontrol',
|
||||
iespell_download : "ieSpell kan ikke findes. Klik på OK for at fortsætte til downloadsiden."
|
||||
iespell_download : "ieSpell kan ikke findes. Klik på OK for at fortsætte til downloadsiden."
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
iespell_desc : '运行拼写检查',
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
.mceWindow {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border: 1px solid black;
|
||||
background-color: #D4D0C8;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,29 +1,35 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2005/11/27 18:06:45 $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2006/02/06 20:02:38 $
|
||||
*
|
||||
* Moxiecode DHTML Windows script.
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
// Patch openWindow, closeWindow TinyMCE functions
|
||||
|
||||
function TinyMCE_inlinepopups_getInfo() {
|
||||
return {
|
||||
longname : 'Inline Popups',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
var TinyMCE_InlinePopupsPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Inline Popups',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
TinyMCE.prototype.orgOpenWindow = TinyMCE.prototype.openWindow;
|
||||
tinyMCE.addPlugin("inlinepopups", TinyMCE_InlinePopupsPlugin);
|
||||
|
||||
TinyMCE.prototype.openWindow = function(template, args) {
|
||||
// Patch openWindow, closeWindow TinyMCE functions
|
||||
|
||||
TinyMCE_Engine.prototype.orgOpenWindow = TinyMCE_Engine.prototype.openWindow;
|
||||
|
||||
TinyMCE_Engine.prototype.openWindow = function(template, args) {
|
||||
// Does the caller support inline
|
||||
if (args['inline'] != "yes" || tinyMCE.isOpera || tinyMCE.getParam("plugins").indexOf('inlinepopups') == -1) {
|
||||
mcWindows.selectedWindow = null;
|
||||
|
|
@ -71,16 +77,16 @@ TinyMCE.prototype.openWindow = function(template, args) {
|
|||
mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop);
|
||||
};
|
||||
|
||||
TinyMCE.prototype.orgCloseWindow = TinyMCE.prototype.closeWindow;
|
||||
TinyMCE_Engine.prototype.orgCloseWindow = TinyMCE_Engine.prototype.closeWindow;
|
||||
|
||||
TinyMCE.prototype.closeWindow = function(win) {
|
||||
TinyMCE_Engine.prototype.closeWindow = function(win) {
|
||||
if (mcWindows.selectedWindow != null)
|
||||
mcWindows.selectedWindow.close();
|
||||
else
|
||||
this.orgCloseWindow(win);
|
||||
};
|
||||
|
||||
TinyMCE.prototype.setWindowTitle = function(win_ref, title) {
|
||||
TinyMCE_Engine.prototype.setWindowTitle = function(win_ref, title) {
|
||||
for (var n in mcWindows.windows) {
|
||||
var win = mcWindows.windows[n];
|
||||
if (typeof(win) == 'function')
|
||||
|
|
@ -91,10 +97,10 @@ TinyMCE.prototype.setWindowTitle = function(win_ref, title) {
|
|||
}
|
||||
};
|
||||
|
||||
// * * * * * MCWindows classes below
|
||||
// * * * * * TinyMCE_Windows classes below
|
||||
|
||||
// Windows handler
|
||||
function MCWindows() {
|
||||
function TinyMCE_Windows() {
|
||||
this.settings = new Array();
|
||||
this.windows = new Array();
|
||||
this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
|
||||
|
|
@ -115,7 +121,7 @@ function MCWindows() {
|
|||
this.idCounter = 0;
|
||||
};
|
||||
|
||||
MCWindows.prototype.init = function(settings) {
|
||||
TinyMCE_Windows.prototype.init = function(settings) {
|
||||
this.settings = settings;
|
||||
|
||||
if (this.isMSIE)
|
||||
|
|
@ -128,7 +134,7 @@ MCWindows.prototype.init = function(settings) {
|
|||
this.doc = document;
|
||||
};
|
||||
|
||||
MCWindows.prototype.getParam = function(name, default_value) {
|
||||
TinyMCE_Windows.prototype.getParam = function(name, default_value) {
|
||||
var value = null;
|
||||
|
||||
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
||||
|
|
@ -140,7 +146,7 @@ MCWindows.prototype.getParam = function(name, default_value) {
|
|||
return value;
|
||||
};
|
||||
|
||||
MCWindows.prototype.eventDispatcher = function(e) {
|
||||
TinyMCE_Windows.prototype.eventDispatcher = function(e) {
|
||||
e = typeof(e) == "undefined" ? window.event : e;
|
||||
|
||||
if (mcWindows.selectedWindow == null)
|
||||
|
|
@ -179,14 +185,14 @@ MCWindows.prototype.eventDispatcher = function(e) {
|
|||
}
|
||||
};
|
||||
|
||||
MCWindows.prototype.addEvent = function(obj, name, handler) {
|
||||
TinyMCE_Windows.prototype.addEvent = function(obj, name, handler) {
|
||||
if (this.isMSIE)
|
||||
obj.attachEvent("on" + name, handler);
|
||||
else
|
||||
obj.addEventListener(name, handler, true);
|
||||
};
|
||||
|
||||
MCWindows.prototype.cancelEvent = function(e) {
|
||||
TinyMCE_Windows.prototype.cancelEvent = function(e) {
|
||||
if (this.isMSIE) {
|
||||
e.returnValue = false;
|
||||
e.cancelBubble = true;
|
||||
|
|
@ -194,7 +200,7 @@ MCWindows.prototype.cancelEvent = function(e) {
|
|||
e.preventDefault();
|
||||
};
|
||||
|
||||
MCWindows.prototype.parseFeatures = function(opts) {
|
||||
TinyMCE_Windows.prototype.parseFeatures = function(opts) {
|
||||
// Cleanup the options
|
||||
opts = opts.toLowerCase();
|
||||
opts = opts.replace(/;/g, ",");
|
||||
|
|
@ -234,10 +240,10 @@ MCWindows.prototype.parseFeatures = function(opts) {
|
|||
return options;
|
||||
};
|
||||
|
||||
MCWindows.prototype.open = function(url, name, features) {
|
||||
TinyMCE_Windows.prototype.open = function(url, name, features) {
|
||||
this.lastSelectedWindow = this.selectedWindow;
|
||||
|
||||
var win = new MCWindow();
|
||||
var win = new TinyMCE_Window();
|
||||
var winDiv, html = "", id;
|
||||
var imgPath = this.getParam("images_path");
|
||||
|
||||
|
|
@ -315,7 +321,7 @@ MCWindows.prototype.open = function(url, name, features) {
|
|||
};
|
||||
|
||||
// Blocks the document events by placing a image over the whole document
|
||||
MCWindows.prototype.setDocumentLock = function(state) {
|
||||
TinyMCE_Windows.prototype.setDocumentLock = function(state) {
|
||||
if (state) {
|
||||
var elm = document.getElementById('mcWindowEventBlocker');
|
||||
if (elm == null) {
|
||||
|
|
@ -323,8 +329,8 @@ MCWindows.prototype.setDocumentLock = function(state) {
|
|||
|
||||
elm.id = "mcWindowEventBlocker";
|
||||
elm.style.position = "absolute";
|
||||
elm.style.left = "0px";
|
||||
elm.style.top = "0px";
|
||||
elm.style.left = "0";
|
||||
elm.style.top = "0";
|
||||
|
||||
document.body.appendChild(elm);
|
||||
}
|
||||
|
|
@ -352,7 +358,7 @@ MCWindows.prototype.setDocumentLock = function(state) {
|
|||
};
|
||||
|
||||
// Gets called when wrapper iframe is initialized
|
||||
MCWindows.prototype.onLoad = function(name) {
|
||||
TinyMCE_Windows.prototype.onLoad = function(name) {
|
||||
var win = mcWindows.windows[name];
|
||||
var id = "mcWindow_" + name;
|
||||
var wrapperIframe = window.frames[id + "_iframe"].frames[0];
|
||||
|
|
@ -425,7 +431,7 @@ MCWindows.prototype.onLoad = function(name) {
|
|||
mcWindows.setDocumentLock(true);
|
||||
};
|
||||
|
||||
MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
|
||||
TinyMCE_Windows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
|
||||
var iframe = document.createElement("iframe");
|
||||
var div = document.createElement("div");
|
||||
|
||||
|
|
@ -497,10 +503,10 @@ MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width,
|
|||
};
|
||||
|
||||
// Window instance
|
||||
function MCWindow() {
|
||||
function TinyMCE_Window() {
|
||||
};
|
||||
|
||||
MCWindow.prototype.focus = function() {
|
||||
TinyMCE_Window.prototype.focus = function() {
|
||||
if (this != mcWindows.selectedWindow) {
|
||||
this.winElement.style.zIndex = ++mcWindows.zindex;
|
||||
mcWindows.lastSelectedWindow = mcWindows.selectedWindow;
|
||||
|
|
@ -508,22 +514,25 @@ MCWindow.prototype.focus = function() {
|
|||
}
|
||||
};
|
||||
|
||||
MCWindow.prototype.minimize = function() {
|
||||
TinyMCE_Window.prototype.minimize = function() {
|
||||
};
|
||||
|
||||
MCWindow.prototype.maximize = function() {
|
||||
TinyMCE_Window.prototype.maximize = function() {
|
||||
|
||||
};
|
||||
|
||||
MCWindow.prototype.startResize = function() {
|
||||
TinyMCE_Window.prototype.startResize = function() {
|
||||
mcWindows.action = "resize";
|
||||
};
|
||||
|
||||
MCWindow.prototype.startMove = function(e) {
|
||||
TinyMCE_Window.prototype.startMove = function(e) {
|
||||
mcWindows.action = "move";
|
||||
};
|
||||
|
||||
MCWindow.prototype.close = function() {
|
||||
TinyMCE_Window.prototype.close = function() {
|
||||
if (this.frame && this.frame['tinyMCEPopup'])
|
||||
this.frame['tinyMCEPopup'].restoreSelection();
|
||||
|
||||
if (mcWindows.lastSelectedWindow != null)
|
||||
mcWindows.lastSelectedWindow.focus();
|
||||
|
||||
|
|
@ -550,7 +559,7 @@ MCWindow.prototype.close = function() {
|
|||
mcWindows.setDocumentLock(false);
|
||||
};
|
||||
|
||||
MCWindow.prototype.onMouseMove = function(e) {
|
||||
TinyMCE_Window.prototype.onMouseMove = function(e) {
|
||||
var scrollX = 0;//this.doc.body.scrollLeft;
|
||||
var scrollY = 0;//this.doc.body.scrollTop;
|
||||
|
||||
|
|
@ -602,11 +611,11 @@ function debug(msg) {
|
|||
document.getElementById('debug').value += msg + "\n";
|
||||
}
|
||||
|
||||
MCWindow.prototype.onMouseUp = function(e) {
|
||||
TinyMCE_Window.prototype.onMouseUp = function(e) {
|
||||
mcWindows.action = "none";
|
||||
};
|
||||
|
||||
MCWindow.prototype.onFocus = function(e) {
|
||||
TinyMCE_Window.prototype.onFocus = function(e) {
|
||||
// Gecko only handler
|
||||
var winRef = e.currentTarget;
|
||||
|
||||
|
|
@ -622,7 +631,7 @@ MCWindow.prototype.onFocus = function(e) {
|
|||
}
|
||||
};
|
||||
|
||||
MCWindow.prototype.onMouseDown = function(e) {
|
||||
TinyMCE_Window.prototype.onMouseDown = function(e) {
|
||||
var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
|
||||
|
||||
var scrollX = 0;//this.doc.body.scrollLeft;
|
||||
|
|
@ -644,7 +653,7 @@ MCWindow.prototype.onMouseDown = function(e) {
|
|||
};
|
||||
|
||||
// Global instance
|
||||
var mcWindows = new MCWindows();
|
||||
var mcWindows = new TinyMCE_Windows();
|
||||
|
||||
// Initialize windows
|
||||
mcWindows.init({
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('insertdatetime','cs,el,en,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl');function TinyMCE_insertdatetime_getInfo(){return{longname:'Insert date/time',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_insertdatetime.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_insertdatetime_getControlHTML(control_name){switch(control_name){case "insertdate":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertDate\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_insertdate" src="{$pluginurl}/images/insertdate.gif" title="{$lang_insertdate_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';case "inserttime":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertTime\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_inserttime" src="{$pluginurl}/images/inserttime.gif" title="{$lang_inserttime_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_insertdatetime_execCommand(editor_id,element,command,user_interface,value){function addZeros(value,len){value=""+value;if(value.length<len){for(var i=0;i<(len-value.length);i++)value="0"+value;}return value;}function getDateTime(date,format){format=tinyMCE.regexpReplace(format,"%D","%m/%d/%y");format=tinyMCE.regexpReplace(format,"%r","%I:%M:%S %p");format=tinyMCE.regexpReplace(format,"%Y",""+date.getFullYear());format=tinyMCE.regexpReplace(format,"%y",""+date.getYear());format=tinyMCE.regexpReplace(format,"%m",addZeros(date.getMonth()+1,2));format=tinyMCE.regexpReplace(format,"%d",addZeros(date.getDate(),2));format=tinyMCE.regexpReplace(format,"%H",""+addZeros(date.getHours(),2));format=tinyMCE.regexpReplace(format,"%M",""+addZeros(date.getMinutes(),2));format=tinyMCE.regexpReplace(format,"%S",""+addZeros(date.getSeconds(),2));format=tinyMCE.regexpReplace(format,"%I",""+((date.getHours()+11)%12+1));format=tinyMCE.regexpReplace(format,"%p",""+(date.getHours()<12?"AM":"PM"));format=tinyMCE.regexpReplace(format,"%B",""+tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);format=tinyMCE.regexpReplace(format,"%b",""+tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);format=tinyMCE.regexpReplace(format,"%A",""+tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]);format=tinyMCE.regexpReplace(format,"%a",""+tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]);format=tinyMCE.regexpReplace(format,"%%","%");return format;}switch(command){case "mceInsertDate":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_dateFormat",tinyMCE.getLang('lang_insertdate_def_fmt'))));return true;case "mceInsertTime":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_timeFormat",tinyMCE.getLang('lang_inserttime_def_fmt'))));return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('insertdatetime','en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl');var TinyMCE_InsertDateTimePlugin={getInfo:function(){return{longname:'Insert date/time',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_insertdatetime.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"insertdate":return tinyMCE.getButtonHTML(cn,'lang_insertdate_desc','{$pluginurl}/images/insertdate.gif','mceInsertDate');case"inserttime":return tinyMCE.getButtonHTML(cn,'lang_inserttime_desc','{$pluginurl}/images/inserttime.gif','mceInsertTime');}return"";},execCommand:function(editor_id,element,command,user_interface,value){function addZeros(value,len){value=""+value;if(value.length<len){for(var i=0;i<(len-value.length);i++)value="0"+value;}return value;}function getDateTime(date,format){format=tinyMCE.regexpReplace(format,"%D","%m/%d/%y");format=tinyMCE.regexpReplace(format,"%r","%I:%M:%S %p");format=tinyMCE.regexpReplace(format,"%Y",""+date.getFullYear());format=tinyMCE.regexpReplace(format,"%y",""+date.getYear());format=tinyMCE.regexpReplace(format,"%m",addZeros(date.getMonth()+1,2));format=tinyMCE.regexpReplace(format,"%d",addZeros(date.getDate(),2));format=tinyMCE.regexpReplace(format,"%H",""+addZeros(date.getHours(),2));format=tinyMCE.regexpReplace(format,"%M",""+addZeros(date.getMinutes(),2));format=tinyMCE.regexpReplace(format,"%S",""+addZeros(date.getSeconds(),2));format=tinyMCE.regexpReplace(format,"%I",""+((date.getHours()+11)%12+1));format=tinyMCE.regexpReplace(format,"%p",""+(date.getHours()<12?"AM":"PM"));format=tinyMCE.regexpReplace(format,"%B",""+tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);format=tinyMCE.regexpReplace(format,"%b",""+tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);format=tinyMCE.regexpReplace(format,"%A",""+tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]);format=tinyMCE.regexpReplace(format,"%a",""+tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]);format=tinyMCE.regexpReplace(format,"%%","%");return format;}switch(command){case"mceInsertDate":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_dateFormat",tinyMCE.getLang('lang_insertdate_def_fmt'))));return true;case"mceInsertTime":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_timeFormat",tinyMCE.getLang('lang_inserttime_def_fmt'))));return true;}return false;}};tinyMCE.addPlugin("insertdatetime",TinyMCE_InsertDateTimePlugin);
|
||||
|
|
@ -1,82 +1,93 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.22 $
|
||||
* $Date: 2006/02/10 16:29:39 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('insertdatetime', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl');
|
||||
tinyMCE.importPluginLanguagePack('insertdatetime', 'en,tr,cs,el,fr_ca,it,ko,sv,zh_cn,fa,fr,de,pl,pt_br,nl,da,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl');
|
||||
|
||||
function TinyMCE_insertdatetime_getInfo() {
|
||||
return {
|
||||
longname : 'Insert date/time',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_insertdatetime.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
};
|
||||
var TinyMCE_InsertDateTimePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Insert date/time',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_insertdatetime.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the insertdate, inserttime controls.
|
||||
*/
|
||||
function TinyMCE_insertdatetime_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "insertdate":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertDate\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_insertdate" src="{$pluginurl}/images/insertdate.gif" title="{$lang_insertdate_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
/**
|
||||
* Returns the HTML contents of the insertdate, inserttime controls.
|
||||
*/
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "insertdate":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_insertdate_desc', '{$pluginurl}/images/insertdate.gif', 'mceInsertDate');
|
||||
|
||||
case "inserttime":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceInsertTime\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_inserttime" src="{$pluginurl}/images/inserttime.gif" title="{$lang_inserttime_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the mceInsertDate command.
|
||||
*/
|
||||
function TinyMCE_insertdatetime_execCommand(editor_id, element, command, user_interface, value) {
|
||||
/* Adds zeros infront of value */
|
||||
function addZeros(value, len) {
|
||||
value = "" + value;
|
||||
|
||||
if (value.length < len) {
|
||||
for (var i=0; i<(len-value.length); i++)
|
||||
value = "0" + value;
|
||||
case "inserttime":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_inserttime_desc', '{$pluginurl}/images/inserttime.gif', 'mceInsertTime');
|
||||
}
|
||||
|
||||
return value;
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the mceInsertDate command.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
/* Adds zeros infront of value */
|
||||
function addZeros(value, len) {
|
||||
value = "" + value;
|
||||
|
||||
if (value.length < len) {
|
||||
for (var i=0; i<(len-value.length); i++)
|
||||
value = "0" + value;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/* Returns the date object in the specified format */
|
||||
function getDateTime(date, format) {
|
||||
format = tinyMCE.regexpReplace(format, "%D", "%m/%d/%y");
|
||||
format = tinyMCE.regexpReplace(format, "%r", "%I:%M:%S %p");
|
||||
format = tinyMCE.regexpReplace(format, "%Y", "" + date.getFullYear());
|
||||
format = tinyMCE.regexpReplace(format, "%y", "" + date.getYear());
|
||||
format = tinyMCE.regexpReplace(format, "%m", addZeros(date.getMonth()+1, 2));
|
||||
format = tinyMCE.regexpReplace(format, "%d", addZeros(date.getDate(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%I", "" + ((date.getHours() + 11) % 12 + 1));
|
||||
format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
|
||||
format = tinyMCE.regexpReplace(format, "%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);
|
||||
format = tinyMCE.regexpReplace(format, "%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);
|
||||
format = tinyMCE.regexpReplace(format, "%A", "" + tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]);
|
||||
format = tinyMCE.regexpReplace(format, "%a", "" + tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]);
|
||||
format = tinyMCE.regexpReplace(format, "%%", "%");
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceInsertDate":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", tinyMCE.getLang('lang_insertdate_def_fmt'))));
|
||||
return true;
|
||||
|
||||
case "mceInsertTime":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", tinyMCE.getLang('lang_inserttime_def_fmt'))));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/* Returns the date object in the specified format */
|
||||
function getDateTime(date, format) {
|
||||
format = tinyMCE.regexpReplace(format, "%D", "%m/%d/%y");
|
||||
format = tinyMCE.regexpReplace(format, "%r", "%I:%M:%S %p");
|
||||
format = tinyMCE.regexpReplace(format, "%Y", "" + date.getFullYear());
|
||||
format = tinyMCE.regexpReplace(format, "%y", "" + date.getYear());
|
||||
format = tinyMCE.regexpReplace(format, "%m", addZeros(date.getMonth()+1, 2));
|
||||
format = tinyMCE.regexpReplace(format, "%d", addZeros(date.getDate(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2));
|
||||
format = tinyMCE.regexpReplace(format, "%I", "" + ((date.getHours() + 11) % 12 + 1));
|
||||
format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
|
||||
format = tinyMCE.regexpReplace(format, "%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[date.getMonth()]);
|
||||
format = tinyMCE.regexpReplace(format, "%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[date.getMonth()]);
|
||||
format = tinyMCE.regexpReplace(format, "%A", "" + tinyMCE.getLang("lang_inserttime_day_long")[date.getDay()]);
|
||||
format = tinyMCE.regexpReplace(format, "%a", "" + tinyMCE.getLang("lang_inserttime_day_short")[date.getDay()]);
|
||||
format = tinyMCE.regexpReplace(format, "%%", "%");
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceInsertDate":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", tinyMCE.getLang('lang_insertdate_def_fmt'))));
|
||||
return true;
|
||||
|
||||
case "mceInsertTime":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", tinyMCE.getLang('lang_inserttime_def_fmt'))));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
tinyMCE.addPlugin("insertdatetime", TinyMCE_InsertDateTimePlugin);
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.5 2005/10/18 13:59:43 spocke Exp $
|
||||
* $Id: cs.js,v 1.6 2006/01/11 14:25:49 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insertdate_def_fmt : '%Y-%m-%d',
|
||||
inserttime_def_fmt : '%H:%M:%S',
|
||||
insertdate_def_fmt : '%d.%m.%Y',
|
||||
inserttime_def_fmt : '%H:%M',
|
||||
insertdate_desc : 'Vložit datum',
|
||||
inserttime_desc : 'Vložit čas',
|
||||
inserttime_months_long : new Array('Leden','Únor','Březen','Duben','Květen','Červen','Červenec','Srpen','Září','Říjen','Listopad','Prosinec'),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
insertdate_def_fmt : '%d-%m-%Y',
|
||||
inserttime_def_fmt : '%H:%M:%S',
|
||||
insertdate_desc : 'Indsæt dato',
|
||||
inserttime_desc : 'Indsæt tid',
|
||||
insertdate_desc : 'Indsæt dato',
|
||||
inserttime_desc : 'Indsæt tid',
|
||||
inserttime_months_long : new Array("Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"),
|
||||
inserttime_months_short : new Array("Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"),
|
||||
inserttime_day_long : new Array("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"),
|
||||
inserttime_day_short : new Array("Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn")
|
||||
inserttime_day_long : new Array("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"),
|
||||
inserttime_day_short : new Array("Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn")
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
insertdate_def_fmt : '%Y-%m-%d',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* This is the CSS file for the noneditable elements plugin */
|
||||
|
||||
.mceItemEditable {
|
||||
.mceEditable {
|
||||
/*border: 1px dotted #0000cc;*/
|
||||
-moz-user-focus: none;
|
||||
-moz-user-input: auto;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
.mceItemNonEditable {
|
||||
.mceNonEditable {
|
||||
/*border: 1px dotted #cc0000;*/
|
||||
-moz-user-focus: ignore;
|
||||
/*-moz-user-input: disabled;*/
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
function TinyMCE_noneditable_getInfo(){return{longname:'Non editable elements',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_noneditable_initInstance(inst){tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/noneditable/css/noneditable.css");if(tinyMCE.isMSIE5_0)tinyMCE.settings['plugins']=tinyMCE.settings['plugins'].replace(/noneditable/gi,'Noneditable');if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"keyup",TinyMCE_noneditable_fixKeyUp);}}function TinyMCE_noneditable_fixKeyUp(e){var inst=tinyMCE.selectedInstance;var sel=inst.getSel();var rng=inst.getRng();var an=sel.anchorNode;if((e.keyCode==38||e.keyCode==37||e.keyCode==40||e.keyCode==39)&&(elm=TinyMCE_noneditable_isNonEditable(an))!=null){rng=inst.getDoc().createRange();rng.selectNode(elm);rng.collapse(true);sel.removeAllRanges();sel.addRange(rng);tinyMCE.cancelEvent(e);}}function TinyMCE_noneditable_selectAll(e){var inst=tinyMCE.selectedInstance;var sel=inst.getSel();var doc=inst.getDoc();if((elm=TinyMCE_noneditable_isNonEditable(sel.focusNode))!=null){inst.selectNode(elm,false);tinyMCE.cancelEvent(e);return;}if((elm=TinyMCE_noneditable_isNonEditable(sel.anchorNode))!=null){inst.selectNode(elm,false);tinyMCE.cancelEvent(e);return;}}function TinyMCE_noneditable_isNonEditable(elm){var editClass=tinyMCE.getParam("noneditable_editable_class","mceItemEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceItemNonEditable");if(!elm)return;do{var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)return null;if(className.indexOf(nonEditClass)!=-1)return elm;}while(elm=elm.parentNode);return null;}function TinyMCE_noneditable_cleanup(type,content,inst){switch(type){case "insert_to_editor_dom":var nodes=tinyMCE.getNodeTree(content,new Array(),1);var editClass=tinyMCE.getParam("noneditable_editable_class","mceItemEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceItemNonEditable");for(var i=0;i<nodes.length;i++){var elm=nodes[i];var editable=tinyMCE.getAttrib(elm,"contenteditable");if(new RegExp("true|false","gi").test(editable))TinyMCE_noneditable_setEditable(elm,editable=="true");if(tinyMCE.isMSIE){var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)elm.contentEditable=true;if(className.indexOf(nonEditClass)!=-1)elm.contentEditable=false;}}break;case "insert_to_editor":if(tinyMCE.isMSIE){var editClass=tinyMCE.getParam("noneditable_editable_class","mceItemEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceItemNonEditable");content=content.replace(new RegExp("<(.*?)class=\"(.*?)("+editClass+")(.*?)\"(.*?)>","gi"),'<$1class="$2$3$4" contenteditable="true"$5>');content=content.replace(new RegExp("<(.*?)class=\"(.*?)("+nonEditClass+")(.*?)\"(.*?)>","gi"),'<$1class="$2$3$4" contenteditable="false"$5>');}break;case "get_from_editor_dom":if(tinyMCE.getParam("noneditable_leave_contenteditable",false)){var nodes=tinyMCE.getNodeTree(content,new Array(),1);for(var i=0;i<nodes.length;i++)nodes[i].removeAttribute("contenteditable");}break;}return content;}function TinyMCE_noneditable_setEditable(elm,state){var editClass=tinyMCE.getParam("noneditable_editable_class","mceItemEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceItemNonEditable");var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1||className.indexOf(nonEditClass)!=-1)return;if((className=tinyMCE.getAttrib(elm,"class"))!="")className+=" ";className+=state?editClass:nonEditClass;elm.setAttribute("class",className);elm.className=className;}
|
||||
var TinyMCE_NonEditablePlugin={getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/noneditable/css/noneditable.css");if(tinyMCE.isMSIE5_0)tinyMCE.settings['plugins']=tinyMCE.settings['plugins'].replace(/noneditable/gi,'Noneditable');if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"keyup",TinyMCE_NonEditablePlugin._fixKeyUp);}},cleanup:function(type,content,inst){switch(type){case"insert_to_editor_dom":var nodes=tinyMCE.getNodeTree(content,new Array(),1);var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");for(var i=0;i<nodes.length;i++){var elm=nodes[i];var editable=tinyMCE.getAttrib(elm,"contenteditable");if(new RegExp("true|false","gi").test(editable))TinyMCE_NonEditablePlugin._setEditable(elm,editable=="true");if(tinyMCE.isMSIE){var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)elm.contentEditable=true;if(className.indexOf(nonEditClass)!=-1)elm.contentEditable=false;}}break;case"insert_to_editor":if(tinyMCE.isMSIE){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");content=content.replace(new RegExp("class=\"(.*)("+editClass+")([^\"]*)\"","gi"),'class="$1$2$3" contenteditable="true"');content=content.replace(new RegExp("class=\"(.*)("+nonEditClass+")([^\"]*)\"","gi"),'class="$1$2$3" contenteditable="false"');}break;case"get_from_editor_dom":if(tinyMCE.getParam("noneditable_leave_contenteditable",false)){var nodes=tinyMCE.getNodeTree(content,new Array(),1);for(var i=0;i<nodes.length;i++)nodes[i].removeAttribute("contenteditable");}break;}return content;},_fixKeyUp:function(e){var inst=tinyMCE.selectedInstance;var sel=inst.getSel();var rng=inst.getRng();var an=sel.anchorNode;if((e.keyCode==38||e.keyCode==37||e.keyCode==40||e.keyCode==39)&&(elm=TinyMCE_NonEditablePlugin._isNonEditable(an))!=null){rng=inst.getDoc().createRange();rng.selectNode(elm);rng.collapse(true);sel.removeAllRanges();sel.addRange(rng);tinyMCE.cancelEvent(e);}},_isNonEditable:function(elm){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");if(!elm)return;do{var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1)return null;if(className.indexOf(nonEditClass)!=-1)return elm;}while(elm=elm.parentNode);return null;},_setEditable:function(elm,state){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1||className.indexOf(nonEditClass)!=-1)return;if((className=tinyMCE.getAttrib(elm,"class"))!="")className+=" ";className+=state?editClass:nonEditClass;elm.setAttribute("class",className);elm.className=className;}};tinyMCE.addPlugin("noneditable",TinyMCE_NonEditablePlugin);
|
||||
|
|
@ -1,149 +1,164 @@
|
|||
function TinyMCE_noneditable_getInfo() {
|
||||
return {
|
||||
longname : 'Non editable elements',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
};
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2006/02/06 20:02:38 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_noneditable_initInstance(inst) {
|
||||
tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/noneditable/css/noneditable.css");
|
||||
var TinyMCE_NonEditablePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Non editable elements',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_noneditable.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
// Ugly hack
|
||||
if (tinyMCE.isMSIE5_0)
|
||||
tinyMCE.settings['plugins'] = tinyMCE.settings['plugins'].replace(/noneditable/gi, 'Noneditable');
|
||||
initInstance : function(inst) {
|
||||
tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/noneditable/css/noneditable.css");
|
||||
|
||||
if (tinyMCE.isGecko) {
|
||||
tinyMCE.addEvent(inst.getDoc(), "keyup", TinyMCE_noneditable_fixKeyUp);
|
||||
// tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_noneditable_selectAll);
|
||||
// tinyMCE.addEvent(inst.getDoc(), "mouseup", TinyMCE_noneditable_selectAll);
|
||||
}
|
||||
}
|
||||
// Ugly hack
|
||||
if (tinyMCE.isMSIE5_0)
|
||||
tinyMCE.settings['plugins'] = tinyMCE.settings['plugins'].replace(/noneditable/gi, 'Noneditable');
|
||||
|
||||
function TinyMCE_noneditable_fixKeyUp(e) {
|
||||
var inst = tinyMCE.selectedInstance;
|
||||
var sel = inst.getSel();
|
||||
var rng = inst.getRng();
|
||||
var an = sel.anchorNode;
|
||||
if (tinyMCE.isGecko) {
|
||||
tinyMCE.addEvent(inst.getDoc(), "keyup", TinyMCE_NonEditablePlugin._fixKeyUp);
|
||||
// tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_NonEditablePlugin._selectAll);
|
||||
// tinyMCE.addEvent(inst.getDoc(), "mouseup", TinyMCE_NonEditablePlugin._selectAll);
|
||||
}
|
||||
},
|
||||
|
||||
// Move cursor outside non editable fields
|
||||
if ((e.keyCode == 38 || e.keyCode == 37 || e.keyCode == 40 || e.keyCode == 39) && (elm = TinyMCE_noneditable_isNonEditable(an)) != null) {
|
||||
rng = inst.getDoc().createRange();
|
||||
rng.selectNode(elm);
|
||||
rng.collapse(true);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(rng);
|
||||
tinyMCE.cancelEvent(e);
|
||||
}
|
||||
}
|
||||
cleanup : function(type, content, inst) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
|
||||
|
||||
function TinyMCE_noneditable_selectAll(e) {
|
||||
var inst = tinyMCE.selectedInstance;
|
||||
var sel = inst.getSel();
|
||||
var doc = inst.getDoc();
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
var elm = nodes[i];
|
||||
|
||||
if ((elm = TinyMCE_noneditable_isNonEditable(sel.focusNode)) != null) {
|
||||
inst.selectNode(elm, false);
|
||||
tinyMCE.cancelEvent(e);
|
||||
return;
|
||||
}
|
||||
// Convert contenteditable to classes
|
||||
var editable = tinyMCE.getAttrib(elm, "contenteditable");
|
||||
if (new RegExp("true|false","gi").test(editable))
|
||||
TinyMCE_NonEditablePlugin._setEditable(elm, editable == "true");
|
||||
|
||||
if ((elm = TinyMCE_noneditable_isNonEditable(sel.anchorNode)) != null) {
|
||||
inst.selectNode(elm, false);
|
||||
tinyMCE.cancelEvent(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (tinyMCE.isMSIE) {
|
||||
var className = elm.className ? elm.className : "";
|
||||
|
||||
function TinyMCE_noneditable_isNonEditable(elm) {
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceItemEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceItemNonEditable");
|
||||
if (className.indexOf(editClass) != -1)
|
||||
elm.contentEditable = true;
|
||||
|
||||
if (!elm)
|
||||
return;
|
||||
if (className.indexOf(nonEditClass) != -1)
|
||||
elm.contentEditable = false;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor":
|
||||
if (tinyMCE.isMSIE) {
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
|
||||
|
||||
content = content.replace(new RegExp("class=\"(.*)(" + editClass + ")([^\"]*)\"", "gi"), 'class="$1$2$3" contenteditable="true"');
|
||||
content = content.replace(new RegExp("class=\"(.*)(" + nonEditClass + ")([^\"]*)\"", "gi"), 'class="$1$2$3" contenteditable="false"');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
if (tinyMCE.getParam("noneditable_leave_contenteditable", false)) {
|
||||
var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
|
||||
|
||||
for (var i=0; i<nodes.length; i++)
|
||||
nodes[i].removeAttribute("contenteditable");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
// Private internal plugin methods
|
||||
|
||||
_fixKeyUp : function(e) {
|
||||
var inst = tinyMCE.selectedInstance;
|
||||
var sel = inst.getSel();
|
||||
var rng = inst.getRng();
|
||||
var an = sel.anchorNode;
|
||||
|
||||
// Move cursor outside non editable fields
|
||||
if ((e.keyCode == 38 || e.keyCode == 37 || e.keyCode == 40 || e.keyCode == 39) && (elm = TinyMCE_NonEditablePlugin._isNonEditable(an)) != null) {
|
||||
rng = inst.getDoc().createRange();
|
||||
rng.selectNode(elm);
|
||||
rng.collapse(true);
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(rng);
|
||||
tinyMCE.cancelEvent(e);
|
||||
}
|
||||
},
|
||||
/*
|
||||
_selectAll : function(e) {
|
||||
var inst = tinyMCE.selectedInstance;
|
||||
var sel = inst.getSel();
|
||||
var doc = inst.getDoc();
|
||||
|
||||
if ((elm = TinyMCE_NonEditablePlugin._isNonEditable(sel.focusNode)) != null) {
|
||||
inst.selection.selectNode(elm, false);
|
||||
tinyMCE.cancelEvent(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((elm = TinyMCE_NonEditablePlugin._isNonEditable(sel.anchorNode)) != null) {
|
||||
inst.selection.selectNode(elm, false);
|
||||
tinyMCE.cancelEvent(e);
|
||||
return;
|
||||
}
|
||||
},*/
|
||||
|
||||
_isNonEditable : function(elm) {
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
|
||||
|
||||
if (!elm)
|
||||
return;
|
||||
|
||||
do {
|
||||
var className = elm.className ? elm.className : "";
|
||||
|
||||
if (className.indexOf(editClass) != -1)
|
||||
return null;
|
||||
|
||||
if (className.indexOf(nonEditClass) != -1)
|
||||
return elm;
|
||||
} while (elm = elm.parentNode);
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
_setEditable : function(elm, state) {
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
|
||||
|
||||
do {
|
||||
var className = elm.className ? elm.className : "";
|
||||
|
||||
if (className.indexOf(editClass) != -1)
|
||||
return null;
|
||||
if (className.indexOf(editClass) != -1 || className.indexOf(nonEditClass) != -1)
|
||||
return;
|
||||
|
||||
if (className.indexOf(nonEditClass) != -1)
|
||||
return elm;
|
||||
} while (elm = elm.parentNode);
|
||||
if ((className = tinyMCE.getAttrib(elm, "class")) != "")
|
||||
className += " ";
|
||||
|
||||
return null;
|
||||
}
|
||||
className += state ? editClass : nonEditClass;
|
||||
|
||||
function TinyMCE_noneditable_cleanup(type, content, inst) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceItemEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceItemNonEditable");
|
||||
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
var elm = nodes[i];
|
||||
|
||||
// Convert contenteditable to classes
|
||||
var editable = tinyMCE.getAttrib(elm, "contenteditable");
|
||||
if (new RegExp("true|false","gi").test(editable))
|
||||
TinyMCE_noneditable_setEditable(elm, editable == "true");
|
||||
|
||||
if (tinyMCE.isMSIE) {
|
||||
var className = elm.className ? elm.className : "";
|
||||
|
||||
if (className.indexOf(editClass) != -1)
|
||||
elm.contentEditable = true;
|
||||
|
||||
if (className.indexOf(nonEditClass) != -1)
|
||||
elm.contentEditable = false;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "insert_to_editor":
|
||||
if (tinyMCE.isMSIE) {
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceItemEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceItemNonEditable");
|
||||
|
||||
content = content.replace(new RegExp("<(.*?)class=\"(.*?)(" + editClass + ")(.*?)\"(.*?)>", "gi"), '<$1class="$2$3$4" contenteditable="true"$5>');
|
||||
content = content.replace(new RegExp("<(.*?)class=\"(.*?)(" + nonEditClass + ")(.*?)\"(.*?)>", "gi"), '<$1class="$2$3$4" contenteditable="false"$5>');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
if (tinyMCE.getParam("noneditable_leave_contenteditable", false)) {
|
||||
var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
|
||||
|
||||
for (var i=0; i<nodes.length; i++)
|
||||
nodes[i].removeAttribute("contenteditable");
|
||||
}
|
||||
|
||||
break;
|
||||
elm.setAttribute("class", className);
|
||||
elm.className = className;
|
||||
}
|
||||
};
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
function TinyMCE_noneditable_setEditable(elm, state) {
|
||||
var editClass = tinyMCE.getParam("noneditable_editable_class", "mceItemEditable");
|
||||
var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceItemNonEditable");
|
||||
|
||||
var className = elm.className ? elm.className : "";
|
||||
|
||||
if (className.indexOf(editClass) != -1 || className.indexOf(nonEditClass) != -1)
|
||||
return;
|
||||
|
||||
if ((className = tinyMCE.getAttrib(elm, "class")) != "")
|
||||
className += " ";
|
||||
|
||||
className += state ? editClass : nonEditClass;
|
||||
|
||||
elm.setAttribute("class", className);
|
||||
elm.className = className;
|
||||
}
|
||||
tinyMCE.addPlugin("noneditable", TinyMCE_NonEditablePlugin);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,333 +1,388 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.36 $
|
||||
* $Date: 2006/03/20 12:03:44 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('paste', 'en,sv,cs,zh_cn,fr_ca,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl,nl,fr,pt_br');
|
||||
tinyMCE.importPluginLanguagePack('paste', 'en,tr,sv,cs,zh_cn,fr_ca,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl,nl,fr,pt_br');
|
||||
|
||||
function TinyMCE_paste_getInfo() {
|
||||
return {
|
||||
longname : 'Paste text/word',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_paste.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
};
|
||||
var TinyMCE_PastePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Paste text/word',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_paste.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
function TinyMCE_paste_initInstance(inst) {
|
||||
if (tinyMCE.isMSIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false))
|
||||
tinyMCE.addEvent(inst.getBody(), "paste", TinyMCE_paste_handleEvent);
|
||||
}
|
||||
initInstance : function(inst) {
|
||||
if (tinyMCE.isMSIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false))
|
||||
tinyMCE.addEvent(inst.getBody(), "paste", TinyMCE_PastePlugin._handlePasteEvent);
|
||||
},
|
||||
|
||||
function TinyMCE_paste_handleEvent(e) {
|
||||
switch (e.type) {
|
||||
case "paste":
|
||||
var html = TinyMCE_paste__clipboardHTML();
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "pastetext":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_paste_text_desc', '{$pluginurl}/images/pastetext.gif', 'mcePasteText', true);
|
||||
|
||||
// Removes italic, strong etc
|
||||
tinyMCE.execCommand('delete');
|
||||
case "pasteword":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_paste_word_desc', '{$pluginurl}/images/pasteword.gif', 'mcePasteWord', true);
|
||||
|
||||
if (html && html.length > 0)
|
||||
tinyMCE.execCommand('mcePasteWord', false, html);
|
||||
|
||||
tinyMCE.cancelEvent(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function TinyMCE_paste_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "pastetext":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePasteText\', true);return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}pastetext" src="{$pluginurl}/images/pastetext.gif" title="{$lang_paste_text_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';
|
||||
|
||||
case "pasteword":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePasteWord\', true);return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}pasteword" src="{$pluginurl}/images/pasteword.gif" title="{$lang_paste_word_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';
|
||||
|
||||
case "selectall":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSelectAll\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}selectall" src="{$pluginurl}/images/selectall.gif" title="{$lang_selectall_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreClass(this);" /></a>';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function TinyMCE_paste_execCommand(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mcePasteText":
|
||||
if (user_interface) {
|
||||
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false))
|
||||
TinyMCE_paste__insertText(clipboardData.getData("Text"), true);
|
||||
else {
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/paste/pastetext.htm'; // Relative to theme
|
||||
template['width'] = 450;
|
||||
template['height'] = 400;
|
||||
var plain_text = "";
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
|
||||
}
|
||||
} else
|
||||
TinyMCE_paste__insertText(value['html'], value['linebreaks']);
|
||||
|
||||
return true;
|
||||
|
||||
case "mcePasteWord":
|
||||
if (user_interface) {
|
||||
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) {
|
||||
var html = TinyMCE_paste__clipboardHTML();
|
||||
|
||||
if (html && html.length > 0)
|
||||
TinyMCE_paste__insertWordContent(html);
|
||||
} else {
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/paste/pasteword.htm'; // Relative to theme
|
||||
template['width'] = 450;
|
||||
template['height'] = 400;
|
||||
var plain_text = "";
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
|
||||
}
|
||||
} else
|
||||
TinyMCE_paste__insertWordContent(value);
|
||||
|
||||
return true;
|
||||
|
||||
case "mceSelectAll":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'selectall');
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_paste__insertText(content, bLinebreaks) {
|
||||
if (content && content.length > 0) {
|
||||
if (bLinebreaks) {
|
||||
// Special paragraph treatment
|
||||
if (tinyMCE.getParam("paste_create_paragraphs", true)) {
|
||||
var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
|
||||
content = tinyMCE.regexpReplace(content, "\r\n\r\n", "</p><p>", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\r\r", "</p><p>", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\n\n", "</p><p>", "gi");
|
||||
|
||||
// Has paragraphs
|
||||
if ((pos = content.indexOf('</p><p>')) != -1) {
|
||||
tinyMCE.execCommand("Delete");
|
||||
|
||||
var node = tinyMCE.selectedInstance.getFocusElement();
|
||||
|
||||
// Get list of elements to break
|
||||
var breakElms = new Array();
|
||||
|
||||
do {
|
||||
if (node.nodeType == 1) {
|
||||
// Don't break tables and break at body
|
||||
if (node.nodeName == "TD" || node.nodeName == "BODY")
|
||||
break;
|
||||
|
||||
breakElms[breakElms.length] = node;
|
||||
}
|
||||
} while(node = node.parentNode);
|
||||
|
||||
var before = "", after = "</p>";
|
||||
before += content.substring(0, pos);
|
||||
|
||||
for (var i=0; i<breakElms.length; i++) {
|
||||
before += "</" + breakElms[i].nodeName + ">";
|
||||
after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">";
|
||||
}
|
||||
|
||||
before += "<p>";
|
||||
content = before + content.substring(pos+7) + after;
|
||||
}
|
||||
}
|
||||
|
||||
if (tinyMCE.getParam("paste_create_linebreaks", true)) {
|
||||
content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi");
|
||||
}
|
||||
case "selectall":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_selectall_desc', '{$pluginurl}/images/selectall.gif', 'mceSelectAll', true);
|
||||
}
|
||||
|
||||
tinyMCE.execCommand("mceInsertRawHTML", false, content);
|
||||
}
|
||||
}
|
||||
|
||||
function TinyMCE_paste__insertWordContent(content) {
|
||||
if (content && content.length > 0) {
|
||||
// Cleanup Word content
|
||||
var bull = String.fromCharCode(8226);
|
||||
var middot = String.fromCharCode(183);
|
||||
return '';
|
||||
},
|
||||
|
||||
var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
switch (command) {
|
||||
case "mcePasteText":
|
||||
if (user_interface) {
|
||||
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false))
|
||||
TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"), true);
|
||||
else {
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/paste/pastetext.htm'; // Relative to theme
|
||||
template['width'] = 450;
|
||||
template['height'] = 400;
|
||||
var plain_text = "";
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
|
||||
}
|
||||
} else
|
||||
TinyMCE_PastePlugin._insertText(value['html'], value['linebreaks']);
|
||||
|
||||
if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');
|
||||
return true;
|
||||
|
||||
case "mcePasteWord":
|
||||
if (user_interface) {
|
||||
if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) {
|
||||
var html = TinyMCE_PastePlugin._clipboardHTML();
|
||||
|
||||
if (html && html.length > 0)
|
||||
TinyMCE_PastePlugin._insertWordContent(html);
|
||||
} else {
|
||||
var template = new Array();
|
||||
template['file'] = '../../plugins/paste/pasteword.htm'; // Relative to theme
|
||||
template['width'] = 450;
|
||||
template['height'] = 400;
|
||||
var plain_text = "";
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
|
||||
}
|
||||
} else
|
||||
TinyMCE_PastePlugin._insertWordContent(value);
|
||||
|
||||
return true;
|
||||
|
||||
case "mceSelectAll":
|
||||
tinyMCE.execInstanceCommand(editor_id, 'selectall');
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
},
|
||||
|
||||
// Private plugin internal methods
|
||||
|
||||
_handlePasteEvent : function(e) {
|
||||
switch (e.type) {
|
||||
case "paste":
|
||||
var html = TinyMCE_PastePlugin._clipboardHTML();
|
||||
var r, inst = tinyMCE.selectedInstance;
|
||||
|
||||
// Removes italic, strong etc, the if was needed due to bug #1437114
|
||||
if (inst && (r = inst.getRng()) && r.text.length > 0)
|
||||
tinyMCE.execCommand('delete');
|
||||
|
||||
if (html && html.length > 0)
|
||||
tinyMCE.execCommand('mcePasteWord', false, html);
|
||||
|
||||
tinyMCE.cancelEvent(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");
|
||||
content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");
|
||||
content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list
|
||||
content = content.replace(/<o:p><\/o:p>/gi, "");
|
||||
content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks
|
||||
content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); // Word comments
|
||||
content = content.replace(/<\/?span[^>]*>/gi, "");
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");
|
||||
content = content.replace(/<\/?font[^>]*>/gi, "");
|
||||
return true;
|
||||
},
|
||||
|
||||
// Strips class attributes.
|
||||
switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) {
|
||||
case "all":
|
||||
content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
break;
|
||||
_insertText : function(content, bLinebreaks) {
|
||||
if (content && content.length > 0) {
|
||||
if (bLinebreaks) {
|
||||
// Special paragraph treatment
|
||||
if (tinyMCE.getParam("paste_create_paragraphs", true)) {
|
||||
var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
|
||||
case "mso":
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");
|
||||
break;
|
||||
content = tinyMCE.regexpReplace(content, "\r\n\r\n", "</p><p>", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\r\r", "</p><p>", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\n\n", "</p><p>", "gi");
|
||||
|
||||
// Has paragraphs
|
||||
if ((pos = content.indexOf('</p><p>')) != -1) {
|
||||
tinyMCE.execCommand("Delete");
|
||||
|
||||
var node = tinyMCE.selectedInstance.getFocusElement();
|
||||
|
||||
// Get list of elements to break
|
||||
var breakElms = new Array();
|
||||
|
||||
do {
|
||||
if (node.nodeType == 1) {
|
||||
// Don't break tables and break at body
|
||||
if (node.nodeName == "TD" || node.nodeName == "BODY")
|
||||
break;
|
||||
|
||||
breakElms[breakElms.length] = node;
|
||||
}
|
||||
} while(node = node.parentNode);
|
||||
|
||||
var before = "", after = "</p>";
|
||||
before += content.substring(0, pos);
|
||||
|
||||
for (var i=0; i<breakElms.length; i++) {
|
||||
before += "</" + breakElms[i].nodeName + ">";
|
||||
after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">";
|
||||
}
|
||||
|
||||
before += "<p>";
|
||||
content = before + content.substring(pos+7) + after;
|
||||
}
|
||||
}
|
||||
|
||||
if (tinyMCE.getParam("paste_create_linebreaks", true)) {
|
||||
content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi");
|
||||
content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi");
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCE.execCommand("mceInsertRawHTML", false, content);
|
||||
}
|
||||
},
|
||||
|
||||
content = content.replace(new RegExp('href="?' + TinyMCE_paste__reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']);
|
||||
content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
content = content.replace(/<\\?\?xml[^>]*>/gi, "");
|
||||
content = content.replace(/<\/?\w+:[^>]*>/gi, "");
|
||||
content = content.replace(/-- page break --\s*<p> <\/p>/gi, ""); // Remove pagebreaks
|
||||
content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks
|
||||
_insertWordContent : function(content) {
|
||||
if (content && content.length > 0) {
|
||||
// Cleanup Word content
|
||||
var bull = String.fromCharCode(8226);
|
||||
var middot = String.fromCharCode(183);
|
||||
var cb;
|
||||
|
||||
// content = content.replace(/\/? */gi, "");
|
||||
// content = content.replace(/<p> <\/p>/gi, '');
|
||||
if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
|
||||
content = eval(cb + "('before', content)");
|
||||
|
||||
if (!tinyMCE.settings['force_p_newlines']) {
|
||||
content = content.replace('', '' ,'gi');
|
||||
content = content.replace('</p>', '<br /><br />' ,'gi');
|
||||
}
|
||||
var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
|
||||
for (var i=0; i<rl.length; i+=2)
|
||||
content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
|
||||
|
||||
if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) {
|
||||
content = content.replace(/<\/?p[^>]*>/gi, "");
|
||||
}
|
||||
if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');
|
||||
}
|
||||
|
||||
content = content.replace(/<\/?div[^>]*>/gi, "");
|
||||
content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");
|
||||
content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");
|
||||
content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list
|
||||
content = content.replace(/<o:p><\/o:p>/gi, "");
|
||||
content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks
|
||||
content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); // Word comments
|
||||
|
||||
// Convert all middlot lists to UL lists
|
||||
if (tinyMCE.getParam("paste_convert_middot_lists", true)) {
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = content;
|
||||
if (tinyMCE.getParam("paste_remove_spans", true))
|
||||
content = content.replace(/<\/?span[^>]*>/gi, "");
|
||||
|
||||
// Convert all middot paragraphs to li elements
|
||||
var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");
|
||||
if (tinyMCE.getParam("paste_remove_styles", true))
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");
|
||||
|
||||
while (TinyMCE_paste_convertMiddots(div, "--list--")) ; // bull
|
||||
while (TinyMCE_paste_convertMiddots(div, middot, className)) ; // Middot
|
||||
while (TinyMCE_paste_convertMiddots(div, bull)) ; // bull
|
||||
content = content.replace(/<\/?font[^>]*>/gi, "");
|
||||
|
||||
content = div.innerHTML;
|
||||
}
|
||||
|
||||
// Replace all headers with strong and fix some other issues
|
||||
if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(/<h[1-6]> <\/h[1-6]>/gi, '<p> </p>');
|
||||
content = content.replace(/<h[1-6]>/gi, '<p><b>');
|
||||
content = content.replace(/<\/h[1-6]>/gi, '</b></p>');
|
||||
content = content.replace(/<b> <\/b>/gi, '<b> </b>');
|
||||
content = content.replace(/^( )*/gi, '');
|
||||
}
|
||||
|
||||
content = content.replace(/--list--/gi, ""); // Remove --list--
|
||||
|
||||
// Insert cleaned content
|
||||
tinyMCE.execCommand("mceInsertContent", false, content);
|
||||
tinyMCE.execCommand("mceCleanup"); // Do normal cleanup
|
||||
}
|
||||
}
|
||||
|
||||
function TinyMCE_paste__reEscape(s) {
|
||||
var l = "?.\\*[](){}+^$:";
|
||||
var o = "";
|
||||
|
||||
for (var i=0; i<s.length; i++) {
|
||||
var c = s.charAt(i);
|
||||
|
||||
if (l.indexOf(c) != -1)
|
||||
o += '\\' + c;
|
||||
else
|
||||
o += c;
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
function TinyMCE_paste_convertMiddots(div, search, class_name) {
|
||||
var mdot = String.fromCharCode(183);
|
||||
var bull = String.fromCharCode(8226);
|
||||
|
||||
var nodes = div.getElementsByTagName("p");
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
var p = nodes[i];
|
||||
|
||||
// Is middot
|
||||
if (p.innerHTML.indexOf(search) != -1) {
|
||||
var ul = document.createElement("ul");
|
||||
|
||||
if (class_name)
|
||||
ul.className = class_name;
|
||||
|
||||
// Add the first one
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
ul.appendChild(li);
|
||||
|
||||
// Add the rest
|
||||
var np = p.nextSibling;
|
||||
while (np) {
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) == -1)
|
||||
// Strips class attributes.
|
||||
switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) {
|
||||
case "all":
|
||||
content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
break;
|
||||
|
||||
var cp = np.nextSibling;
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
np.parentNode.removeChild(np);
|
||||
ul.appendChild(li);
|
||||
np = cp;
|
||||
case "mso":
|
||||
content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");
|
||||
break;
|
||||
}
|
||||
|
||||
p.parentNode.replaceChild(ul, p);
|
||||
content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']);
|
||||
content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
|
||||
content = content.replace(/<\\?\?xml[^>]*>/gi, "");
|
||||
content = content.replace(/<\/?\w+:[^>]*>/gi, "");
|
||||
content = content.replace(/-- page break --\s*<p> <\/p>/gi, ""); // Remove pagebreaks
|
||||
content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks
|
||||
|
||||
return true;
|
||||
// content = content.replace(/\/? */gi, "");
|
||||
// content = content.replace(/<p> <\/p>/gi, '');
|
||||
|
||||
if (!tinyMCE.settings['force_p_newlines']) {
|
||||
content = content.replace('', '' ,'gi');
|
||||
content = content.replace('</p>', '<br /><br />' ,'gi');
|
||||
}
|
||||
|
||||
if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) {
|
||||
content = content.replace(/<\/?p[^>]*>/gi, "");
|
||||
}
|
||||
|
||||
content = content.replace(/<\/?div[^>]*>/gi, "");
|
||||
|
||||
// Convert all middlot lists to UL lists
|
||||
if (tinyMCE.getParam("paste_convert_middot_lists", true)) {
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = content;
|
||||
|
||||
// Convert all middot paragraphs to li elements
|
||||
var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");
|
||||
|
||||
while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; // bull
|
||||
while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; // Middot
|
||||
while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ; // bull
|
||||
|
||||
content = div.innerHTML;
|
||||
}
|
||||
|
||||
// Replace all headers with strong and fix some other issues
|
||||
if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
|
||||
content = content.replace(/<h[1-6]> <\/h[1-6]>/gi, '<p> </p>');
|
||||
content = content.replace(/<h[1-6]>/gi, '<p><b>');
|
||||
content = content.replace(/<\/h[1-6]>/gi, '</b></p>');
|
||||
content = content.replace(/<b> <\/b>/gi, '<b> </b>');
|
||||
content = content.replace(/^( )*/gi, '');
|
||||
}
|
||||
|
||||
content = content.replace(/--list--/gi, ""); // Remove --list--
|
||||
|
||||
if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
|
||||
content = eval(cb + "('after', content)");
|
||||
|
||||
// Insert cleaned content
|
||||
tinyMCE.execCommand("mceInsertContent", false, content);
|
||||
window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); // Do normal cleanup detached from this thread
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
return false;
|
||||
}
|
||||
_reEscape : function(s) {
|
||||
var l = "?.\\*[](){}+^$:";
|
||||
var o = "";
|
||||
|
||||
function TinyMCE_paste__clipboardHTML() {
|
||||
var div = document.getElementById('_TinyMCE_clipboardHTML');
|
||||
for (var i=0; i<s.length; i++) {
|
||||
var c = s.charAt(i);
|
||||
|
||||
if (!div) {
|
||||
var div = document.createElement('DIV');
|
||||
div.id = '_TinyMCE_clipboardHTML';
|
||||
|
||||
with (div.style) {
|
||||
visibility = 'hidden';
|
||||
overflow = 'hidden';
|
||||
position = 'absolute';
|
||||
width = 1;
|
||||
height = 1;
|
||||
if (l.indexOf(c) != -1)
|
||||
o += '\\' + c;
|
||||
else
|
||||
o += c;
|
||||
}
|
||||
|
||||
document.body.appendChild(div);
|
||||
}
|
||||
return o;
|
||||
},
|
||||
|
||||
div.innerHTML = '';
|
||||
var rng = document.body.createTextRange();
|
||||
rng.moveToElementText(div);
|
||||
rng.execCommand('Paste');
|
||||
var html = div.innerHTML;
|
||||
div.innerHTML = '';
|
||||
return html;
|
||||
}
|
||||
_convertMiddots : function(div, search, class_name) {
|
||||
var mdot = String.fromCharCode(183);
|
||||
var bull = String.fromCharCode(8226);
|
||||
|
||||
var nodes = div.getElementsByTagName("p");
|
||||
var prevul;
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
var p = nodes[i];
|
||||
|
||||
// Is middot
|
||||
if (p.innerHTML.indexOf(search) == 0) {
|
||||
var ul = document.createElement("ul");
|
||||
|
||||
if (class_name)
|
||||
ul.className = class_name;
|
||||
|
||||
// Add the first one
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
ul.appendChild(li);
|
||||
|
||||
// Add the rest
|
||||
var np = p.nextSibling;
|
||||
while (np) {
|
||||
// If the node is whitespace, then
|
||||
// ignore it and continue on.
|
||||
if (np.nodeType == 3 && /^\s$/m.test(np.nodeValue)) {
|
||||
np = np.nextSibling;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (search == mdot) {
|
||||
if (np.nodeType == 1 && /^o(\s+| )/.test(np.innerHTML)) {
|
||||
// Second level of nesting
|
||||
if (!prevul) {
|
||||
prevul = ul;
|
||||
ul = document.createElement("ul");
|
||||
prevul.appendChild(ul);
|
||||
}
|
||||
np.innerHTML = np.innerHTML.replace(/^o/, '');
|
||||
} else {
|
||||
// Pop the stack if we're going back up to the first level
|
||||
if (prevul) {
|
||||
ul = prevul;
|
||||
prevul = null;
|
||||
}
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Not element or middot paragraph
|
||||
if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
var cp = np.nextSibling;
|
||||
var li = document.createElement("li");
|
||||
li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), '');
|
||||
np.parentNode.removeChild(np);
|
||||
ul.appendChild(li);
|
||||
np = cp;
|
||||
}
|
||||
|
||||
p.parentNode.replaceChild(ul, p);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
_clipboardHTML : function() {
|
||||
var div = document.getElementById('_TinyMCE_clipboardHTML');
|
||||
|
||||
if (!div) {
|
||||
var div = document.createElement('DIV');
|
||||
div.id = '_TinyMCE_clipboardHTML';
|
||||
|
||||
with (div.style) {
|
||||
visibility = 'hidden';
|
||||
overflow = 'hidden';
|
||||
position = 'absolute';
|
||||
width = 1;
|
||||
height = 1;
|
||||
}
|
||||
|
||||
document.body.appendChild(div);
|
||||
}
|
||||
|
||||
div.innerHTML = '';
|
||||
var rng = document.body.createTextRange();
|
||||
rng.moveToElementText(div);
|
||||
rng.execCommand('Paste');
|
||||
var html = div.innerHTML;
|
||||
div.innerHTML = '';
|
||||
return html;
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCE.addPlugin("paste", TinyMCE_PastePlugin);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2005/10/18 13:59:43 spocke Exp $
|
||||
* $Id: cs.js,v 1.5 2006/01/11 14:25:49 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
paste_text_desc : 'Indsæt som ren tekst',
|
||||
paste_text_title : 'Brug CTRL+V på tastaturett indsætte teksten i vinduet.',
|
||||
paste_text_desc : 'Indsæt som ren tekst',
|
||||
paste_text_title : 'Brug CTRL+V på tastaturet for at indsætte teksten i vinduet.',
|
||||
paste_text_linebreaks : 'Behold linjebrud',
|
||||
paste_word_desc : 'Indsæt fra Word',
|
||||
paste_word_title : 'Brug CTRL+V på tastaturett indsætte teksten i vinduet.',
|
||||
selectall_desc : 'Vælg alt'
|
||||
paste_word_desc : 'Indsæt fra Word',
|
||||
paste_word_title : 'Brug CTRL+V på tastaturet for at indsætte teksten i vinduet.',
|
||||
selectall_desc : 'Vælg alt'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
paste_text_desc : '作为纯文本粘贴',
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('preview','cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_preview_getInfo(){return{longname:'Preview',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_preview_getControlHTML(control_name){switch(control_name){case "preview":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_preview_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",inline:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";html+=tinyMCE.getParam('doctype');html+='<html xmlns="http://www.w3.org/1999/xhtml">';html+='<head>';html+='<title>'+tinyMCE.getLang('lang_preview_desc')+'</title>';html+='<base href="'+tinyMCE.getParam("document_base_url")+'">';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+tinyMCE.getParam("content_css")+'" rel="stylesheet" type="text/css">';html+='</head>';html+='<body>';html+=tinyMCE.getContent();html+='</body>';html+='</html>';win.document.write(html);win.document.close();}return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('preview','en,tr,cs,de,el,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_PreviewPlugin={getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"preview":return tinyMCE.getButtonHTML(cn,'lang_preview_desc','{$pluginurl}/images/preview.gif','mcePreview');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",inline:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";var c=tinyMCE.getContent();var pos=c.indexOf('<body'),pos2;if(pos!=-1){pos=c.indexOf('>',pos);pos2=c.lastIndexOf('</body>');c=c.substring(pos+1,pos2);}html+=tinyMCE.getParam('doctype');html+='<html xmlns="http://www.w3.org/1999/xhtml">';html+='<head>';html+='<title>'+tinyMCE.getLang('lang_preview_desc')+'</title>';html+='<base href="'+tinyMCE.settings['base_href']+'" />';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';html+='<link href="'+tinyMCE.getParam("content_css")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body dir="'+tinyMCE.getParam("directionality")+'">';html+=c;html+='</body>';html+='</html>';win.document.write(html);win.document.close();}return true;}return false;}};tinyMCE.addPlugin("preview",TinyMCE_PreviewPlugin);
|
||||
|
|
@ -1,72 +1,92 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('preview', 'cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.23 $
|
||||
* $Date: 2006/03/20 12:03:44 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_preview_getInfo() {
|
||||
return {
|
||||
longname : 'Preview',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('preview', 'en,tr,cs,de,el,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
var TinyMCE_PreviewPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Preview',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_preview.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the preview control.
|
||||
*/
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "preview":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_preview_desc', '{$pluginurl}/images/preview.gif', 'mcePreview');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the mcePreview command.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mcePreview":
|
||||
var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
|
||||
var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
|
||||
var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
|
||||
|
||||
// Use a custom preview page
|
||||
if (previewPage) {
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = previewPage;
|
||||
template['width'] = previewWidth;
|
||||
template['height'] = previewHeight;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", inline : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
|
||||
} else {
|
||||
var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight);
|
||||
var html = "";
|
||||
var c = tinyMCE.getContent();
|
||||
var pos = c.indexOf('<body'), pos2;
|
||||
|
||||
if (pos != -1) {
|
||||
pos = c.indexOf('>', pos);
|
||||
pos2 = c.lastIndexOf('</body>');
|
||||
c = c.substring(pos + 1, pos2);
|
||||
}
|
||||
|
||||
html += tinyMCE.getParam('doctype');
|
||||
html += '<html xmlns="http://www.w3.org/1999/xhtml">';
|
||||
html += '<head>';
|
||||
html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
|
||||
html += '<base href="' + tinyMCE.settings['base_href'] + '" />';
|
||||
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
|
||||
html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css" />';
|
||||
html += '</head>';
|
||||
html += '<body dir="' + tinyMCE.getParam("directionality") + '">';
|
||||
html += c;
|
||||
html += '</body>';
|
||||
html += '</html>';
|
||||
|
||||
win.document.write(html);
|
||||
win.document.close();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the preview control.
|
||||
*/
|
||||
function TinyMCE_preview_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "preview":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the mcePreview command.
|
||||
*/
|
||||
function TinyMCE_preview_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mcePreview":
|
||||
var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
|
||||
var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
|
||||
var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
|
||||
|
||||
// Use a custom preview page
|
||||
if (previewPage) {
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = previewPage;
|
||||
template['width'] = previewWidth;
|
||||
template['height'] = previewHeight;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", inline : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
|
||||
} else {
|
||||
var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight);
|
||||
var html = "";
|
||||
|
||||
html += tinyMCE.getParam('doctype');
|
||||
html += '<html xmlns="http://www.w3.org/1999/xhtml">';
|
||||
html += '<head>';
|
||||
html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
|
||||
html += '<base href="' + tinyMCE.getParam("document_base_url") + '">';
|
||||
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
|
||||
html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css">';
|
||||
html += '</head>';
|
||||
html += '<body>';
|
||||
html += tinyMCE.getContent();
|
||||
html += '</body>';
|
||||
html += '</html>';
|
||||
|
||||
win.document.write(html);
|
||||
win.document.close();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
tinyMCE.addPlugin("preview", TinyMCE_PreviewPlugin);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2005/10/18 13:59:43 spocke Exp $
|
||||
* $Id: cs.js,v 1.5 2006/01/11 14:25:49 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Simplified Chinese lang variables contributed by cube316 (cube316@etang.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('',{
|
||||
preview_desc : 'Ô¤ÀÀ'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('print','en,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_print_getInfo(){return{longname:'Print',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_print_getControlHTML(control_name){switch(control_name){case "print":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePrint\',true);return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_print" src="{$pluginurl}/images/print.gif" title="{$lang_print_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_print_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('print','en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_PrintPlugin={getInfo:function(){return{longname:'Print',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},getControlHTML:function(cn){switch(cn){case"print":return tinyMCE.getButtonHTML(cn,'lang_print_desc','{$pluginurl}/images/print.gif','mcePrint');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true;}return false;}};tinyMCE.addPlugin("print",TinyMCE_PrintPlugin);
|
||||
|
|
@ -1,37 +1,49 @@
|
|||
/* Import theme specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('print', 'en,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.19 $
|
||||
* $Date: 2006/02/10 16:29:40 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_print_getInfo() {
|
||||
return {
|
||||
longname : 'Print',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import theme specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('print', 'en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
var TinyMCE_PrintPlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Print',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "print":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_print_desc', '{$pluginurl}/images/print.gif', 'mcePrint');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the search/replace commands.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mcePrint":
|
||||
tinyMCE.getInstanceById(editor_id).contentWindow.print();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
function TinyMCE_print_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "print":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePrint\',true);return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_print" src="{$pluginurl}/images/print.gif" title="{$lang_print_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the search/replace commands.
|
||||
*/
|
||||
function TinyMCE_print_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mcePrint":
|
||||
tinyMCE.getInstanceById(editor_id).contentWindow.print();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
tinyMCE.addPlugin("print", TinyMCE_PrintPlugin);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
|
||||
//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö
|
||||
// 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('',{
|
||||
print_desc : '´òÓ¡'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
tinyMCE.importPluginLanguagePack('save','en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');function TinyMCE_save_getInfo(){return{longname:'Save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_save_getControlHTML(control_name){switch(control_name){case "save":var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');return false;';return '<a href="javascript:'+cmd+'" onclick="'+cmd+'" target="_self" onmousedown="return false;"><img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" /></a>';}return "";}function TinyMCE_save_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceSave":var formObj=tinyMCE.selectedInstance.formElement.form;if(formObj){tinyMCE.triggerSave();for(var i=0;i<formObj.elements.length;i++){var elementId=formObj.elements[i].name?formObj.elements[i].name:formObj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)formObj.elements[i].disabled=true;}tinyMCE.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)tinyMCE.selectedInstance.formElement.form.submit();}else alert("Error: No form element found.");return true;}return false;}
|
||||
tinyMCE.importPluginLanguagePack('save','en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');var TinyMCE_SavePlugin={getInfo:function(){return{longname:'Save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},initInstance:function(inst){inst.addShortcut('ctrl','s','lang_save_desc','mceSave');},getControlHTML:function(cn){switch(cn){case"save":return tinyMCE.getButtonHTML(cn,'lang_save_desc','{$pluginurl}/images/save.gif','mceSave');}return"";},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceSave":if(tinyMCE.getParam("fullscreen_is_enabled"))return true;var inst=tinyMCE.selectedInstance;var formObj=inst.formElement.form;if(tinyMCE.getParam("save_enablewhendirty")&&!inst.isDirty())return true;if(formObj){tinyMCE.triggerSave();var os;if((os=tinyMCE.getParam("save_onsavecallback"))){if(eval(os+'(inst);')){inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);tinyMCE.triggerNodeChange(false,true);}return true;}for(var i=0;i<formObj.elements.length;i++){var elementId=formObj.elements[i].name?formObj.elements[i].name:formObj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)formObj.elements[i].disabled=true;}tinyMCE.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)inst.formElement.form.submit();}else alert("Error: No form element found.");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+'_save','mceButtonDisabled');return true;}if(tinyMCE.getParam("save_enablewhendirty")){var inst=tinyMCE.getInstanceById(editor_id);if(inst.isDirty()){tinyMCE.switchClass(editor_id+'_save','mceButtonNormal');return true;}tinyMCE.switchClass(editor_id+'_save','mceButtonDisabled');}return true;}};tinyMCE.addPlugin("save",TinyMCE_SavePlugin);
|
||||
|
|
@ -1,58 +1,117 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('save', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.26 $
|
||||
* $Date: 2006/02/13 15:09:28 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
function TinyMCE_save_getInfo() {
|
||||
return {
|
||||
longname : 'Save',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('save', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,da,es,cy,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
var TinyMCE_SavePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Save',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_save.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
initInstance : function(inst) {
|
||||
inst.addShortcut('ctrl', 's', 'lang_save_desc', 'mceSave');
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the save control.
|
||||
*/
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "save":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_save_desc', '{$pluginurl}/images/save.gif', 'mceSave');
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the save command.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceSave":
|
||||
if (tinyMCE.getParam("fullscreen_is_enabled"))
|
||||
return true;
|
||||
|
||||
var inst = tinyMCE.selectedInstance;
|
||||
var formObj = inst.formElement.form;
|
||||
|
||||
if (tinyMCE.getParam("save_enablewhendirty") && !inst.isDirty())
|
||||
return true;
|
||||
|
||||
if (formObj) {
|
||||
tinyMCE.triggerSave();
|
||||
|
||||
// Use callback instead
|
||||
var os;
|
||||
if ((os = tinyMCE.getParam("save_onsavecallback"))) {
|
||||
if (eval(os + '(inst);')) {
|
||||
inst.startContent = tinyMCE.trim(inst.getBody().innerHTML);
|
||||
/*inst.undoLevels = new Array();
|
||||
inst.undoIndex = 0;
|
||||
inst.typingUndoIndex = -1;
|
||||
inst.undoRedo = true;
|
||||
inst.undoLevels[inst.undoLevels.length] = inst.startContent;*/
|
||||
tinyMCE.triggerNodeChange(false, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Disable all UI form elements that TinyMCE created
|
||||
for (var i=0; i<formObj.elements.length; i++) {
|
||||
var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
|
||||
|
||||
if (elementId.indexOf('mce_editor_') == 0)
|
||||
formObj.elements[i].disabled = true;
|
||||
}
|
||||
|
||||
tinyMCE.isNotDirty = true;
|
||||
|
||||
if (formObj.onsubmit == null || formObj.onsubmit() != false)
|
||||
inst.formElement.form.submit();
|
||||
} else
|
||||
alert("Error: No form element found.");
|
||||
|
||||
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 + '_save', 'mceButtonDisabled');
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tinyMCE.getParam("save_enablewhendirty")) {
|
||||
var inst = tinyMCE.getInstanceById(editor_id);
|
||||
|
||||
if (inst.isDirty()) {
|
||||
tinyMCE.switchClass(editor_id + '_save', 'mceButtonNormal');
|
||||
return true;
|
||||
}
|
||||
|
||||
tinyMCE.switchClass(editor_id + '_save', 'mceButtonDisabled');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the save control.
|
||||
*/
|
||||
function TinyMCE_save_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "save":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the save command.
|
||||
*/
|
||||
function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceSave":
|
||||
var formObj = tinyMCE.selectedInstance.formElement.form;
|
||||
|
||||
if (formObj) {
|
||||
tinyMCE.triggerSave();
|
||||
|
||||
// Disable all UI form elements that TinyMCE created
|
||||
for (var i=0; i<formObj.elements.length; i++) {
|
||||
var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
|
||||
|
||||
if (elementId.indexOf('mce_editor_') == 0)
|
||||
formObj.elements[i].disabled = true;
|
||||
}
|
||||
|
||||
tinyMCE.isNotDirty = true;
|
||||
|
||||
if (formObj.onsubmit == null || formObj.onsubmit() != false)
|
||||
tinyMCE.selectedInstance.formElement.form.submit();
|
||||
} else
|
||||
alert("Error: No form element found.");
|
||||
|
||||
return true;
|
||||
}
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
tinyMCE.addPlugin("save", TinyMCE_SavePlugin);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2005/10/18 13:59:43 spocke Exp $
|
||||
* $Id: cs.js,v 1.5 2006/01/11 14:25:49 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
|
||||
//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö
|
||||
// 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('',{
|
||||
save_desc : '±£´æ'
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,195 +1,185 @@
|
|||
/* Import theme specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('searchreplace', 'en,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
function TinyMCE_searchreplace_getInfo() {
|
||||
return {
|
||||
longname : 'Search/Replace',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
};
|
||||
|
||||
function TinyMCE_searchreplace_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "search":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSearch\',true);return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_search" src="{$pluginurl}/images/search.gif" title="{$lang_searchreplace_search_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
|
||||
case "replace":
|
||||
var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSearchReplace\',true);return false;';
|
||||
return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_replace" src="{$pluginurl}/images/replace.gif" title="{$lang_searchreplace_replace_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the search/replace commands.
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.27 $
|
||||
* $Date: 2006/02/13 15:09:28 $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
function TinyMCE_searchreplace_execCommand(editor_id, element, command, user_interface, value) {
|
||||
function defValue(key, default_value) {
|
||||
value[key] = typeof(value[key]) == "undefined" ? default_value : value[key];
|
||||
}
|
||||
|
||||
function replaceSel(search_str, str) {
|
||||
// Get current selection
|
||||
if (!tinyMCE.isMSIE) {
|
||||
var sel = instance.contentWindow.getSelection();
|
||||
var rng = sel.getRangeAt(0);
|
||||
} else {
|
||||
var rng = instance.contentWindow.document.selection.createRange();
|
||||
/* Import theme specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('searchreplace', 'en,tr,sv,zh_cn,fa,fr_ca,fr,de,pl,pt_br,cs,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,zh_tw,zh_tw_utf8,sk');
|
||||
|
||||
var TinyMCE_SearchReplacePlugin = {
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Search/Replace',
|
||||
author : 'Moxiecode Systems',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
||||
initInstance : function(inst) {
|
||||
inst.addShortcut('ctrl', 'f', 'lang_searchreplace_search_desc', 'mceSearch', true);
|
||||
},
|
||||
|
||||
getControlHTML : function(cn) {
|
||||
switch (cn) {
|
||||
case "search":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_search_desc', '{$pluginurl}/images/search.gif', 'mceSearch', true);
|
||||
case "replace":
|
||||
return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_replace_desc', '{$pluginurl}/images/replace.gif', 'mceSearchReplace', true);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes the search/replace commands.
|
||||
*/
|
||||
execCommand : function(editor_id, element, command, user_interface, value) {
|
||||
var instance = tinyMCE.getInstanceById(editor_id);
|
||||
|
||||
function defValue(key, default_value) {
|
||||
value[key] = typeof(value[key]) == "undefined" ? default_value : value[key];
|
||||
}
|
||||
|
||||
// Replace current one
|
||||
if (!tinyMCE.isMSIE) {
|
||||
var doc = instance.contentWindow.document;
|
||||
|
||||
// This way works when the replace doesn't contain the search string
|
||||
if (str.indexOf(search_str) == -1) {
|
||||
rng.deleteContents();
|
||||
rng.insertNode(rng.createContextualFragment(str));
|
||||
rng.collapse(false);
|
||||
} else {
|
||||
// Insert content ugly way! Needed to move selection to after replace item
|
||||
doc.execCommand("insertimage", false, "#mce_temp_url#");
|
||||
var elm = tinyMCE.getElementByAttributeValue(doc.body, "img", "src", "#mce_temp_url#");
|
||||
elm.parentNode.replaceChild(doc.createTextNode(str), elm);
|
||||
}
|
||||
} else {
|
||||
if (rng.item)
|
||||
rng.item(0).outerHTML = str;
|
||||
else
|
||||
rng.pasteHTML(str);
|
||||
function replaceSel(search_str, str, back) {
|
||||
instance.execCommand('mceInsertContent', false, str);
|
||||
}
|
||||
}
|
||||
|
||||
var instance = tinyMCE.getInstanceById(editor_id);
|
||||
if (!value)
|
||||
value = new Array();
|
||||
|
||||
if (!value)
|
||||
value = new Array();
|
||||
// Setup defualt values
|
||||
defValue("editor_id", editor_id);
|
||||
defValue("searchstring", "");
|
||||
defValue("replacestring", null);
|
||||
defValue("replacemode", "none");
|
||||
defValue("casesensitive", false);
|
||||
defValue("backwards", false);
|
||||
defValue("wrap", false);
|
||||
defValue("wholeword", false);
|
||||
defValue("inline", "yes");
|
||||
|
||||
// Setup defualt values
|
||||
defValue("editor_id", editor_id);
|
||||
defValue("searchstring", "");
|
||||
defValue("replacestring", null);
|
||||
defValue("replacemode", "none");
|
||||
defValue("casesensitive", false);
|
||||
defValue("backwards", false);
|
||||
defValue("wrap", false);
|
||||
defValue("wholeword", false);
|
||||
defValue("inline", "yes");
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceResetSearch":
|
||||
tinyMCE.lastSearchRng = null;
|
||||
return true;
|
||||
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mceResetSearch":
|
||||
tinyMCE.lastSearchRng = null;
|
||||
return true;
|
||||
case "mceSearch":
|
||||
if (user_interface) {
|
||||
// Open search dialog
|
||||
var template = new Array();
|
||||
|
||||
case "mceSearch":
|
||||
if (user_interface) {
|
||||
// Open search dialog
|
||||
var template = new Array();
|
||||
if (value['replacestring'] != null) {
|
||||
template['file'] = '../../plugins/searchreplace/replace.htm'; // Relative to theme
|
||||
template['width'] = 320;
|
||||
template['height'] = 100 + (tinyMCE.isNS7 ? 20 : 0);
|
||||
template['width'] += tinyMCE.getLang('lang_searchreplace_replace_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0);
|
||||
} else {
|
||||
template['file'] = '../../plugins/searchreplace/search.htm'; // Relative to theme
|
||||
template['width'] = 310;
|
||||
template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0);
|
||||
template['width'] += tinyMCE.getLang('lang_searchreplace_search_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0);
|
||||
}
|
||||
|
||||
if (value['replacestring'] != null) {
|
||||
template['file'] = '../../plugins/searchreplace/replace.htm'; // Relative to theme
|
||||
template['width'] = 320;
|
||||
template['height'] = 120 + (tinyMCE.isNS7 ? 20 : 0);
|
||||
template['width'] += tinyMCE.getLang('lang_searchreplace_replace_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0);
|
||||
instance.execCommand('SelectAll');
|
||||
|
||||
if (tinyMCE.isMSIE) {
|
||||
var r = instance.selection.getRng();
|
||||
r.collapse(true);
|
||||
r.select();
|
||||
} else
|
||||
instance.selection.getSel().collapseToStart();
|
||||
|
||||
tinyMCE.openWindow(template, value);
|
||||
} else {
|
||||
template['file'] = '../../plugins/searchreplace/search.htm'; // Relative to theme
|
||||
template['width'] = 310;
|
||||
template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0);
|
||||
template['width'] += tinyMCE.getLang('lang_searchreplace_search_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_searchreplace_replace_delta_height', 0);
|
||||
}
|
||||
var win = tinyMCE.getInstanceById(editor_id).contentWindow;
|
||||
var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document;
|
||||
var body = tinyMCE.getInstanceById(editor_id).contentWindow.document.body;
|
||||
|
||||
tinyMCE.openWindow(template, value);
|
||||
} else {
|
||||
var win = tinyMCE.getInstanceById(editor_id).contentWindow;
|
||||
var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document;
|
||||
var body = tinyMCE.getInstanceById(editor_id).contentWindow.document.body;
|
||||
|
||||
// Whats the point
|
||||
if (body.innerHTML == "") {
|
||||
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handle replace current
|
||||
if (value['replacemode'] == "current") {
|
||||
replaceSel(value['string'], value['replacestring']);
|
||||
|
||||
// Search next one
|
||||
value['replacemode'] = "none";
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tinyMCE.isMSIE) {
|
||||
var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange();
|
||||
var flags = 0;
|
||||
|
||||
if (value['wholeword'])
|
||||
flags = flags | 2;
|
||||
|
||||
if (value['casesensitive'])
|
||||
flags = flags | 4;
|
||||
|
||||
if (!rng.findText) {
|
||||
alert('This operation is currently not supported by this browser.');
|
||||
// Whats the point
|
||||
if (body.innerHTML == "") {
|
||||
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handle replace all mode
|
||||
if (value['replacemode'] == "all") {
|
||||
while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
|
||||
rng.scrollIntoView();
|
||||
rng.select();
|
||||
rng.collapse(false);
|
||||
replaceSel(value['string'], value['replacestring']);
|
||||
// Handle replace current
|
||||
if (value['replacemode'] == "current") {
|
||||
replaceSel(value['string'], value['replacestring'], value['backwards']);
|
||||
|
||||
// Search next one
|
||||
value['replacemode'] = "none";
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tinyMCE.isMSIE) {
|
||||
var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange();
|
||||
var flags = 0;
|
||||
|
||||
if (value['wholeword'])
|
||||
flags = flags | 2;
|
||||
|
||||
if (value['casesensitive'])
|
||||
flags = flags | 4;
|
||||
|
||||
if (!rng.findText) {
|
||||
alert('This operation is currently not supported by this browser.');
|
||||
return true;
|
||||
}
|
||||
|
||||
alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
|
||||
return true;
|
||||
// Handle replace all mode
|
||||
if (value['replacemode'] == "all") {
|
||||
while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
|
||||
rng.scrollIntoView();
|
||||
rng.select();
|
||||
rng.collapse(false);
|
||||
replaceSel(value['string'], value['replacestring'], value['backwards']);
|
||||
}
|
||||
|
||||
alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
|
||||
rng.scrollIntoView();
|
||||
rng.select();
|
||||
rng.collapse(value['backwards']);
|
||||
tinyMCE.lastSearchRng = rng;
|
||||
} else
|
||||
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
|
||||
} else {
|
||||
if (value['replacemode'] == "all") {
|
||||
while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
|
||||
replaceSel(value['string'], value['replacestring'], value['backwards']);
|
||||
|
||||
alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
|
||||
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
|
||||
}
|
||||
|
||||
if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
|
||||
rng.scrollIntoView();
|
||||
rng.select();
|
||||
rng.collapse(value['backwards']);
|
||||
tinyMCE.lastSearchRng = rng;
|
||||
} else
|
||||
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
|
||||
} else {
|
||||
if (value['replacemode'] == "all") {
|
||||
while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
|
||||
replaceSel(value['string'], value['replacestring']);
|
||||
|
||||
alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
|
||||
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
|
||||
case "mceSearchReplace":
|
||||
value['replacestring'] = "";
|
||||
case "mceSearchReplace":
|
||||
value['replacestring'] = "";
|
||||
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
|
||||
return true;
|
||||
tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
||||
|
||||
function TinyMCE_searchreplace_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
|
||||
return true;
|
||||
}
|
||||
tinyMCE.addPlugin("searchreplace", TinyMCE_SearchReplacePlugin);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ function init() {
|
|||
formObj.searchstring.value = tinyMCE.getWindowArg("searchstring");
|
||||
formObj.replacestring.value = tinyMCE.getWindowArg("replacestring");
|
||||
formObj.casesensitivebox.checked = tinyMCE.getWindowArg("casesensitive");
|
||||
formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards");
|
||||
formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards");
|
||||
// formObj.backwards[0].checked = tinyMCE.getWindowArg("backwards");
|
||||
// formObj.backwards[1].checked = !tinyMCE.getWindowArg("backwards");
|
||||
// formObj.wrapatend.checked = tinyMCE.getWindowArg("wrap");
|
||||
// formObj.wholeword.checked = tinyMCE.getWindowArg("wholeword");
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ function searchNext(replacemode) {
|
|||
replacestring : formObj.replacestring.value,
|
||||
replacemode : replacemode,
|
||||
casesensitive : formObj.casesensitivebox.checked,
|
||||
backwards : formObj.backwards[0].checked
|
||||
backwards : false
|
||||
// wrap : formObj.wrapatend.checked,
|
||||
// wholeword : formObj.wholeword.checked
|
||||
}, false);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Czech lang variables
|
||||
* encoding: utf-8
|
||||
*
|
||||
* $Id: cs.js,v 1.4 2005/10/18 13:59:43 spocke Exp $
|
||||
* $Id: cs.js,v 1.5 2006/01/11 14:25:49 spocke Exp $
|
||||
*/
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
// DK lang variables contributed by Jan Moelgaard
|
||||
// DK lang variables contributed by Jan Moelgaard, John Dalsgaard and Bo Frederiksen.
|
||||
|
||||
tinyMCE.addToLang('',{
|
||||
searchreplace_search_desc : 'Søg',
|
||||
searchreplace_searchnext_desc : 'Søg igen',
|
||||
searchreplace_replace_desc : 'Søg og erstat',
|
||||
searchreplace_notfound : 'Søgningen er færdig. Søgeudtrykket kunne ikke findes.',
|
||||
searchreplace_search_title : 'Søg',
|
||||
searchreplace_replace_title : 'Søg og erstat',
|
||||
searchreplace_allreplaced : 'Alle forekomster af søgeudtrykket blev erstattet.',
|
||||
searchreplace_findwhat : 'Hvad skal vi søge efter',
|
||||
searchreplace_search_desc : 'Søg',
|
||||
searchreplace_searchnext_desc : 'Søg igen',
|
||||
searchreplace_replace_desc : 'Søg og erstat',
|
||||
searchreplace_notfound : 'Søgningen er færdig. Søgeudtrykket kunne ikke findes.',
|
||||
searchreplace_search_title : 'Søg',
|
||||
searchreplace_replace_title : 'Søg og erstat',
|
||||
searchreplace_allreplaced : 'Alle forekomster af søgeudtrykket blev erstattet.',
|
||||
searchreplace_findwhat : 'Hvad skal vi søge efter',
|
||||
searchreplace_replacewith : 'Erstat det med',
|
||||
searchreplace_direction : 'Retning',
|
||||
searchreplace_up : 'Op',
|
||||
searchreplace_down : 'Ned',
|
||||
searchreplace_case : 'Skelne mellem store og små bogstaver',
|
||||
searchreplace_findnext : 'Søg efter næste',
|
||||
searchreplace_case : 'Skelne mellem store og små; bogstaver',
|
||||
searchreplace_findnext : 'Søg efter næste',
|
||||
searchreplace_replace : 'Erstat',
|
||||
searchreplace_replaceall : 'Erstat alle',
|
||||
searchreplace_cancel : 'Fortryd'
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ tinyMCE.addToLang('',{
|
|||
searchreplace_search_desc : 'Find',
|
||||
searchreplace_searchnext_desc : 'Find again',
|
||||
searchreplace_replace_desc : 'Find/Replace',
|
||||
searchreplace_notfound : 'The search has been compleated. The search string could not be found.',
|
||||
searchreplace_notfound : 'The search has been completed. The search string could not be found.',
|
||||
searchreplace_search_title : 'Find',
|
||||
searchreplace_replace_title : 'Find/Replace',
|
||||
searchreplace_allreplaced : 'All occurrences of the search string was replaced.',
|
||||
searchreplace_allreplaced : 'All occurrences of the search string were replaced.',
|
||||
searchreplace_findwhat : 'Find what',
|
||||
searchreplace_replacewith : 'Replace with',
|
||||
searchreplace_direction : 'Direction',
|
||||
|
|
|
|||
|
|
@ -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('',{
|
||||
searchreplace_search_desc : '²éÕÒ',
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<td><input type="text" id="replacestring" name="replacestring" style="width: 200px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
||||
<td colspan="2"><!--<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><label>{$lang_searchreplace_direction}</label></td>
|
||||
<td><input id="backwardsu" name="backwards" class="radio" type="radio" value="true" /></td>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<td><input id="backwardsd" name="backwards" class="radio" type="radio" value="false" /></td>
|
||||
<td><label for="backwardsd">{$lang_searchreplace_down}</label></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</table>--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr id="styleSelectRow">
|
||||
<td><label for="class">{$lang_class_name}</label></td>
|
||||
<td colspan="3">
|
||||
<select id="class" name="class">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue