upgrade to TinyMCE v2.1.0

release-0.6
svncommit 19 years ago
parent e17702395e
commit 87e2fddb32

@ -4,6 +4,7 @@ CHANGELOG RoundCube Webmail
2007/02/25 (estadtherr)
----------
- Fixed priority selector issue (#1484150)
- Upgraded to TinyMCE v2.1.0
2007/02/21 (thomasb)

@ -1,10 +1,10 @@
/**
* $Id: editor_plugin_src.js 18 2006-06-29 14:11:23Z spocke $
* $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $
*
* Experimental plugin for new Cleanup routine, this logic will be moved into the core ones it's stable enougth.
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Dummy file since cleanup is now moved to core */

@ -1 +1 @@
tinyMCE.importPluginLanguagePack('emotions');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems AB',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);
tinyMCE.importPluginLanguagePack('emotions');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',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']=250;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,8 +1,8 @@
/**
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
@ -15,7 +15,7 @@ var TinyMCE_EmotionsPlugin = {
longname : 'Emotions',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},
@ -42,7 +42,7 @@ var TinyMCE_EmotionsPlugin = {
var template = new Array();
template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
template['width'] = 160;
template['width'] = 250;
template['height'] = 160;
// Language specific width and height addons

File diff suppressed because one or more lines are too long

@ -1,8 +1,8 @@
/**
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
@ -14,12 +14,18 @@ var TinyMCE_MediaPlugin = {
longname : 'Media',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_media.html',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},
initInstance : function(inst) {
// Warn if user has flash plugin and media plugin at the same time
if (inst.hasPlugin('flash') && !tinyMCE.flashWarn) {
alert('Flash plugin is deprecated and should not be used together with the media plugin.');
tinyMCE.flashWarn = true;
}
if (!tinyMCE.settings['media_skip_plugin_css'])
tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/media/css/content.css");
},
@ -150,7 +156,7 @@ var TinyMCE_MediaPlugin = {
// Parse attributes
at = attribs['title'];
if (at) {
at = at.replace(/'/g, "'");
at = at.replace(/&(#39|apos);/g, "'");
at = at.replace(/&#quot;/g, '"');
try {
@ -380,7 +386,7 @@ var TinyMCE_MediaPlugin = {
},
_parseAttributes : function(attribute_string) {
var attributeName = "";
var attributeName = "", endChr = '"';
var attributeValue = "";
var withInName;
var withInValue;
@ -395,9 +401,10 @@ var TinyMCE_MediaPlugin = {
for (var i=0; i<attribute_string.length; i++) {
var chr = attribute_string.charAt(i);
if ((chr == '"' || chr == "'") && !withInValue)
if ((chr == '"' || chr == "'") && !withInValue) {
withInValue = true;
else if ((chr == '"' || chr == "'") && withInValue) {
endChr = chr;
} else if (chr == endChr && withInValue) {
withInValue = false;
var pos = attributeName.lastIndexOf(' ');

@ -81,5 +81,14 @@ swstretchvalign : 'Stretch V-Align',
sound : 'Sound',
progress : 'Progress',
qtsrc : 'QT Src',
qt_stream_warn : 'Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..'
});
qt_stream_warn : 'Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..',
align_top : 'Top',
align_right : 'Right',
align_bottom : 'Bottom',
align_left : 'Left',
align_center : 'Center',
align_top_left : 'Top left',
align_top_right : 'Top right',
align_bottom_left : 'Bottom left',
align_bottom_right : 'Bottom right'
});

@ -89,10 +89,10 @@
<td>
<select id="align" name="align" onchange="generatePreview();">
<option value="">{$lang_not_set}</option>
<option value="top">top</option>
<option value="right">right</option>
<option value="bottom">bottom</option>
<option value="left">left</option>
<option value="top">{$lang_media_align_top}</option>
<option value="right">{$lang_media_align_right}</option>
<option value="bottom">{$lang_media_align_bottom}</option>
<option value="left">{$lang_media_align_left}</option>
</select>
</td>
@ -159,14 +159,14 @@
<td>
<select id="flash_salign" name="flash_salign" onchange="generatePreview();">
<option value="">{$lang_not_set}</option>
<option value="l">left</option>
<option value="t">top</option>
<option value="r">right</option>
<option value="b">bottom</option>
<option value="tl">top-left</option>
<option value="tr">top_right</option>
<option value="bl">bottom-left</option>
<option value="br">bottom-right</option>
<option value="l">{$lang_media_align_left}</option>
<option value="t">{$lang_media_align_top}</option>
<option value="r">{$lang_media_align_right}</option>
<option value="b">{$lang_media_align_bottom}</option>
<option value="tl">{$lang_media_align_top_left}</option>
<option value="tr">{$lang_media_align_top_right}</option>
<option value="bl">{$lang_media_align_bottom_left}</option>
<option value="br">{$lang_media_align_bottom_right}</option>
</select>
</td>
</tr>
@ -631,7 +631,7 @@
<td><label for="shockwave_swstretchstyle">{$lang_media_swstretchstyle}</label></td>
<td>
<select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();">
<option value="none">None</option>
<option value="none">{$lang_not_set}</option>
<option value="meet">Meet</option>
<option value="fill">Fill</option>
<option value="stage">Stage</option>
@ -646,20 +646,20 @@
<td><label for="shockwave_swstretchhalign">{$lang_media_swstretchhalign}</label></td>
<td>
<select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();">
<option value="none">None</option>
<option value="left">left</option>
<option value="center">center</option>
<option value="right">right</option>
<option value="none">{$lang_not_set}</option>
<option value="left">{$lang_media_align_left}</option>
<option value="center">{$lang_media_align_center}</option>
<option value="right">{$lang_media_align_right}</option>
</select>
</td>
<td><label for="shockwave_swstretchvalign">{$lang_media_swstretchvalign}</label></td>
<td>
<select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();">
<option value="none">None</option>
<option value="meet">Top</option>
<option value="fill">Center</option>
<option value="stage">Bottom</option>
<option value="none">{$lang_not_set}</option>
<option value="meet">Meet</option>
<option value="fill">Fill</option>
<option value="stage">Stage</option>
</select>
</td>
</tr>

@ -1 +1 @@
tinyMCE.importPluginLanguagePack('nonbreaking');var TinyMCE_NonBreakingPlugin={getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_nonbreaking.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"nonbreaking":return tinyMCE.getButtonHTML(cn,'lang_nonbreaking_desc','{$pluginurl}/images/nonbreaking.gif','mceNonBreaking',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),h;switch(command){case"mceNonBreaking":h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;</span>':'&nbsp;';tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,h);return true}return false},handleEvent:function(e){var inst,h;if(!tinyMCE.isOpera&&e.type=='keydown'&&e.keyCode==9&&tinyMCE.getParam('nonbreaking_force_tab',false)){inst=tinyMCE.selectedInstance;h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;&middot;&middot;</span>':'&nbsp;&nbsp;&nbsp;';tinyMCE.execInstanceCommand(inst.editorId,'mceInsertContent',false,h);tinyMCE.cancelEvent(e);return false}return true}};tinyMCE.addPlugin("nonbreaking",TinyMCE_NonBreakingPlugin);
tinyMCE.importPluginLanguagePack('nonbreaking');var TinyMCE_NonBreakingPlugin={getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"nonbreaking":return tinyMCE.getButtonHTML(cn,'lang_nonbreaking_desc','{$pluginurl}/images/nonbreaking.gif','mceNonBreaking',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),h;switch(command){case"mceNonBreaking":h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;</span>':'&nbsp;';tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,h);return true}return false},handleEvent:function(e){var inst,h;if(!tinyMCE.isOpera&&e.type=='keydown'&&e.keyCode==9&&tinyMCE.getParam('nonbreaking_force_tab',false)){inst=tinyMCE.selectedInstance;h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;&middot;&middot;</span>':'&nbsp;&nbsp;&nbsp;';tinyMCE.execInstanceCommand(inst.editorId,'mceInsertContent',false,h);tinyMCE.cancelEvent(e);return false}return true}};tinyMCE.addPlugin("nonbreaking",TinyMCE_NonBreakingPlugin);

@ -2,7 +2,7 @@
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
@ -14,7 +14,7 @@ var TinyMCE_NonBreakingPlugin = {
longname : 'Nonbreaking space',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_nonbreaking.html',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},

@ -1 +1 @@
tinyMCE.importPluginLanguagePack('searchreplace');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',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""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),selectedText=inst.selection.getSelectedText(),rng;function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key]}function replaceSel(search_str,str,back){inst.execCommand('mceInsertContent',false,str)}if(!value)value=[];defValue("editor_id",editor_id);defValue("searchstring",selectedText);defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");defValue("resizable","no");switch(command){case"mceResetSearch":tinyMCE.lastSearchRng=null;return true;case"mceSearch":if(user_interface){var template=new Array();template['file']='../../plugins/searchreplace/searchreplace.htm';template['width']=380;template['height']=155+(tinyMCE.isNS7?20:0)+(tinyMCE.isMSIE?15:0);template['width']+=tinyMCE.getLang('lang_searchreplace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_delta_height',0);inst.execCommand('SelectAll');if(tinyMCE.isMSIE){var r=inst.selection.getRng();r.collapse(true);r.select()}else inst.selection.getSel().collapseToStart();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;if(body.innerHTML==""){alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring'],value['backwards']);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}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'))}}return true;case"mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true}return false}};tinyMCE.addPlugin("searchreplace",TinyMCE_SearchReplacePlugin);
tinyMCE.importPluginLanguagePack('searchreplace');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',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""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),selectedText=inst.selection.getSelectedText(),rng;function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key]}function replaceSel(search_str,str,back){if(!inst.selection.isCollapsed()){if(tinyMCE.isRealIE)inst.selection.getRng().duplicate().pasteHTML(str);else inst.execCommand('mceInsertContent',false,str)}}if(!value)value=[];defValue("editor_id",editor_id);defValue("searchstring",selectedText);defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");defValue("resizable","no");switch(command){case"mceSearch":if(user_interface){var template=new Array();template['file']='../../plugins/searchreplace/searchreplace.htm';template['width']=380;template['height']=155+(tinyMCE.isNS7?20:0)+(tinyMCE.isMSIE?15:0);template['width']+=tinyMCE.getLang('lang_searchreplace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_delta_height',0);inst.selection.collapse(true);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;var awin=value.win,found;if(body.innerHTML==""){awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring'],value['backwards']);value['replacemode']="none";}inst.selection.collapse(value['backwards']);if(tinyMCE.isMSIE){var rng=inst.selection.getRng();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(!rng.findText){awin.alert('This operation is currently not supported by this browser.');return true}if(value['replacemode']=="all"){found=false;while(rng.findText(value['string'],value['backwards']?-1:1,flags)){found=true;rng.scrollIntoView();rng.select();replaceSel(value['string'],value['replacestring'],value['backwards'])}if(found)awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));else awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select()}else awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'))}else{if(value['replacemode']=="all"){found=false;while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false)){found=true;replaceSel(value['string'],value['replacestring'],value['backwards'])}if(found)awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));else awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'))}}return true;case"mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true}return false}};tinyMCE.addPlugin("searchreplace",TinyMCE_SearchReplacePlugin);

@ -1,8 +1,8 @@
/**
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
tinyMCE.importPluginLanguagePack('searchreplace');
@ -13,7 +13,7 @@ var TinyMCE_SearchReplacePlugin = {
longname : 'Search/Replace',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_searchreplace.html',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},
@ -43,7 +43,12 @@ var TinyMCE_SearchReplacePlugin = {
}
function replaceSel(search_str, str, back) {
inst.execCommand('mceInsertContent', false, str);
if (!inst.selection.isCollapsed()) {
if (tinyMCE.isRealIE)
inst.selection.getRng().duplicate().pasteHTML(str); // Needs to be duplicated due to selection bug in IE
else
inst.execCommand('mceInsertContent', false, str);
}
}
if (!value)
@ -61,10 +66,6 @@ var TinyMCE_SearchReplacePlugin = {
defValue("resizable", "no");
switch (command) {
case "mceResetSearch" :
tinyMCE.lastSearchRng = null;
return true;
case "mceSearch" :
if (user_interface) {
var template = new Array();
@ -75,34 +76,31 @@ var TinyMCE_SearchReplacePlugin = {
template['width'] += tinyMCE.getLang('lang_searchreplace_delta_width', 0);
template['height'] += tinyMCE.getLang('lang_searchreplace_delta_height', 0);
inst.execCommand('SelectAll');
if (tinyMCE.isMSIE) {
var r = inst.selection.getRng();
r.collapse(true);
r.select();
} else
inst.selection.getSel().collapseToStart();
inst.selection.collapse(true);
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;
var awin = value.win, found;
if (body.innerHTML == "") {
alert(tinyMCE.getLang('lang_searchreplace_notfound'));
awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
return true;
}
if (value['replacemode'] == "current") {
replaceSel(value['string'], value['replacestring'], value['backwards']);
value['replacemode'] = "none";
tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
return true;
//tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value);
//return true;
}
inst.selection.collapse(value['backwards']);
if (tinyMCE.isMSIE) {
var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange();
var rng = inst.selection.getRng();
var flags = 0;
if (value['wholeword'])
flags = flags | 2;
@ -111,41 +109,52 @@ var TinyMCE_SearchReplacePlugin = {
flags = flags | 4;
if (!rng.findText) {
alert('This operation is currently not supported by this browser.');
awin.alert('This operation is currently not supported by this browser.');
return true;
}
if (value['replacemode'] == "all") {
found = false;
while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
found = true;
rng.scrollIntoView();
rng.select();
rng.collapse(false);
replaceSel(value['string'], value['replacestring'], value['backwards']);
}
alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
if (found)
awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
else
awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
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'));
awin.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))
found = false;
while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) {
found = true;
replaceSel(value['string'], value['replacestring'], value['backwards']);
}
if (found)
awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
else
awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
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'));
awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
}
}

@ -13,8 +13,6 @@ function init() {
formObj[task + "_panel_casesensitivebox"].checked = tinyMCE.getWindowArg("casesensitive");
formObj[task + "_panel_backwardsu"].checked = tinyMCE.getWindowArg("backwards");
formObj[task + "_panel_backwardsd"].checked = !tinyMCE.getWindowArg("backwards");
tinyMCEPopup.execCommand("mceResetSearch", false, {dummy : ""}, false);
}
function searchNext(replacemode) {
@ -26,7 +24,7 @@ function searchNext(replacemode) {
if (task == "replace") {
// Whats the point?
if (formObj[task + "_panel_searchstring"].value == "" || formObj[task + "_panel_searchstring"].value == formObj[task + "_panel_replacestring"].value)
return;
return false;
}
// Do search
@ -35,10 +33,13 @@ function searchNext(replacemode) {
replacestring : formObj["replace_panel_replacestring"].value,
replacemode : replacemode,
casesensitive : formObj[task + "_panel_casesensitivebox"].checked,
backwards : false
backwards : formObj[task + "_panel_backwardsu"].checked,
win : window
}, false);
window.focus();
return false;
}
function cancelAction() {

@ -90,12 +90,15 @@
</div>
<div class="mceActionPanel">
<div style="text-align: center;">
<div style="float: left">
<input type="button" id="insert" name="insert" value="{$lang_searchreplace_findnext}" onclick="searchNext('none');" />
<span id="replace_buttons">
<input type="button" id="replaceBtn" name="replaceBtn" value="{$lang_searchreplace_replace}" onclick="searchNext('current');" />
<input type="button" id="replaceAllBtn" name="replaceAllBtn" value="{$lang_searchreplace_replaceall}" onclick="searchNext('all');;" />
</span>
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{$lang_searchreplace_cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>

File diff suppressed because one or more lines are too long

@ -1,8 +1,8 @@
/**
* $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
@ -14,7 +14,7 @@ var TinyMCE_TablePlugin = {
longname : 'Tables',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_table.html',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},

@ -3,8 +3,8 @@ var action, orgTableWidth, orgTableHeight;
function insertTable() {
var formObj = document.forms[0];
var inst = tinyMCE.selectedInstance;
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className;
var html = '';
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption;
var html = '', capEl;
var elm = tinyMCE.tableElm;
var cellLimit, rowLimit, colLimit;
@ -33,6 +33,7 @@ function insertTable() {
dir = formObj.elements['dir'].value;
lang = formObj.elements['lang'].value;
background = formObj.elements['backgroundimage'].value;
caption = formObj.elements['caption'].checked;
cellLimit = tinyMCE.getParam('table_cell_limit', false);
rowLimit = tinyMCE.getParam('table_row_limit', false);
@ -65,6 +66,17 @@ function insertTable() {
tinyMCE.setAttrib(elm, 'dir', dir);
tinyMCE.setAttrib(elm, 'lang', lang);
capEl = elm.getElementsByTagName('caption')[0];
if (capEl && !caption)
capEl.parentNode.removeChild(capEl);
if (!capEl && caption) {
capEl = elm.ownerDocument.createElement('caption');
capEl.innerHTML = '&nbsp;';
elm.insertBefore(capEl, elm.firstChild);
}
// Not inline styles
if (!tinyMCE.getParam("inline_styles"))
tinyMCE.setAttrib(elm, 'width', width, true);
@ -132,9 +144,11 @@ function insertTable() {
html += makeAttrib('summary', summary);
html += makeAttrib('dir', dir);
html += makeAttrib('lang', lang);
html += '>';
if (caption)
html += '<caption>&nbsp;</caption>';
for (var y=0; y<rows; y++) {
html += "<tr>";
@ -223,6 +237,7 @@ function init() {
dir = tinyMCE.getAttrib(tinyMCE.tableElm, 'dir');
lang = tinyMCE.getAttrib(tinyMCE.tableElm, 'lang');
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
formObj.caption.checked = tinyMCE.tableElm.getElementsByTagName('caption').length > 0;
orgTableWidth = width;
orgTableHeight = height;

@ -74,5 +74,6 @@ colgroup : 'Col Group',
col_limit : 'You\'ve exceeded the maximum number of columns of {$cols}.',
row_limit : 'You\'ve exceeded the maximum number of rows of {$rows}.',
cell_limit : 'You\'ve exceeded the maximum number of cells of {$cells}.',
missing_scope: 'Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.'
missing_scope: 'Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.',
caption : 'Table caption'
});

@ -60,6 +60,10 @@
<option value="" selected>{$lang_not_set}</option>
</select></td>
</tr>
<tr>
<td class="column1"><label for="caption">{$lang_table_caption}</label></td>
<td><input id="caption" name="caption" type="checkbox" value="true" /></td>
</tr>
</table>
</fieldset>
</div>

@ -1 +1 @@
tinyMCE.importPluginLanguagePack('visualchars');var TinyMCE_VisualCharsPlugin={getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_visualchars.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){inst.visualChars={state:false}},getControlHTML:function(cn){switch(cn){case"visualchars":return tinyMCE.getButtonHTML(cn,'lang_visualchars_desc','{$pluginurl}/images/visualchars.gif','mceVisualChars',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id);switch(command){case"mceVisualChars":this._toggleVisualChars(editor_id,inst);return true}return false},cleanup:function(type,content,inst){if(type=="insert_to_editor_dom"||type=="get_from_editor_dom"){inst.visualChars.state=true;this._toggleVisualChars(inst.editorId,inst)}return content},_toggleVisualChars:function(editor_id,inst){var nl,i,h,d=inst.getDoc(),b=inst.getBody(),nv,s=inst.selection,bo;inst.visualChars.state=!inst.visualChars.state;bo=s.getBookmark(true);tinyMCE.switchClass(editor_id+'_visualchars',inst.visualChars.state?'mceButtonSelected':'mceButtonNormal');if(inst.visualChars.state){nl=tinyMCE.selectNodes(b,function(n){return n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1});for(i=0;i<nl.length;i++){nv=nl[i].nodeValue;nv=nv.replace(/(\u00a0+)/g,'<span class="mceItemHiddenVisualChar">$1</span>');nv=nv.replace(/\u00a0/g,'\u00b7');tinyMCE.setOuterHTML(nl[i],nv,d)}}else{nl=tinyMCE.selectNodes(b,function(n){return n.nodeType==1&&n.nodeName=='SPAN'&&n.className=='mceItemHiddenVisualChar'});for(i=0;i<nl.length;i++)tinyMCE.setOuterHTML(nl[i],nl[i].innerHTML.replace(/(&middot;|\u00b7)/g,'&nbsp;'),d)}}};tinyMCE.addPlugin("visualchars",TinyMCE_VisualCharsPlugin);
tinyMCE.importPluginLanguagePack('visualchars');var TinyMCE_VisualCharsPlugin={getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){inst.visualChars={state:false}},getControlHTML:function(cn){switch(cn){case"visualchars":return tinyMCE.getButtonHTML(cn,'lang_visualchars_desc','{$pluginurl}/images/visualchars.gif','mceVisualChars',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id);switch(command){case"mceVisualChars":this._toggleVisualChars(editor_id,inst);return true}return false},cleanup:function(type,content,inst){if(type=="insert_to_editor_dom"||type=="get_from_editor_dom"){inst.visualChars.state=true;this._toggleVisualChars(inst.editorId,inst)}return content},_toggleVisualChars:function(editor_id,inst){var nl,i,h,d=inst.getDoc(),b=inst.getBody(),nv,s=inst.selection,bo;inst.visualChars.state=!inst.visualChars.state;bo=s.getBookmark(true);tinyMCE.switchClass(editor_id+'_visualchars',inst.visualChars.state?'mceButtonSelected':'mceButtonNormal');if(inst.visualChars.state){nl=tinyMCE.selectNodes(b,function(n){return n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1});for(i=0;i<nl.length;i++){nv=nl[i].nodeValue;nv=nv.replace(/(\u00a0+)/g,'<span class="mceItemHiddenVisualChar">$1</span>');nv=nv.replace(/\u00a0/g,'\u00b7');tinyMCE.setOuterHTML(nl[i],nv,d)}}else{nl=tinyMCE.selectNodes(b,function(n){return n.nodeType==1&&n.nodeName=='SPAN'&&n.className=='mceItemHiddenVisualChar'});for(i=0;i<nl.length;i++)tinyMCE.setOuterHTML(nl[i],nl[i].innerHTML.replace(/(&middot;|\u00b7)/g,'&nbsp;'),d)}}};tinyMCE.addPlugin("visualchars",TinyMCE_VisualCharsPlugin);

@ -2,7 +2,7 @@
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
@ -14,7 +14,7 @@ var TinyMCE_VisualCharsPlugin = {
longname : 'Visual characters',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_visualchars.html',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
};
},

@ -21,7 +21,7 @@
<p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
<p>Copyright &copy; 2003-2006, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
<p>Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
<div id="buttoncontainer"></div>

@ -2,12 +2,73 @@
<head>
<title>{$lang_theme_colorpicker_title}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
<script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
<link href="css/colorpicker.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="margin: 3px; display: none">
<div align="center">
<script language="javascript" type="text/javascript">renderColorMap();</script>
<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
<div class="tabs">
<ul>
<li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{$lang_color_picker_tab}</a></span></li>
<li id="rgb_tab"><span><a href="#" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{$lang_web_colors_tab}</a></span></li>
<li id="named_tab"><span><a href="#" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{$lang_named_colors_tab}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="picker_panel" class="panel current">
<fieldset>
<legend>{$lang_color_picker}</legend>
<div id="picker">
<img id="colorpicker" src="images/colors.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
<div id="light">
<!-- Will be filled with divs -->
</div>
<br style="clear: both" />
</div>
</fieldset>
</div>
<div id="rgb_panel" class="panel">
<fieldset>
<legend>{$lang_web_colors}</legend>
<div id="webcolors">
<!-- Gets filled with web safe colors-->
</div>
<br style="clear: both" />
</fieldset>
</div>
<div id="named_panel" class="panel">
<fieldset>
<legend>{$lang_named_colors}</legend>
<div id="namedcolors">
<!-- Gets filled with named colors-->
</div>
<br style="clear: both" />
<div id="colornamecontainer">
{$lang_color_name} <span id="colorname"></span>
</div>
</fieldset>
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" onclick="insertAction();" />
</div>
<div id="preview"></div>
<div id="previewblock">
<label for="color">{$lang_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text" />
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -1,8 +1,8 @@
/**
* $Id: editor_template_src.js 129 2006-10-23 09:45:17Z spocke $
* $Id: editor_template_src.js 218 2007-02-13 11:08:01Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/* Import theme specific language pack */
@ -43,7 +43,9 @@ var TinyMCE_AdvancedTheme = {
['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'],
['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'],
['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolor', true],
['forecolorpicker', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolorpicker', true],
['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'HiliteColor', true],
['backcolorpicker', 'backcolor.gif', 'lang_theme_backcolor_desc', 'backcolorpicker', true],
['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'],
['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'],
['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor'],
@ -356,6 +358,10 @@ var TinyMCE_AdvancedTheme = {
return false;
case "forecolorpicker":
this._pickColor(editor_id, 'forecolor');
return true;
case "forecolorMenu":
TinyMCE_AdvancedTheme._hideMenus(editor_id);
@ -420,15 +426,21 @@ var TinyMCE_AdvancedTheme = {
ml.show();
return true;
case "backcolorpicker":
this._pickColor(editor_id, 'HiliteColor');
return true;
case "mceColorPicker":
if (user_interface) {
var template = new Array();
var inputColor = value['document'].getElementById(value['element_id']).value;
var template = [];
if (!value['callback'] && !value['color'])
value['color'] = value['document'].getElementById(value['element_id']).value;
template['file'] = 'color_picker.htm';
template['width'] = 220;
template['height'] = 190;
template['width'] = 380;
template['height'] = 250;
template['close_previous'] = "no";
template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0);
@ -438,10 +450,16 @@ var TinyMCE_AdvancedTheme = {
value['store_selection'] = true;
tinyMCE.lastColorPickerValue = value;
tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor});
tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : value['color']});
} else {
var savedVal = tinyMCE.lastColorPickerValue;
var elm = savedVal['document'].getElementById(savedVal['element_id']);
var savedVal = tinyMCE.lastColorPickerValue, elm;
if (savedVal['callback']) {
savedVal['callback'](value);
return true;
}
elm = savedVal['document'].getElementById(savedVal['element_id']);
elm.value = value;
if (elm.onchange != null && elm.onchange != '')
@ -599,9 +617,8 @@ var TinyMCE_AdvancedTheme = {
// Setup template html
template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';
if (toolbarLocation == "top") {
template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
}
if (toolbarLocation == "top")
template['html'] += '<tr><td dir="ltr" class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
if (statusbarLocation == "top") {
template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';
@ -610,9 +627,8 @@ var TinyMCE_AdvancedTheme = {
template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
if (toolbarLocation == "bottom") {
template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
}
if (toolbarLocation == "bottom")
template['html'] += '<tr><td dir="ltr" class="mceToolbarBottom" align="' + toolbarAlign + '" height="1"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
// External toolbar changes
if (toolbarLocation == "external") {
@ -713,8 +729,13 @@ var TinyMCE_AdvancedTheme = {
template['html'] += '<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';
template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);
template['delta_width'] = 0;
template['delta_height'] = deltaHeight;
// Set to default values
if (!template['delta_width'])
template['delta_width'] = 0;
if (!template['delta_height'])
template['delta_height'] = deltaHeight;
return template;
},
@ -732,6 +753,15 @@ var TinyMCE_AdvancedTheme = {
inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink');
},
removeInstance : function(inst) {
new TinyMCE_Layer(inst.editorId + '_fcMenu').remove();
new TinyMCE_Layer(inst.editorId + '_bcMenu').remove();
},
hideInstance : function(inst) {
TinyMCE_AdvancedTheme._hideMenus(inst.editorId);
},
_handleMenuEvent : function(e) {
var te = tinyMCE.isMSIE ? window.event.srcElement : e.target;
tinyMCE._menuButtonEvent(e.type == "mouseover" ? "over" : "out", document.getElementById(te._switchId));
@ -782,10 +812,6 @@ var TinyMCE_AdvancedTheme = {
return false;
};
function getAttrib(elm, name) {
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
};
// No node provided
if (node == null)
return;
@ -839,7 +865,7 @@ var TinyMCE_AdvancedTheme = {
var st = tinyMCE.getAttrib(path[i], "style");
if (st != "") {
st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st));
nodeData += "style: " + st + " ";
nodeData += "style: " + tinyMCE.xmlEncode(st) + " ";
}
}
@ -849,18 +875,18 @@ var TinyMCE_AdvancedTheme = {
var face = tinyMCE.getAttrib(path[i], "face");
if (face != "")
nodeData += "font: " + face + " ";
nodeData += "font: " + tinyMCE.xmlEncode(face) + " ";
var size = tinyMCE.getAttrib(path[i], "size");
if (size != "")
nodeData += "size: " + size + " ";
nodeData += "size: " + tinyMCE.xmlEncode(size) + " ";
var color = tinyMCE.getAttrib(path[i], "color");
if (color != "")
nodeData += "color: " + color + " ";
nodeData += "color: " + tinyMCE.xmlEncode(color) + " ";
}
if (getAttrib(path[i], 'id') != "") {
if (tinyMCE.getAttrib(path[i], 'id') != "") {
nodeData += "id: " + path[i].getAttribute('id') + " ";
}
@ -868,22 +894,22 @@ var TinyMCE_AdvancedTheme = {
if (className != "" && className.indexOf('mceItem') == -1)
nodeData += "class: " + className + " ";
if (getAttrib(path[i], 'src') != "") {
if (tinyMCE.getAttrib(path[i], 'src') != "") {
var src = tinyMCE.getAttrib(path[i], "mce_src");
if (src == "")
src = tinyMCE.getAttrib(path[i], "src");
nodeData += "src: " + src + " ";
nodeData += "src: " + tinyMCE.xmlEncode(src) + " ";
}
if (path[i].nodeName == 'A' && getAttrib(path[i], 'href') != "") {
if (path[i].nodeName == 'A' && tinyMCE.getAttrib(path[i], 'href') != "") {
var href = tinyMCE.getAttrib(path[i], "mce_href");
if (href == "")
href = tinyMCE.getAttrib(path[i], "href");
nodeData += "href: " + href + " ";
nodeData += "href: " + tinyMCE.xmlEncode(href) + " ";
}
className = tinyMCE.getAttrib(path[i], "class");
@ -894,11 +920,11 @@ var TinyMCE_AdvancedTheme = {
if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
nodeName = "a";
nodeName += "#" + anchor;
nodeName += "#" + tinyMCE.xmlEncode(anchor);
nodeData = "";
}
if (getAttrib(path[i], 'name').indexOf("mce_") != 0) {
if (tinyMCE.getAttrib(path[i], 'name').indexOf("mce_") != 0) {
var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
if (className != "" && className.indexOf('mceItem') == -1) {
nodeName += "." + className;
@ -1124,7 +1150,7 @@ var TinyMCE_AdvancedTheme = {
break;
case "IMG":
if (getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
if (tinyMCE.getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected');
}
break;
@ -1371,13 +1397,27 @@ var TinyMCE_AdvancedTheme = {
}
h += '</tr></table>';
/*
h += '<a href="" class="mceMoreColors">More colors</a>';
*/
if (tinyMCE.getParam("theme_advanced_more_colors", true))
h += '<a href="#" onclick="TinyMCE_AdvancedTheme._pickColor(\'' + id + '\',\'' + cm + '\');" class="mceMoreColors">' + tinyMCE.getLang('lang_more_colors') + '</a>';
return h;
},
_pickColor : function(id, cm) {
var inputColor, inst = tinyMCE.selectedInstance;
if (cm == 'forecolor' && inst)
inputColor = inst.foreColor;
if ((cm == 'backcolor' || cm == 'HiliteColor') && inst)
inputColor = inst.backColor;
tinyMCE.execCommand('mceColorPicker', true, {color : inputColor, callback : function(c) {
tinyMCE.execInstanceCommand(id, cm, false, c);
}});
},
_insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) {
tinyMCE.execCommand('mceBeginUndoLevel');

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -1,19 +1,4 @@
function init() {
if (tinyMCE.isMSIE)
tinyMCEPopup.resizeToInnerSize();
}
function selectColor() {
var color = document.getElementById("selectedColorBox").value;
tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color);
tinyMCEPopup.close();
}
function showColor(color) {
document.getElementById("selectedColor").style.backgroundColor = color;
document.getElementById("selectedColorBox").value = color;
}
var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
var colors = new Array(
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
@ -45,9 +30,71 @@ var colors = new Array(
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
);
var named = {
'#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown',
'#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue',
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod',
'#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen',
'#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue',
'#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue',
'#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen',
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey',
'#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory',
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue',
'#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen',
'#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey',
'#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
'#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue',
'#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin',
'#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid',
'#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff',
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue',
'#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver',
'#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen',
'#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen'
};
function init() {
var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color'));
if (tinyMCE.isMSIE)
tinyMCEPopup.resizeToInnerSize();
generatePicker();
if (inputColor) {
changeFinalColor(inputColor);
col = convertHexToRGB(inputColor);
if (col)
updateLight(col.r, col.g, col.b);
}
}
function insertAction() {
var color = document.getElementById("color").value;
tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color);
tinyMCEPopup.close();
}
function showColor(color, name) {
if (name)
document.getElementById("colorname").innerHTML = name;
document.getElementById("preview").style.backgroundColor = color;
document.getElementById("color").value = color;
}
function convertRGBToHex(col) {
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
if (!col)
return col;
var rgb = col.replace(re, "$1,$2,$3").split(',');
if (rgb.length == 3) {
r = parseInt(rgb[0]).toString(16);
@ -72,37 +119,131 @@ function convertHexToRGB(col) {
g = parseInt(col.substring(2, 4), 16);
b = parseInt(col.substring(4, 6), 16);
return "rgb(" + r + "," + g + "," + b + ")";
return {r : r, g : g, b : b};
}
return col;
return null;
}
function renderColorMap() {
var html = "";
var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color'));
function generatePicker() {
var el = document.getElementById('light'), h = '', i;
for (i = 0; i < detail; i++){
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
+ ' onmousedown="isMouseDown = true; return false;"'
+ ' onmouseup="isMouseDown = false;"'
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
+ ' onmouseover="isMouseOver = true;"'
+ ' onmouseout="isMouseOver = false;"'
+ '></div>';
}
el.innerHTML = h;
}
function generateWebColors() {
var el = document.getElementById('webcolors'), h = '', i;
if (el.className == 'generated')
return;
html += '<table border="0" cellspacing="1" cellpadding="0">'
h += '<table border="0" cellspacing="1" cellpadding="0">'
+ '<tr>';
for (var i=0; i<colors.length; i++) {
html += '<td bgcolor="' + colors[i] + '">'
for (i=0; i<colors.length; i++) {
h += '<td bgcolor="' + colors[i] + '">'
+ '<a href="javascript:selectColor();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');">'
+ '<img border="0" src="images/spacer.gif" width="10" height="10" title="' + colors[i] + '" alt="' + colors[i] + '" /></a></td>';
if ((i+1) % 18 == 0)
html += '</tr><tr>';
h += '</tr><tr>';
}
h += '</table>';
el.innerHTML = h;
el.className = 'generated';
}
function generateNamedColors() {
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
if (el.className == 'generated')
return;
for (n in named) {
v = named[n];
h += '<a href="javascript:selectColor();" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '"><!-- IE --></a>'
}
el.innerHTML = h;
el.className = 'generated';
}
function selectColor() {
var color = document.getElementById("color").value;
if(window.opener)
window.opener.tinyMCE.execInstanceCommand(tinyMCE.getWindowArg('editor_id'),tinyMCE.getWindowArg('command'),false,color);
window.close();
}
function dechex(n) {
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
}
function computeColor(e) {
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB;
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0);
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0);
partWidth = document.getElementById('colorpicker').width / 6;
partDetail = detail / 2;
imHeight = document.getElementById('colorpicker').height;
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
coef = (imHeight - y) / imHeight;
r = 128 + (r - 128) * coef;
g = 128 + (g - 128) * coef;
b = 128 + (b - 128) * coef;
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
updateLight(r, g, b);
}
function updateLight(r, g, b) {
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
for (i=0; i<detail; i++) {
if ((i>=0) && (i<partDetail)) {
finalCoef = i / partDetail;
finalR = dechex(255 - (255 - r) * finalCoef);
finalG = dechex(255 - (255 - g) * finalCoef);
finalB = dechex(255 - (255 - b) * finalCoef);
} else {
finalCoef = 2 - i / partDetail;
finalR = dechex(r * finalCoef);
finalG = dechex(g * finalCoef);
finalB = dechex(b * finalCoef);
}
color = finalR + finalG + finalB;
document.getElementById('gs' + i).style.backgroundColor = '#'+color;
}
html += '<tr><td colspan="18">'
+ '<table width="100%" border="0" cellspacing="0" cellpadding="0">'
+ '<tr><td>'
+ '<img id="selectedColor" style="background-color:' + tinyMCE.getWindowArg('input_color') + '" border="0" src="images/spacer.gif" width="80" height="16" />'
+ '</td><td align="right">'
+ '<input id="selectedColorBox" name="selectedColorBox" type="text" size="7" maxlength="7" style="width:65px" value="' + inputColor + '" />'
+ '</td></tr>'
+ '</table>'
+ '<div style="float: left"><input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" style="margin-top:3px" onclick="selectColor();"></div>'
+ '<div style="float: right"><input type="button" name="cancel" value="{$lang_cancel}" style="margin-top:3px" onclick="tinyMCEPopup.close();" id="cancel" /></div>'
+ '</td></tr>'
+ '</table>';
document.write(html);
}
}
function changeFinalColor(color) {
if (color.indexOf('#') == -1)
color = convertRGBToHex(color);
document.getElementById('preview').style.backgroundColor = color;
document.getElementById('color').value = color;
}
window.focus();

@ -57,10 +57,6 @@ function insertLink() {
var style_class = document.forms[0].styleSelect ? document.forms[0].styleSelect.value : "";
var dummy;
// Make anchors absolute
if (href.charAt(0) == '#')
href = tinyMCE.settings['document_base_url'] + href;
if (target == '_self')
target = '';

@ -25,7 +25,7 @@ function setWrap(val) {
s.wrap = val;
if (tinyMCE.isGecko) {
if (tinyMCE.isGecko || tinyMCE.isOpera) {
var v = s.value;
var n = s.cloneNode(false);
n.setAttribute("wrap", val);
@ -47,14 +47,13 @@ function resizeInputs() {
var el = document.getElementById('htmlSource');
if (!tinyMCE.isMSIE) {
wHeight = self.innerHeight-80;
wWidth = self.innerWidth-16;
wHeight = self.innerHeight - 60;
wWidth = self.innerWidth - 16;
} else {
wHeight = document.body.clientHeight - 80;
wHeight = document.body.clientHeight - 60;
wWidth = document.body.clientWidth - 16;
}
el.style.height = Math.abs(wHeight) + 'px';
el.style.width = Math.abs(wWidth) + 'px';
}

@ -78,5 +78,14 @@ help : 'Help',
not_set : '-- Not set --',
close : 'Close',
toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X',
invalid_data : 'Error: Invalid values entered, these are marked in red.'
invalid_data : 'Error: Invalid values entered, these are marked in red.',
more_colors : 'More colors',
color_picker_tab : 'Picker',
color_picker : 'Color picker',
web_colors_tab : 'Web safe',
web_colors : 'Web safe colors',
named_colors_tab : 'Named',
named_colors : 'Named colors',
color : 'Color:',
color_name : 'Name:'
});

File diff suppressed because one or more lines are too long

@ -5,8 +5,8 @@ function TinyMCE_Engine() {
var ua;
this.majorVersion = "2";
this.minorVersion = "0.8";
this.releaseDate = "2006-10-23";
this.minorVersion = "1.0";
this.releaseDate = "2007-02-13";
this.instances = new Array();
this.switchClassCache = new Array();
@ -186,12 +186,13 @@ TinyMCE_Engine.prototype = {
this._def("custom_shortcuts", true);
this._def("convert_on_click", false);
this._def("content_css", '');
this._def("fix_list_elements", false);
this._def("fix_list_elements", true);
this._def("fix_table_elements", false);
this._def("strict_loading_mode", document.contentType == 'application/xhtml+xml');
this._def("hidden_tab_class", '');
this._def("display_tab_class", '');
this._def("gecko_spellcheck", false);
this._def("hide_selects_on_submit", true);
// Force strict loading mode to false on non Gecko browsers
if (this.isMSIE && !this.isOpera)
@ -240,9 +241,9 @@ TinyMCE_Engine.prototype = {
this.blockElms = 'H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP';
this.blockRegExp = new RegExp("^(" + this.blockElms + ")$", "i");
this.posKeyCodes = new Array(13,45,36,35,33,34,37,38,39,40);
this.uniqueURL = 'javascript:TINYMCE_UNIQUEURL();'; // Make unique URL non real URL
this.uniqueURL = 'javascript:void(091039730);'; // Make unique URL non real URL
this.uniqueTag = '<div id="mceTMPElement" style="display: none">TMP</div>';
this.callbacks = new Array('onInit', 'getInfo', 'getEditorTemplate', 'setupContent', 'onChange', 'onPageLoad', 'handleNodeChange', 'initInstance', 'execCommand', 'getControlHTML', 'handleEvent', 'cleanup');
this.callbacks = new Array('onInit', 'getInfo', 'getEditorTemplate', 'setupContent', 'onChange', 'onPageLoad', 'handleNodeChange', 'initInstance', 'execCommand', 'getControlHTML', 'handleEvent', 'cleanup', 'removeInstance');
// Theme url
this.settings['theme_href'] = tinyMCE.baseURL + "/themes/" + theme;
@ -338,6 +339,11 @@ TinyMCE_Engine.prototype = {
} catch (e) {
}
}
// Setup XML encoding regexps
this.xmlEncodeAposRe = new RegExp('[<>&"\']', 'g');
this.xmlEncodeRe = new RegExp('[<>&"]', 'g');
// this.xmlEncodeEnts = {'&':'&amp;','"':'&quot;',"'":'&#39;','<':'&lt;','>':'&gt;'};
},
_addUnloadEvents : function() {
@ -570,6 +576,9 @@ TinyMCE_Engine.prototype = {
tinyMCE.undoLevels = n;
tinyMCE.undoIndex = n.length;
// Dispatch remove instance call
tinyMCE.dispatchCallback(ti, 'remove_instance_callback', 'removeInstance', ti);
return ti;
},
@ -731,6 +740,35 @@ TinyMCE_Engine.prototype = {
tinyMCE.removeMCEControl(value);
return;
case "mceToggleEditor":
var inst = tinyMCE.getInstanceById(value), pe, te;
if (inst) {
pe = document.getElementById(inst.editorId + '_parent');
te = inst.oldTargetElement;
if (typeof(inst.enabled) == 'undefined')
inst.enabled = true;
inst.enabled = !inst.enabled;
if (!inst.enabled) {
pe.style.display = 'none';
te.value = inst.getHTML();
te.style.display = inst.oldTargetDisplay;
tinyMCE.dispatchCallback(inst, 'hide_instance_callback', 'hideInstance', inst);
} else {
pe.style.display = 'block';
te.style.display = 'none';
inst.setHTML(te.value);
inst.useCSS = false;
tinyMCE.dispatchCallback(inst, 'show_instance_callback', 'showInstance', inst);
}
} else
tinyMCE.addMCEControl(tinyMCE._getElementById(value), value);
return;
case "mceResetDesignMode":
// Resets the designmode state of the editors in Gecko
if (!tinyMCE.isIE) {
@ -836,6 +874,7 @@ TinyMCE_Engine.prototype = {
content = content.replace(/&amp;/g, '&');
}
tinyMCE.selectedInstance = inst;
inst.switchSettings();
// Not loaded correctly hit it again, Mozilla bug #997860
@ -951,10 +990,6 @@ TinyMCE_Engine.prototype = {
// Fix for bug #957681
//inst.getDoc().designMode = inst.getDoc().designMode;
// Setup element references
var parentElm = inst.targetDoc.getElementById(inst.editorId + '_parent');
inst.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling;
tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst);
tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc());
@ -1015,8 +1050,8 @@ TinyMCE_Engine.prototype = {
storeAwayURLs : function(s) {
// Remove all mce_src, mce_href and replace them with new ones
// s = s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');
// s = s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');
// s = s.replace(new RegExp('mce_src\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');
// s = s.replace(new RegExp('mce_href\\s*=\\s*\"[^ >\"]*\"', 'gi'), '');
if (!s.match(/(mce_src|mce_href)/gi, s)) {
s = s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"', 'gi'), 'src="$1" mce_src="$1"');
@ -1038,6 +1073,38 @@ TinyMCE_Engine.prototype = {
}
},
removeTinyMCEFormElements : function(form_obj) {
var i, elementId;
// Skip form element removal
if (!tinyMCE.getParam('hide_selects_on_submit'))
return;
// Check if form is valid
if (typeof(form_obj) == "undefined" || form_obj == null)
return;
// If not a form, find the form
if (form_obj.nodeName != "FORM") {
if (form_obj.form)
form_obj = form_obj.form;
else
form_obj = tinyMCE.getParentElement(form_obj, "form");
}
// Still nothing
if (form_obj == null)
return;
// Disable all UI form elements that TinyMCE created
for (i=0; i<form_obj.elements.length; i++) {
elementId = form_obj.elements[i].name ? form_obj.elements[i].name : form_obj.elements[i].id;
if (elementId.indexOf('mce_editor_') == 0)
form_obj.elements[i].disabled = true;
}
},
handleEvent : function(e) {
var inst = tinyMCE.selectedInstance;
@ -1086,6 +1153,7 @@ TinyMCE_Engine.prototype = {
return;
case "submit":
tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE ? window.event.srcElement : e.target);
tinyMCE.triggerSave();
tinyMCE.isNotDirty = true;
return;
@ -1402,9 +1470,9 @@ TinyMCE_Engine.prototype = {
h += '</a></span>';
} else {
if (tinyMCE.isRealIE)
h += '<span id="{$editor_id}_' + id + '" class="mceMenuButton" onmouseover="tinyMCE._menuButtonEvent(\'over\',this);tinyMCE.lastHover = this;" onmouseout="tinyMCE._menuButtonEvent(\'out\',this);">';
h += '<span id="{$editor_id}_' + id + '" dir="ltr" class="mceMenuButton" onmouseover="tinyMCE._menuButtonEvent(\'over\',this);tinyMCE.lastHover = this;" onmouseout="tinyMCE._menuButtonEvent(\'out\',this);">';
else
h += '<span id="{$editor_id}_' + id + '" class="mceMenuButton">';
h += '<span id="{$editor_id}_' + id + '" dir="ltr" class="mceMenuButton">';
h += '<a href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" class="mceMenuButtonNormal" target="_self">';
h += '<img src="' + img + '" title="{$' + lang + '}" /></a>';
@ -1433,6 +1501,7 @@ TinyMCE_Engine.prototype = {
},
submitPatch : function() {
tinyMCE.removeTinyMCEFormElements(this);
tinyMCE.triggerSave();
tinyMCE.isNotDirty = true;
this.mceOldSubmit();
@ -1649,14 +1718,19 @@ TinyMCE_Engine.prototype = {
},
triggerNodeChange : function(focus, setup_content) {
var elm, inst, editorId, undoIndex = -1, undoLevels = -1, doc, anySelection = false, st;
if (tinyMCE.selectedInstance) {
var inst = tinyMCE.selectedInstance;
var editorId = inst.editorId;
var elm = (typeof(setup_content) != "undefined" && setup_content) ? tinyMCE.selectedElement : inst.getFocusElement();
var undoIndex = -1, doc;
var undoLevels = -1;
var anySelection = false;
var selectedText = inst.selection.getSelectedText();
inst = tinyMCE.selectedInstance;
elm = (typeof(setup_content) != "undefined" && setup_content) ? tinyMCE.selectedElement : inst.getFocusElement();
/* if (elm == inst.lastTriggerEl)
return;
inst.lastTriggerEl = elm;*/
editorId = inst.editorId;
st = inst.selection.getSelectedText();
if (tinyMCE.settings.auto_resize)
inst.resizeToContent();
@ -1667,7 +1741,7 @@ TinyMCE_Engine.prototype = {
inst.switchSettings();
if (tinyMCE.selectedElement)
anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0);
anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (st && st.length > 0);
if (tinyMCE.settings['custom_undo_redo']) {
undoIndex = inst.undoRedo.undoIndex;
@ -1754,6 +1828,8 @@ TinyMCE_Engine.prototype = {
openWindow : function(template, args) {
var html, width, height, x, y, resizable, scrollbars, url;
args = !args ? {} : args;
args['mce_template_file'] = template['file'];
args['mce_width'] = template['width'];
args['mce_height'] = template['height'];
@ -2129,11 +2205,11 @@ TinyMCE_Engine.prototype = {
},
getCSSClasses : function(editor_id, doc) {
var output = new Array();
var inst = tinyMCE.getInstanceById(editor_id);
// Is cached, use that
if (typeof(tinyMCE.cssClasses) != "undefined")
return tinyMCE.cssClasses;
if (inst && inst.cssClasses.length > 0)
return inst.cssClasses;
if (typeof(editor_id) == "undefined" && typeof(doc) == "undefined") {
var instance;
@ -2191,13 +2267,13 @@ TinyMCE_Engine.prototype = {
var cssClass = rule.substring(rule.indexOf('.') + 1);
var addClass = true;
for (var p=0; p<output.length && addClass; p++) {
if (output[p] == cssClass)
for (var p=0; p<inst.cssClasses.length && addClass; p++) {
if (inst.cssClasses[p] == cssClass)
addClass = false;
}
if (addClass)
output[output.length] = cssClass;
inst.cssClasses[inst.cssClasses.length] = cssClass;
}
}
}
@ -2206,11 +2282,7 @@ TinyMCE_Engine.prototype = {
}
}
// Cache em
if (output.length > 0)
tinyMCE.cssClasses = output;
return output;
return inst.cssClasses;
},
regexpReplace : function(in_str, reg_exp, replace_str, opts) {
@ -2238,36 +2310,36 @@ TinyMCE_Engine.prototype = {
},
getControlHTML : function(c) {
var i, l, n, o, v;
var i, l, n, o, v, rtl = tinyMCE.getLang('lang_dir') == 'rtl';
l = tinyMCE.plugins;
for (n in l) {
o = l[n];
if (o.getControlHTML && (v = o.getControlHTML(c)) != '')
if (o.getControlHTML && (v = o.getControlHTML(c)) != '') {
if (rtl)
return '<span dir="rtl">' + tinyMCE.replaceVar(v, "pluginurl", o.baseURL) + '</span>';
return tinyMCE.replaceVar(v, "pluginurl", o.baseURL);
}
}
o = tinyMCE.themes[tinyMCE.settings['theme']];
if (o.getControlHTML && (v = o.getControlHTML(c)) != '')
if (o.getControlHTML && (v = o.getControlHTML(c)) != '') {
if (rtl)
return '<span dir="rtl">' + v + '</span>';
return v;
}
return '';
},
evalFunc : function(f, idx, a, o) {
var s = '(', i;
for (i=idx; i<a.length; i++) {
s += 'a[' + i + ']';
if (i < a.length-1)
s += ',';
}
o = !o ? window : o;
f = typeof(f) == 'function' ? f : o[f];
s += ');';
return o ? eval("o." + f + s) : eval("f" + s);
return f.apply(o, Array.prototype.slice.call(a, idx));
},
dispatchCallback : function(i, p, n) {
@ -2289,7 +2361,7 @@ TinyMCE_Engine.prototype = {
l = tinyMCE.getParam(p, '');
if (l != '' && (v = tinyMCE.evalFunc(typeof(l) == "function" ? l : eval(l), 3, a)) == s && m > 0)
if (l != '' && (v = tinyMCE.evalFunc(l, 3, a)) == s && m > 0)
return true;
if (ins != null) {
@ -2312,8 +2384,8 @@ TinyMCE_Engine.prototype = {
return false;
},
xmlEncode : function(s) {
return s ? ('' + s).replace(new RegExp('[<>&"\']', 'g'), function (c, b) {
xmlEncode : function(s, skip_apos) {
return s ? ('' + s).replace(!skip_apos ? this.xmlEncodeAposRe : this.xmlEncodeRe, function (c, b) {
switch (c) {
case '&':
return '&amp;';
@ -2390,6 +2462,7 @@ function TinyMCE_Control(settings) {
this.hasMouseMoved = false;
this.foreColor = this.backColor = "#999999";
this.data = {};
this.cssClasses = [];
this.cleanup.init({
valid_elements : s.valid_elements,
@ -2398,11 +2471,11 @@ function TinyMCE_Control(settings) {
entities : s.entities,
entity_encoding : s.entity_encoding,
debug : s.cleanup_debug,
url_converter : 'TinyMCE_Cleanup.prototype._urlConverter',
indent : s.apply_source_formatting,
invalid_elements : s.invalid_elements,
verify_html : s.verify_html,
fix_content_duplication : s.fix_content_duplication
fix_content_duplication : s.fix_content_duplication,
convert_fonts_to_spans : s.convert_fonts_to_spans
});
// Wrap old theme
@ -2593,7 +2666,13 @@ TinyMCE_Control.prototype = {
},
handleShortcut : function(e) {
var i, s = this.shortcuts, o;
var i, s, o;
// Normal key press, then ignore it
if (!e.altKey && !e.ctrlKey)
return false;
s = this.shortcuts;
for (i=0; i<s.length; i++) {
o = s[i];
@ -2702,8 +2781,11 @@ TinyMCE_Control.prototype = {
//debug("command: " + command + ", user_interface: " + user_interface + ", value: " + value);
this.contentDocument = doc; // <-- Strange, unless this is applied Mozilla 1.3 breaks
if (tinyMCE.execCommandCallback(this, 'execcommand_callback', 'execCommand', this.editorId, this.getBody(), command, user_interface, value))
return;
// Don't dispatch key commands
if (!/mceStartTyping|mceEndTyping/.test(command)) {
if (tinyMCE.execCommandCallback(this, 'execcommand_callback', 'execCommand', this.editorId, this.getBody(), command, user_interface, value))
return;
}
// Fix align on images
if (focusElm && focusElm.nodeName == "IMG") {
@ -2825,14 +2907,6 @@ TinyMCE_Control.prototype = {
return true;
case "FormatBlock":
if (!this.cleanup.isValid(value))
return true;
this.getDoc().execCommand(command, user_interface, value);
tinyMCE.triggerNodeChange();
break;
case "InsertUnorderedList":
case "InsertOrderedList":
this.getDoc().execCommand(command, user_interface, value);
@ -2857,6 +2931,9 @@ TinyMCE_Control.prototype = {
if (elm)
this.execCommand("mceRemoveNode", false, elm);
} else {
if (!this.cleanup.isValid(value))
return true;
if (tinyMCE.isGecko && new RegExp('<(div|blockquote|code|dt|dd|dl|samp)>', 'gi').test(value))
value = value.replace(/[^a-z]/gi, '');
@ -2915,6 +2992,7 @@ TinyMCE_Control.prototype = {
break;
case "mceSetStyleInfo":
case "SetStyleInfo":
var rng = this.getRng();
var sel = this.getSel();
@ -3246,7 +3324,7 @@ TinyMCE_Control.prototype = {
break;
case "mceSetCSSClass":
this.execCommand("SetStyleInfo", false, {command : "setattrib", name : "class", value : value});
this.execCommand("mceSetStyleInfo", false, {command : "setattrib", name : "class", value : value});
break;
case "mceInsertRawHTML":
@ -3478,6 +3556,7 @@ TinyMCE_Control.prototype = {
}
break;
case "RemoveFormat":
case "removeformat":
var text = this.selection.getSelectedText();
@ -3494,11 +3573,11 @@ TinyMCE_Control.prototype = {
// Do nothing
}
this.execCommand("SetStyleInfo", false, {command : "removeformat"});
this.execCommand("mceSetStyleInfo", false, {command : "removeformat"});
} else {
this.getDoc().execCommand(command, user_interface, value);
this.execCommand("SetStyleInfo", false, {command : "removeformat"});
this.execCommand("mceSetStyleInfo", false, {command : "removeformat"});
}
// Remove class
@ -3641,6 +3720,7 @@ TinyMCE_Control.prototype = {
hc = '<textarea wrap="off" id="' + form_element_name + '" name="' + form_element_name + '" cols="100" rows="15"></textarea>';
} else {
hc = '<input type="hidden" id="' + form_element_name + '" name="' + form_element_name + '" />';
this.oldTargetDisplay = tinyMCE.getStyle(this.oldTargetElement, 'display', 'inline');
this.oldTargetElement.style.display = "none";
}
@ -3666,8 +3746,10 @@ TinyMCE_Control.prototype = {
// Just hide the textarea element
this.oldTargetElement = replace_element;
if (!tinyMCE.settings['debug'])
if (!tinyMCE.settings['debug']) {
this.oldTargetDisplay = tinyMCE.getStyle(this.oldTargetElement, 'display', 'inline');
this.oldTargetElement.style.display = "none";
}
// Output HTML and set editable
if (tinyMCE.isGecko) {
@ -3741,6 +3823,10 @@ TinyMCE_Control.prototype = {
if (tinyMCE.isIE)
window.setTimeout("tinyMCE.addEventHandlers(tinyMCE.instances[\"" + this.editorId + "\"]);", 1);
// Setup element references
var parentElm = this.targetDoc.getElementById(this.editorId + '_parent');
this.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling;
tinyMCE.setupContent(this.editorId, true);
return true;
@ -3997,6 +4083,8 @@ TinyMCE_Engine.prototype.serializeStyle = function(ar) {
if (tinyMCE.getParam("force_hex_style_colors"))
val = tinyMCE.convertRGBToHex(val, true);
val = val.replace(/\"/g, '\'');
if (val != "url('')")
str += key.toLowerCase() + ": " + val + "; ";
}
@ -4043,12 +4131,12 @@ TinyMCE_Engine.prototype.convertHexToRGB = function(s) {
TinyMCE_Engine.prototype.convertSpansToFonts = function(doc) {
var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(',');
var h = doc.body.innerHTML;
/*var h = doc.body.innerHTML;
h = h.replace(/<span/gi, '<font');
h = h.replace(/<\/span/gi, '</font');
tinyMCE.setInnerHTML(doc.body, h);
tinyMCE.setInnerHTML(doc.body, h);*/
var s = doc.getElementsByTagName("font");
var s = tinyMCE.selectElements(doc, 'span,font');
for (var i=0; i<s.length; i++) {
var size = tinyMCE.trim(s[i].style.fontSize).toLowerCase();
var fSize = 0;
@ -4082,10 +4170,10 @@ TinyMCE_Engine.prototype.convertSpansToFonts = function(doc) {
TinyMCE_Engine.prototype.convertFontsToSpans = function(doc) {
var sizes = tinyMCE.getParam('font_size_style_values').replace(/\s+/, '').split(',');
var h = doc.body.innerHTML;
/* var h = doc.body.innerHTML;
h = h.replace(/<font/gi, '<span');
h = h.replace(/<\/font/gi, '</span');
tinyMCE.setInnerHTML(doc.body, h);
tinyMCE.setInnerHTML(doc.body, h);*/
var fsClasses = tinyMCE.getParam('font_size_classes');
if (fsClasses != '')
@ -4093,7 +4181,7 @@ TinyMCE_Engine.prototype.convertFontsToSpans = function(doc) {
else
fsClasses = null;
var s = doc.getElementsByTagName("span");
var s = tinyMCE.selectElements(doc, 'span,font');
for (var i=0; i<s.length; i++) {
var fSize, fFace, fColor;
@ -4182,7 +4270,7 @@ TinyMCE_Engine.prototype._fixTables = function(d) {
for (i=0; i<nl.length; i++) {
n = nl[i];
if ((p = tinyMCE.getParentElement(n, 'p,div,h1,h2,h3,h4,h5,h6')) != null) {
if ((p = tinyMCE.getParentElement(n, 'p,h1,h2,h3,h4,h5,h6')) != null) {
np = p.cloneNode(false);
np.removeAttribute('id');
@ -4380,6 +4468,8 @@ TinyMCE_Cleanup.prototype = {
this.fillStr = s.entity_encoding == "named" ? "&nbsp;" : "&#160;";
this.idCount = 0;
this.xmlEncodeRe = new RegExp('[\u007F-\uFFFF<>&"]', 'g');
this.xmlEncodeAposRe = new RegExp('[\u007F-\uFFFF<>&"\']', 'g');
},
addRuleStr : function(s) {
@ -4404,6 +4494,10 @@ TinyMCE_Cleanup.prototype = {
isValid : function(n) {
this._setupRules(); // Will initialize cleanup rules
// Empty is true since it removes formatting
if (!n)
return true;
// Clean the name up a bit
n = n.replace(/[^a-z0-9]+/gi, '').toUpperCase();
@ -4606,7 +4700,7 @@ TinyMCE_Cleanup.prototype = {
_convertToXML : function(n, xn) {
var xd, el, i, l, cn, at, no, hc = false;
if (this._isDuplicate(n))
if (tinyMCE.isRealIE && this._isDuplicate(n))
return;
xd = this.xmlDoc;
@ -4649,11 +4743,11 @@ TinyMCE_Cleanup.prototype = {
},
serializeNodeAsHTML : function(n, inn) {
var en, no, h = '', i, l, t, st, r, cn, va = false, f = false, at, hc, cr;
var en, no, h = '', i, l, t, st, r, cn, va = false, f = false, at, hc, cr, nn;
this._setupRules(); // Will initialize cleanup rules
if (this._isDuplicate(n))
if (tinyMCE.isRealIE && this._isDuplicate(n))
return '';
// Skip non valid child elements
@ -4677,21 +4771,34 @@ TinyMCE_Cleanup.prototype = {
if ((tinyMCE.isRealIE) && n.nodeName.indexOf('/') != -1)
break;
if (this.vElementsRe.test(n.nodeName) && (!this.iveRe || !this.iveRe.test(n.nodeName)) && !inn) {
nn = n.nodeName;
// Convert fonts to spans
if (this.settings.convert_fonts_to_spans) {
// On get content FONT -> SPAN
if (this.settings.on_save && nn == 'FONT')
nn = 'SPAN';
// On insert content SPAN -> FONT
if (!this.settings.on_save && nn == 'SPAN')
nn = 'FONT';
}
if (this.vElementsRe.test(nn) && (!this.iveRe || !this.iveRe.test(nn)) && !inn) {
va = true;
r = this.rules[n.nodeName];
r = this.rules[nn];
if (!r) {
at = this.rules;
for (no in at) {
if (at[no] && at[no].validRe.test(n.nodeName)) {
if (at[no] && at[no].validRe.test(nn)) {
r = at[no];
break;
}
}
}
en = r.isWild ? n.nodeName.toLowerCase() : r.oTagName;
en = r.isWild ? nn.toLowerCase() : r.oTagName;
f = r.fill;
if (r.removeEmpty && !hc)
@ -4728,13 +4835,13 @@ TinyMCE_Cleanup.prototype = {
t = null;
// Close these
if (t != null && this.closeElementsRe.test(n.nodeName))
if (t != null && this.closeElementsRe.test(nn))
return t + ' />';
if (t != null)
h += t + '>';
if (this.isIE && this.codeElementsRe.test(n.nodeName))
if (this.isIE && this.codeElementsRe.test(nn))
h += n.innerHTML;
}
break;
@ -4795,8 +4902,8 @@ TinyMCE_Cleanup.prototype = {
if (r.forceAttribs && (t = r.forceAttribs[an]))
av = t;
if (os && av.length != 0 && this.settings.url_converter.length != 0 && /^(src|href|longdesc)$/.test(an))
av = eval(this.settings.url_converter + '(this, n, av)');
if (os && av.length != 0 && /^(src|href|longdesc)$/.test(an))
av = this._urlConverter(this, n, av);
if (av.length != 0 && r.validAttribValues && r.validAttribValues[an] && !r.validAttribValues[an].test(av))
return "";
@ -4806,7 +4913,7 @@ TinyMCE_Cleanup.prototype = {
if (av.length != 0) {
if (an.indexOf('on') != 0)
av = this.xmlEncode(av);
av = this.xmlEncode(av, 1);
return " " + an + "=" + '"' + av + '"';
}
@ -4852,24 +4959,24 @@ TinyMCE_Cleanup.prototype = {
return o;
},
xmlEncode : function(s) {
var cl = this;
xmlEncode : function(s, skip_apos) {
var cl = this, re = !skip_apos ? this.xmlEncodeAposRe : this.xmlEncodeRe;
this._setupEntities(); // Will intialize lookup table
switch (this.settings.entity_encoding) {
case "raw":
return tinyMCE.xmlEncode(s);
return tinyMCE.xmlEncode(s, skip_apos);
case "named":
return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']', 'g'), function (c, b) {
return s.replace(re, function (c, b) {
b = cl.entities[c.charCodeAt(0)];
return b ? '&' + b + ';' : c;
});
case "numeric":
return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']', 'g'), function (c, b) {
return s.replace(re, function (c, b) {
return b ? '&#' + c.charCodeAt(0) + ';' : c;
});
}
@ -4898,34 +5005,47 @@ TinyMCE_Cleanup.prototype = {
},
_getAttrib : function(e, n, d) {
var v, ex, nn;
if (typeof(d) == "undefined")
d = "";
if (!e || e.nodeType != 1)
return d;
var v = e.getAttribute(n, 0);
try {
v = e.getAttribute(n, 0);
} catch (ex) {
// IE 7 may cast exception on invalid attributes
v = e.getAttribute(n, 2);
}
if (n == "class" && !v)
v = e.className;
if (this.isIE && n == "http-equiv")
v = e.httpEquiv;
if (this.isIE) {
if (n == "http-equiv")
v = e.httpEquiv;
if (this.isIE && e.nodeName == "FORM" && n == "enctype" && v == "application/x-www-form-urlencoded")
v = "";
nn = e.nodeName;
if (this.isIE && e.nodeName == "INPUT" && n == "size" && v == "20")
v = "";
// Skip the default values that IE returns
if (nn == "FORM" && n == "enctype" && v == "application/x-www-form-urlencoded")
v = "";
if (this.isIE && e.nodeName == "INPUT" && n == "maxlength" && v == "2147483647")
v = "";
if (nn == "INPUT" && n == "size" && v == "20")
v = "";
if (nn == "INPUT" && n == "maxlength" && v == "2147483647")
v = "";
}
if (n == "style" && !tinyMCE.isOpera)
v = e.style.cssText;
if (n == 'style' && v) {
if (!tinyMCE.isOpera)
v = e.style.cssText;
if (n == 'style')
v = tinyMCE.serializeStyle(tinyMCE.parseStyle(v));
}
if (this.settings.on_save && n.indexOf('on') != -1 && this.settings.on_save && v && v != "")
v = tinyMCE.cleanupEventStr(v);
@ -4936,8 +5056,12 @@ TinyMCE_Cleanup.prototype = {
_urlConverter : function(c, n, v) {
if (!c.settings.on_save)
return tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href, v);
else if (tinyMCE.getParam('convert_urls'))
return eval(tinyMCE.settings.urlconverter_callback + "(v, n, true);");
else if (tinyMCE.getParam('convert_urls')) {
if (!this.urlConverter)
this.urlConverter = eval(tinyMCE.settings.urlconverter_callback);
return this.urlConverter(v, n, true);
}
return v;
},
@ -5099,9 +5223,10 @@ TinyMCE_Engine.prototype.setInnerHTML = function(e, h) {
// Convert all strong/em to b/i in Gecko
if (tinyMCE.isGecko) {
h = h.replace(/<strong/gi, '<b');
h = h.replace(/<em(\/?)/gi, '<i');
h = h.replace(/<em /gi, '<i');
h = h.replace(/<embed([^>]*)>/gi, '<tmpembed$1>');
h = h.replace(/<em([^>]*)>/gi, '<i$1>');
h = h.replace(/<tmpembed([^>]*)>/gi, '<embed$1>');
h = h.replace(/<strong([^>]*)>/gi, '<b$1>');
h = h.replace(/<\/strong>/gi, '</b>');
h = h.replace(/<\/em>/gi, '</i>');
}
@ -5225,7 +5350,12 @@ TinyMCE_Engine.prototype.getAttrib = function(elm, name, dv) {
if (!elm || elm.nodeType != 1)
return dv;
v = elm.getAttribute(name);
try {
v = elm.getAttribute(name, 0);
} catch (ex) {
// IE 7 may cast exception on invalid attributes
v = elm.getAttribute(name, 2);
}
// Try className for class attrib
if (name == "class" && !v)
@ -5411,6 +5541,32 @@ TinyMCE_Engine.prototype.getViewPort = function(w) {
};
};
TinyMCE_Engine.prototype.getStyle = function(n, na, d) {
if (!n)
return false;
// Gecko
if (tinyMCE.isGecko && n.ownerDocument.defaultView) {
try {
return n.ownerDocument.defaultView.getComputedStyle(n, null).getPropertyValue(na);
} catch (n) {
// Old safari might fail
return null;
}
}
// Camelcase it, if needed
na = na.replace(/-(\D)/g, function(a, b){
return b.toUpperCase();
});
// IE & Opera
if (n.currentStyle)
return n.currentStyle[na];
return false;
};
/* file:jscripts/tiny_mce/classes/TinyMCE_URL.class.js */
TinyMCE_Engine.prototype.parseURL = function(url_str) {
@ -5876,7 +6032,12 @@ TinyMCE_Engine.prototype.setEventHandlers = function(inst, s) {
for (i=0; i<ot.length; i++)
f(doc, ot[i], tinyMCE.handleEvent);
eval('try { doc.designMode = "On"; } catch(e) {}'); // Force designmode
// Force designmode
try {
doc.designMode = "On";
} catch (e) {
// Ignore
}
}
};
@ -6047,8 +6208,8 @@ TinyMCE_Selection.prototype = {
h = tinyMCE._cleanupHTML(inst, inst.contentDocument, inst.settings, e, e, false, true, false);
// When editing always use fonts internaly
if (tinyMCE.getParam("convert_fonts_to_spans"))
tinyMCE.convertSpansToFonts(inst.getDoc());
//if (tinyMCE.getParam("convert_fonts_to_spans"))
// tinyMCE.convertSpansToFonts(inst.getDoc());
return h;
},
@ -6251,6 +6412,9 @@ TinyMCE_Selection.prototype = {
}
if (tinyMCE.isGecko || tinyMCE.isOpera) {
if (!sel)
return false;
if (bookmark.rng) {
sel.removeAllRanges();
sel.addRange(bookmark.rng);
@ -6462,7 +6626,33 @@ TinyMCE_Selection.prototype = {
if (tinyMCE.isSafari && !s.getRangeAt)
return '' + window.getSelection();
return s.getRangeAt(0);
if (s.rangeCount > 0)
return s.getRangeAt(0);
return null;
},
isCollapsed : function() {
var r = this.getRng();
if (r.item)
return false;
return r.boundingWidth == 0 || this.getSel().isCollapsed;
},
collapse : function(b) {
var r = this.getRng(), s = this.getSel();
if (r.select) {
r.collapse(b);
r.select();
} else {
if (b)
s.collapseToStart();
else
s.collapseToEnd();
}
},
getFocusElement : function() {
@ -7006,13 +7196,21 @@ TinyMCE_Layer.prototype = {
},
show : function() {
this.getElement().style.display = 'block';
this.updateBlocker();
var el = this.getElement();
if (el) {
el.style.display = 'block';
this.updateBlocker();
}
},
hide : function() {
this.getElement().style.display = 'none';
this.updateBlocker();
var el = this.getElement();
if (el) {
el.style.display = 'none';
this.updateBlocker();
}
},
isVisible : function() {
@ -7117,6 +7315,16 @@ TinyMCE_Layer.prototype = {
return 0;
return parseInt(s);
},
remove : function() {
var e = this.getElement(), b = this.getBlocker();
if (e)
e.parentNode.removeChild(e);
if (b)
b.parentNode.removeChild(b);
}
};
@ -7208,7 +7416,7 @@ TinyMCE_Menu.prototype = tinyMCE.extend(TinyMCE_Layer.prototype, {
break;
default:
h += '<tr><td><a href="#" onclick="return tinyMCE.cancelEvent(event);" onmousedown="return tinyMCE.cancelEvent(event);" onmouseup="' + tinyMCE.xmlEncode(m[i].js) + ';return tinyMCE.cancelEvent(event);"><span' + c +'>' + t + '</span></a>';
h += '<tr><td><a href="' + tinyMCE.xmlEncode(m[i].js) + '" onmousedown="' + tinyMCE.xmlEncode(m[i].js) + ';return tinyMCE.cancelEvent(event);" onclick="return tinyMCE.cancelEvent(event);" onmouseup="return tinyMCE.cancelEvent(event);"><span' + c +'>' + t + '</span></a>';
}
h += '</td></tr>';

@ -1,10 +1,10 @@
/**
* $Id: editable_selects.js 18 2006-06-29 14:11:23Z spocke $
* $Id: editable_selects.js 162 2007-01-03 16:16:52Z spocke $
*
* Makes select boxes editable.
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
var TinyMCE_EditableSelects = {

@ -1,10 +1,10 @@
/**
* $Id: form_utils.js 43 2006-08-08 16:10:07Z spocke $
* $Id: form_utils.js 162 2007-01-03 16:16:52Z spocke $
*
* Various form utilitiy functions.
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
var themeBaseURL = tinyMCE.baseURL + '/themes/' + tinyMCE.getParam("theme");

@ -1,10 +1,10 @@
/**
* $Id: mclayer.js 18 2006-06-29 14:11:23Z spocke $
* $Id: mclayer.js 162 2007-01-03 16:16:52Z spocke $
*
* Moxiecode floating layer script.
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
function MCLayer(id) {

@ -1,10 +1,10 @@
/**
* $Id: mctabs.js 18 2006-06-29 14:11:23Z spocke $
* $Id: mctabs.js 162 2007-01-03 16:16:52Z spocke $
*
* Moxiecode DHTML Tabs script.
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
function MCTabs() {

@ -1,10 +1,10 @@
/**
* $Id: validate.js 65 2006-08-24 15:54:55Z spocke $
* $Id: validate.js 162 2007-01-03 16:16:52Z spocke $
*
* Various form validation methods.
*
* @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
*/
/**

@ -0,0 +1,53 @@
/* Colorpicker dialog specific CSS */
#preview {
float: right;
width: 50px;
height: 14px;
line-height: 1px;
border: 1px solid black;
margin-left: 5px;
}
#colorpicker {
float: left;
cursor: crosshair;
}
#light {
border: 1px solid gray;
margin-left: 5px;
float: left;
width: 15px;
cursor: crosshair;
}
#light div {
overflow: hidden;
}
#previewblock {
float: right;
padding-left: 10px;
height: 20px;
}
.panel_wrapper div.current {
height: 175px;
}
#namedcolors {
width: 150px;
}
#namedcolors a {
display: block;
float: left;
width: 10px; height: 10px;
margin: 1px 1px 0 0;
overflow: hidden;
}
#colornamecontainer {
margin-top: 5px;
}

@ -1,97 +1,97 @@
/* This file contains the CSS data for the editor UI of TinyMCE instances */
.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;}
.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;}
.mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;}
.mceSelectList {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 7pt !important; font-weight: normal; margin-top: 3px; padding: 0; display: inline; vertical-align: top; background-color: #F0F0EE;}
.mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;}
.mceLabel {color: #000000;}
.mceLabelDisabled {cursor: text; color: #999999;}
.mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0; margin: 0;}
.mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; }
.mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;}
.mceLabelDisabled {cursor: text; color: #999999;}
.mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0; margin: 0;}
.mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; }
.mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;}
.mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;}
.mceToolbarBottom {border-top: 1px solid #cccccc;}
.mceToolbarContainer {position: relative; left: 0; top: 0; display: block;}
.mceToolbarContainer {display: block; position: relative; left: 0; top: 0; width: 100%;}
.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {height: 20px;}
.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;}
.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;}
.mceStatusbarTop {border-bottom: 1px solid #cccccc;}
.mceStatusbarBottom {border-top: 1px solid #cccccc;}
.mceStatusbar {border-bottom: 1px solid #cccccc;}
.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;}
.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;}
.mcePathItem:hover {text-decoration: underline;}
.mceStatusbarPathText {float: left;}
.mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;}
.mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;}
.mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;}
.mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;}
.mceEditorIframe {border: 0;}
/* Button CSS rules */
a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;}
a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;}
a.mceButtonDisabled img {border: 0 !important;}
a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;}
a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;}
a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;}
a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;}
a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;}
a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;}
a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;}
/* Menu button CSS rules */
span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;}
span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;}
span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;}
span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;}
span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;}
span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;}
span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;}
span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;}
span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {border-left: 0;}
span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;}
span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;}
span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;}
span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;}
span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;}
span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;}
/* Menu */
.mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 100; background-color: white; border: 1px solid gray; font-weight: normal;}
.mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;}
.mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;}
.mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;}
.mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;}
.mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 1000; background-color: white; border: 1px solid gray; font-weight: normal;}
.mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;}
.mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;}
.mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;}
.mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;}
.mceMenuTitle span {padding-left: 5px;}
.mceMenuTitle {background-color: #DDDDDD; font-weight: bold;}
.mceMenuTitle {background-color: #DDDDDD; font-weight: bold;}
.mceMenuDisabled {color: gray;}
span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;}
span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;}
span.mceMenuCheckItem {padding-left: 20px;}
span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;}
.mceColors table, .mceColors td {margin: 0; padding: 2px;}
a.mceMoreColors {width: 130px; margin: 0; padding: 0; margin-left: 3px; margin-bottom: 3px; text-align: center; border: 1px solid white;}
.mceColorPreview {position: absolute; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;}
span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;}
.mceColors table, .mceColors td {margin: 0; padding: 2px;}
a.mceMoreColors {width: auto; padding: 0; margin: 0 3px 3px 3px; text-align: center; border: 1px solid white; text-decoration: none !important;}
.mceColorPreview {position: absolute; overflow:hidden; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;}
a.mceMoreColors:hover {border: 1px solid #0A246A;}
.mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;}
.mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;}
/* MSIE 6 specific rules */
* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
* html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
* html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
* html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
* html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
* html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
* html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
* html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
* html .mceSelectList {margin-top: 2px;}
* html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;}
* html a.mceMoreColors {width: 132px;}
* html .mceColors td a {width: 10px; height: 10px;}
* html .mceColorPreview {margin-left: 2px; margin-top: 14px;}
* html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;}
* html a.mceMoreColors {width: auto;}
* html .mceColors td a {width: 10px; height: 10px;}
* html .mceColorPreview {margin-left: 2px; margin-top: 14px;}
/* MSIE 7 specific rules */
*:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
*:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
*:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
*:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
*:first-child+html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
*:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
*:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
*:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
*:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
*:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
*:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
*:first-child+html .mceSelectList {margin-top: 2px;}
*:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
*:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;}
*:first-child+html a.mceMoreColors {width: 132px;}
*:first-child+html .mceColors td a {width: 10px; height: 10px;}
*:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;}
*:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
*:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;}
*:first-child+html a.mceMoreColors {width: 137px;}
*:first-child+html .mceColors td a {width: 10px; height: 10px;}
*:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;}

Loading…
Cancel
Save