Added filter for changing the languages selection for the spellchecker, fixed problems with valid_elements and added filter for extended_valid_elements, update to the latest version. Props azaozz. fixes #6111
git-svn-id: http://svn.automattic.com/wordpress/trunk@7173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c506a8173c
commit
1189e1fce8
|
@ -2,7 +2,7 @@ wpEditorInit = function() {
|
|||
// Activate tinyMCE if it's the user's default editor
|
||||
if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) {
|
||||
document.getElementById('editorcontainer').style.padding = '0px';
|
||||
tinyMCE.execCommand("mceAddControl", true, "content");
|
||||
tinyMCE.execCommand("mceAddControl", false, "content");
|
||||
} else {
|
||||
var H;
|
||||
if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") )
|
||||
|
@ -13,22 +13,15 @@ wpEditorInit = function() {
|
|||
switchEditors = {
|
||||
|
||||
saveCallback : function(el, content, body) {
|
||||
|
||||
document.getElementById(el).style.color = '#fff';
|
||||
if ( tinyMCE.activeEditor.isHidden() )
|
||||
content = document.getElementById(el).value;
|
||||
else
|
||||
content = this.pre_wpautop(content);
|
||||
|
||||
return content;
|
||||
return this.pre_wpautop(content);
|
||||
},
|
||||
|
||||
pre_wpautop : function(content) {
|
||||
// We have a TON of cleanup to do.
|
||||
|
||||
// content = content.replace(/\n|\r/g, ' ');
|
||||
// Remove anonymous, empty paragraphs.
|
||||
content = content.replace(new RegExp('<p>(\\s| |<br>)*</p>', 'mg'), '');
|
||||
content = content.replace(new RegExp('<p>(\\s| |<br />)*</p>', 'mg'), '');
|
||||
|
||||
// Mark </p> if it has any attributes.
|
||||
content = content.replace(new RegExp('(<p[^>]+>.*?)</p>', 'mg'), '$1</p#>');
|
||||
|
@ -84,14 +77,12 @@ switchEditors = {
|
|||
if ( ed ) ed.show();
|
||||
else tinyMCE.execCommand("mceAddControl", false, id);
|
||||
|
||||
this.wpSetDefaultEditor( 'tinymce' );
|
||||
this.wpSetDefaultEditor('tinymce');
|
||||
} else {
|
||||
this.edToggle(H, P);
|
||||
tinyMCE.triggerSave();
|
||||
ta.style.height = tinyMCE.activeEditor.contentAreaContainer.offsetHeight + 6 + 'px';
|
||||
ta.style.height = ed.getContentAreaContainer().offsetHeight + 6 + 'px';
|
||||
|
||||
ed.hide();
|
||||
ta.value = this.pre_wpautop(ta.value);
|
||||
qt.style.display = 'block';
|
||||
|
||||
if ( tinymce.isIE6 ) {
|
||||
|
@ -104,8 +95,7 @@ switchEditors = {
|
|||
}
|
||||
|
||||
ta.style.color = '';
|
||||
|
||||
this.wpSetDefaultEditor( 'html' );
|
||||
this.wpSetDefaultEditor('html');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -117,7 +107,7 @@ switchEditors = {
|
|||
A.onclick = null;
|
||||
},
|
||||
|
||||
wpSetDefaultEditor : function( editor ) {
|
||||
wpSetDefaultEditor : function(editor) {
|
||||
try {
|
||||
editor = escape( editor.toString() );
|
||||
} catch(err) {
|
||||
|
|
|
@ -133,7 +133,7 @@ autosave:{
|
|||
unload_msg:"' . mce_escape( __('The changes you made will be lost if you navigate away from this page.') ) . '"
|
||||
},
|
||||
fullscreen:{
|
||||
desc:"' . mce_escape( __('Toggle fullscreen mode') ) . '"
|
||||
desc:"' . mce_escape( __('Toggle fullscreen mode') ) . ' (Alt+Shift+G)"
|
||||
},
|
||||
media:{
|
||||
desc:"' . mce_escape( __('Insert / edit embedded media') ) . '",
|
||||
|
@ -151,7 +151,7 @@ visualchars:{
|
|||
desc:"' . mce_escape( __('Visual control characters on/off.') ) . '"
|
||||
},
|
||||
spellchecker:{
|
||||
desc:"' . mce_escape( __('Toggle spellchecker') ) . '",
|
||||
desc:"' . mce_escape( __('Toggle spellchecker') ) . ' (Alt+Shift+N)",
|
||||
menu:"' . mce_escape( __('Spellchecker settings') ) . '",
|
||||
ignore_word:"' . mce_escape( __('Ignore word') ) . '",
|
||||
ignore_words:"' . mce_escape( __('Ignore all') ) . '",
|
||||
|
@ -185,25 +185,25 @@ code:"' . mce_escape( __('Code') ) . '",
|
|||
samp:"' . mce_escape( __('Code sample') ) . '",
|
||||
dt:"' . mce_escape( __('Definition term ') ) . '",
|
||||
dd:"' . mce_escape( __('Definition description') ) . '",
|
||||
bold_desc:"' . mce_escape( __('Bold (Ctrl+B)') ) . '",
|
||||
italic_desc:"' . mce_escape( __('Italic (Ctrl+I)') ) . '",
|
||||
underline_desc:"' . mce_escape( __('Underline (Ctrl+U)') ) . '",
|
||||
striketrough_desc:"' . mce_escape( __('Strikethrough') ) . '",
|
||||
justifyleft_desc:"' . mce_escape( __('Align left') ) . '",
|
||||
justifycenter_desc:"' . mce_escape( __('Align center') ) . '",
|
||||
justifyright_desc:"' . mce_escape( __('Align right') ) . '",
|
||||
justifyfull_desc:"' . mce_escape( __('Align full') ) . '",
|
||||
bullist_desc:"' . mce_escape( __('Unordered list') ) . '",
|
||||
numlist_desc:"' . mce_escape( __('Ordered list') ) . '",
|
||||
bold_desc:"' . mce_escape( __('Bold') ) . ' (Ctrl / Alt+Shift + B)",
|
||||
italic_desc:"' . mce_escape( __('Italic') ) . ' (Ctrl / Alt+Shift + I)",
|
||||
underline_desc:"' . mce_escape( __('Underline') ) . '",
|
||||
striketrough_desc:"' . mce_escape( __('Strikethrough') ) . ' (Alt+Shift+D)",
|
||||
justifyleft_desc:"' . mce_escape( __('Align left') ) . ' (Alt+Shift+L)",
|
||||
justifycenter_desc:"' . mce_escape( __('Align center') ) . ' (Alt+Shift+C)",
|
||||
justifyright_desc:"' . mce_escape( __('Align right') ) . ' (Alt+Shift+R)",
|
||||
justifyfull_desc:"' . mce_escape( __('Align full') ) . ' (Alt+Shift+J)",
|
||||
bullist_desc:"' . mce_escape( __('Unordered list') ) . ' (Alt+Shift+U)",
|
||||
numlist_desc:"' . mce_escape( __('Ordered list') ) . ' (Alt+Shift+O)",
|
||||
outdent_desc:"' . mce_escape( __('Outdent') ) . '",
|
||||
indent_desc:"' . mce_escape( __('Indent') ) . '",
|
||||
undo_desc:"' . mce_escape( __('Undo (Ctrl+Z)') ) . '",
|
||||
redo_desc:"' . mce_escape( __('Redo (Ctrl+Y)') ) . '",
|
||||
link_desc:"' . mce_escape( __('Insert/edit link') ) . '",
|
||||
undo_desc:"' . mce_escape( __('Undo') ) . ' (Ctrl+Z)",
|
||||
redo_desc:"' . mce_escape( __('Redo') ) . ' (Ctrl+Y)",
|
||||
link_desc:"' . mce_escape( __('Insert/edit link') ) . ' (Alt+Shift+A)",
|
||||
link_delta_width:"' . mce_escape( _c('0| Extra width for the link popup in pixels') ) . '",
|
||||
link_delta_height:"' . mce_escape( _c('0| Extra height for the link popup in pixels') ) . '",
|
||||
unlink_desc:"' . mce_escape( __('Unlink') ) . '",
|
||||
image_desc:"' . mce_escape( __('Insert/edit image') ) . '",
|
||||
unlink_desc:"' . mce_escape( __('Unlink') ) . ' (Alt+Shift+S)",
|
||||
image_desc:"' . mce_escape( __('Insert/edit image') ) . ' (Alt+Shift+M)",
|
||||
image_delta_width:"' . mce_escape( _c('0| Extra width for the image popup in pixels') ) . '",
|
||||
image_delta_height:"' . mce_escape( _c('0| Extra height for the image popup in pixels') ) . '",
|
||||
cleanup_desc:"' . mce_escape( __('Cleanup messy code') ) . '",
|
||||
|
@ -223,7 +223,7 @@ paste_desc:"' . mce_escape( __('Paste') ) . '",
|
|||
image_props_desc:"' . mce_escape( __('Image properties') ) . '",
|
||||
newdocument_desc:"' . mce_escape( __('New document') ) . '",
|
||||
help_desc:"' . mce_escape( __('Help') ) . '",
|
||||
blockquote_desc:"' . mce_escape( __('Blockquote') ) . '",
|
||||
blockquote_desc:"' . mce_escape( __('Blockquote') ) . ' (Alt+Shift+Q)",
|
||||
clipboard_msg:"' . mce_escape( __('Copy/Cut/Paste is not available in Mozilla and Firefox.') ) . '",
|
||||
path:"' . mce_escape( __('Path') ) . '",
|
||||
newdocument:"' . mce_escape( __('Are you sure you want to clear all contents?') ) . '",
|
||||
|
@ -390,10 +390,10 @@ flv_jscallback:"' . mce_escape( __('JS Callback') ) . '"
|
|||
});
|
||||
|
||||
tinyMCE.addI18n("' . $language . '.wordpress",{
|
||||
wp_adv_desc:"' . mce_escape( __('Show/Hide Advanced Toolbar') ) . '",
|
||||
wp_more_desc:"' . mce_escape( __('Insert More tag') ) . '",
|
||||
wp_page_desc:"' . mce_escape( __('Insert Page break') ) . '",
|
||||
wp_help_desc:"' . mce_escape( __('Help') ) . '",
|
||||
wp_adv_desc:"' . mce_escape( __('Show/Hide Advanced Toolbar') ) . ' (Alt+Shift+Z)",
|
||||
wp_more_desc:"' . mce_escape( __('Insert More tag') ) . ' (Alt+Shift+T)",
|
||||
wp_page_desc:"' . mce_escape( __('Insert Page break') ) . ' (Alt+Shift+P)",
|
||||
wp_help_desc:"' . mce_escape( __('Help') ) . ' (Alt+Shift+H)",
|
||||
wp_more_alt:"' . mce_escape( __('More...') ) . '",
|
||||
wp_page_alt:"' . mce_escape( __('Next page...') ) . '"
|
||||
});
|
||||
|
|
|
@ -12,45 +12,45 @@
|
|||
/* Top */
|
||||
.clearlooks2 .mceTop,
|
||||
.clearlooks2 .mceTop div {
|
||||
top:0;
|
||||
width:100%;
|
||||
height:23px
|
||||
top:0;
|
||||
width:100%;
|
||||
height:23px
|
||||
}
|
||||
.clearlooks2 .mceTop .mceLeft {
|
||||
width:55%;
|
||||
background: #cee1ef;
|
||||
border-left: 1px solid #c6d9e9;
|
||||
border-top: 1px solid #c6d9e9;
|
||||
width:55%;
|
||||
background: #cee1ef;
|
||||
border-left: 1px solid #c6d9e9;
|
||||
border-top: 1px solid #c6d9e9;
|
||||
}
|
||||
.clearlooks2 .mceTop .mceCenter {
|
||||
}
|
||||
.clearlooks2 .mceTop .mceRight {
|
||||
right:0;
|
||||
width:55%;
|
||||
height:23px;
|
||||
background: #cee1ef;
|
||||
border-right: 1px solid #c6d9e9;
|
||||
border-top: 1px solid #c6d9e9;
|
||||
right:0;
|
||||
width:55%;
|
||||
height:23px;
|
||||
background: #cee1ef;
|
||||
border-right: 1px solid #c6d9e9;
|
||||
border-top: 1px solid #c6d9e9;
|
||||
}
|
||||
.clearlooks2 .mceTop span {
|
||||
width:100%;
|
||||
font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
line-height:23px;
|
||||
font-weight:bold;
|
||||
width:100%;
|
||||
font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
line-height:23px;
|
||||
font-weight:bold;
|
||||
}
|
||||
.clearlooks2 .mceFocus .mceTop .mceLeft {
|
||||
background: #2683ae;
|
||||
border-left: 1px solid #464646;
|
||||
border-top: 1px solid #464646;
|
||||
background: #2683ae;
|
||||
border-left: 1px solid #464646;
|
||||
border-top: 1px solid #464646;
|
||||
}
|
||||
.clearlooks2 .mceFocus .mceTop .mceCenter {
|
||||
}
|
||||
.clearlooks2 .mceFocus .mceTop .mceRight {
|
||||
background: #2683ae;
|
||||
border-right: 1px solid #464646;
|
||||
border-top: 1px solid #464646;
|
||||
background: #2683ae;
|
||||
border-right: 1px solid #464646;
|
||||
border-top: 1px solid #464646;
|
||||
}
|
||||
.clearlooks2 .mceFocus .mceTop span {
|
||||
color:#FFF
|
||||
|
@ -117,7 +117,7 @@ color:#FFF
|
|||
.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px;}
|
||||
.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal;}
|
||||
.clearlooks2 a:hover {font-weight:bold;}
|
||||
.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5;}
|
||||
.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#eaf3fa;}
|
||||
.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px;}
|
||||
.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif);}
|
||||
.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px;}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -50,8 +50,8 @@ var LinkDialog = {
|
|||
ed.execCommand('mceInsertLink', false, {
|
||||
href : f.href.value,
|
||||
title : f.linktitle.value,
|
||||
target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : '',
|
||||
'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : ''
|
||||
target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
|
||||
'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
|
||||
});
|
||||
|
||||
tinyMCEPopup.close();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
body, td, pre {background:#FFF; color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px; }
|
||||
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
||||
body {background:#FFF;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceVisualAid {border: 1px dashed #BBB;}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;}
|
||||
img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;}
|
||||
img {border:0;}
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.defaultSkin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden}
|
||||
.defaultSkin .mce_forecolor, .defaultSkin .mce_backcolor {position:relative}
|
||||
|
||||
/* Menu */
|
||||
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
body, td, pre {background:#FFF; color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px; }
|
||||
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
||||
body {background:#FFF;}
|
||||
body.mceForceColors {background:#FFF; color:#000;}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceVisualAid {border: 1px dashed #BBB;}
|
||||
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
||||
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;}
|
||||
img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;}
|
||||
img {border:0;}
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
|
||||
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.o2k7Skin table.mceToolbar {margin-left:3px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; }
|
||||
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
|
||||
.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEndListBox span {display:none}
|
||||
.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
|
||||
.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
|
||||
.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
||||
.o2k7Skin td.mceCenter {text-align:center;}
|
||||
|
@ -45,9 +46,10 @@
|
|||
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
|
||||
|
||||
/* ListBox */
|
||||
.o2k7Skin .mceListBox {margin-left:3px}
|
||||
.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
|
||||
.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
||||
.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0; margin-right:2px}
|
||||
.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
|
||||
.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
|
||||
.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
|
||||
|
@ -76,6 +78,7 @@
|
|||
.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
||||
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
|
||||
.o2k7Skin .mceColorPreview {position:absolute; top:15px; left:2px; width:16px; height:4px; overflow:hidden}
|
||||
.o2k7Skin .mce_forecolor, .o2k7Skin .mce_backcolor {position:relative}
|
||||
|
||||
/* Menu */
|
||||
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
|
||||
|
|
|
@ -35,90 +35,90 @@ border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-
|
|||
|
||||
/* Button */
|
||||
.wp_themeSkin .mceButton {
|
||||
display:block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: default;
|
||||
padding: 1px 2px;
|
||||
margin: 1px;
|
||||
background: #e9e8e8 url(img/butt2.png) 2px 1px no-repeat scroll;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #abc0fb;
|
||||
display:block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: default;
|
||||
padding: 1px 2px;
|
||||
margin: 1px;
|
||||
background: #e9e8e8 url(img/butt2.png) 2px 1px no-repeat scroll;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #abc0fb;
|
||||
}
|
||||
.wp_themeSkin a.mceButton span, .wp_themeSkin a.mceButton img {}
|
||||
.wp_themeSkin .mceOldBoxModel a.mceButton span, .wp_themeSkin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
||||
.wp_themeSkin a.mceButtonEnabled:hover {
|
||||
background-color:#d6d8da;
|
||||
background-position:0 -20px;
|
||||
border: 1px solid #7789ba !important;
|
||||
background-color:#d6d8da;
|
||||
background-position:0 -20px;
|
||||
border: 1px solid #7789ba !important;
|
||||
}
|
||||
.wp_themeSkin a.mceButtonActive, .wp_themeSkin a.mceButtonSelected {
|
||||
background-color: #d6d8da;
|
||||
background-position:0 -20px;
|
||||
border: 1px solid #7789ba !important;
|
||||
background-color: #d6d8da;
|
||||
background-position:0 -20px;
|
||||
border: 1px solid #7789ba !important;
|
||||
}
|
||||
.wp_themeSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30);}
|
||||
.wp_themeSkin .mceButtonDisabled {border-color:#bdd;}
|
||||
|
||||
/* Separator */
|
||||
.wp_themeSkin .mceSeparator {
|
||||
height: 24px;
|
||||
width: 1px;
|
||||
display: block;
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
margin: 0 2px;
|
||||
height: 24px;
|
||||
width: 1px;
|
||||
display: block;
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
/* ListBox */
|
||||
.wp_themeSkin .mceListBox, .wp_themeSkin .mceListBox a {display:block}
|
||||
.wp_themeSkin .mceListBox .mceText {
|
||||
padding: 1px 2px 1px 5px;
|
||||
border: 1px solid #abc0fb;
|
||||
text-align:left;
|
||||
width:70px;
|
||||
border-right:0;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
font-family: Tahoma,Verdana,Arial,Helvetica;
|
||||
font-size: 11px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
padding: 1px 2px 1px 5px;
|
||||
border: 1px solid #abc0fb;
|
||||
text-align:left;
|
||||
width:70px;
|
||||
border-right:0;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
font-family: Tahoma,Verdana,Arial,Helvetica;
|
||||
font-size: 11px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wp_themeSkin .mceListBox {
|
||||
margin: 1px;
|
||||
direction: ltr;
|
||||
margin: 1px;
|
||||
direction: ltr;
|
||||
}
|
||||
.wp_themeSkin .mceListBox .mceOpen {
|
||||
width:14px;
|
||||
height:20px;
|
||||
border-collapse:separate;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
padding: 1px;
|
||||
border: 1px solid #abc0fb;
|
||||
width:14px;
|
||||
height:20px;
|
||||
border-collapse:separate;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
padding: 1px;
|
||||
border: 1px solid #abc0fb;
|
||||
}
|
||||
.wp_themeSkin .mceListBox .mceOpen span {
|
||||
display: block;
|
||||
width:14px;
|
||||
height:20px;
|
||||
background:url(img/down_arrow.gif) 2px 1px no-repeat;
|
||||
display: block;
|
||||
width:14px;
|
||||
height:20px;
|
||||
background:url(img/down_arrow.gif) 2px 1px no-repeat;
|
||||
}
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
||||
.wp_themeSkin .mceListBoxHover .mceText,
|
||||
.wp_themeSkin .mceListBoxSelected .mceText {
|
||||
background:#eae8ea;
|
||||
border-collapse:separate;
|
||||
border: 1px solid #7789ba !important;
|
||||
border-right: 0 none !important;
|
||||
background:#eae8ea;
|
||||
border-collapse:separate;
|
||||
border: 1px solid #7789ba !important;
|
||||
border-right: 0 none !important;
|
||||
}
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxHover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxSelected .mceOpen {
|
||||
background-color:#d6d8da;
|
||||
border: 1px solid #7789ba !important;
|
||||
background-color:#d6d8da;
|
||||
border: 1px solid #7789ba !important;
|
||||
}
|
||||
.wp_themeSkin .mceListBoxDisabled .mceText {color:gray}
|
||||
.wp_themeSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
|
@ -128,82 +128,82 @@ border: 1px solid #7789ba !important;
|
|||
/* SplitButton */
|
||||
.wp_themeSkin .mceSplitButton a, .wp_themeSkin .mceSplitButton span {display:block; height:20px}
|
||||
.wp_themeSkin .mceSplitButton {
|
||||
display:block;
|
||||
margin: 1px;
|
||||
direction: ltr;
|
||||
display:block;
|
||||
margin: 1px;
|
||||
direction: ltr;
|
||||
}
|
||||
.wp_themeSkin table.mceSplitButton td {
|
||||
padding: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceAction {
|
||||
height:20px;
|
||||
width:20px;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
padding: 1px 2px;
|
||||
border: 1px solid #abc0fb;
|
||||
height:20px;
|
||||
width:20px;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
padding: 1px 2px;
|
||||
border: 1px solid #abc0fb;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton span.mceAction {
|
||||
background: url(../../img/icons.gif) 20px 20px;
|
||||
width:20px;
|
||||
background: url(../../img/icons.gif) 20px 20px;
|
||||
width:20px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen {
|
||||
width:10px;
|
||||
height:20px;
|
||||
border-collapse:separate;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
padding: 1px;
|
||||
border: 1px solid #abc0fb;
|
||||
border-left: 0 none;
|
||||
width:10px;
|
||||
height:20px;
|
||||
border-collapse:separate;
|
||||
background: #e9e8e8 url(img/butt2.png) 1px 1px repeat-x scroll;
|
||||
padding: 1px;
|
||||
border: 1px solid #abc0fb;
|
||||
border-left: 0 none;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton span.mceOpen {
|
||||
width:10px;
|
||||
background:url(img/down_arrow.gif) 0px 1px;
|
||||
width:10px;
|
||||
background:url(img/down_arrow.gif) 0px 1px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen:hover,
|
||||
.wp_themeSkin .mceSplitButtonSelected a.mceOpen {
|
||||
background:#d6d8da;
|
||||
border-collapse:separate;
|
||||
border: 1px solid #7789ba !important;
|
||||
border-left: 0 none !important;
|
||||
background:#d6d8da;
|
||||
border-collapse:separate;
|
||||
border: 1px solid #7789ba !important;
|
||||
border-left: 0 none !important;
|
||||
}
|
||||
.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction {
|
||||
background:#d6d8da;
|
||||
border: 1px solid #7789ba !important;
|
||||
background:#d6d8da;
|
||||
border: 1px solid #7789ba !important;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceAction:hover {
|
||||
background:#d6d8da;
|
||||
border-collapse:separate;
|
||||
border: 1px solid #7789ba !important;
|
||||
background:#d6d8da;
|
||||
border-collapse:separate;
|
||||
border: 1px solid #7789ba !important;
|
||||
}
|
||||
.wp_themeSkin table.mceSplitButtonEnabled:hover span.mceOpen,
|
||||
.wp_themeSkin .mceSplitButtonHover span.mceOpen,
|
||||
.wp_themeSkin .mceSplitButtonSelected span.mceOpen {
|
||||
}
|
||||
.wp_themeSkin .mceSplitButtonDisabled .mceAction {
|
||||
opacity:0.3; filter:alpha(opacity=30)
|
||||
opacity:0.3; filter:alpha(opacity=30)
|
||||
}
|
||||
.wp_themeSkin .mceSplitButtonActive {
|
||||
background: #d6d8da;
|
||||
background: #d6d8da;
|
||||
}
|
||||
.wp_themeSkin .mceListBox a.mceText, .wp_themeSkin .mceSplitButton a.mceAction {
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
-khtml-border-bottom-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
-moz-border-radius-topleft: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
-khtml-border-bottom-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
-moz-border-radius-topleft: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen, .wp_themeSkin .mceListBox a.mceOpen {
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
-khtml-border-bottom-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
-khtml-border-bottom-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
/* ColorSplitButton */
|
||||
|
@ -225,27 +225,26 @@ border-top-right-radius: 3px;
|
|||
.wp_themeSkin .mceMenu td {height:20px}
|
||||
.wp_themeSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
||||
.wp_themeSkin .mceMenu .mceText {
|
||||
position:relative;
|
||||
display:block;
|
||||
font-family:Tahoma,Verdana,Arial,Helvetica;
|
||||
color:#000;
|
||||
cursor:default;
|
||||
margin:0;
|
||||
padding:0 25px 0 25px;
|
||||
display:block
|
||||
position:relative;
|
||||
display:block;
|
||||
font-family:Tahoma,Verdana,Arial,Helvetica;
|
||||
color:#000;
|
||||
cursor:default;
|
||||
margin:0;
|
||||
padding:0 25px 0 25px;
|
||||
}
|
||||
.wp_themeSkin .mceMenu span.mceText, .wp_themeSkin .mceMenu .mcePreview {font-size:11px}
|
||||
.wp_themeSkin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.wp_themeSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
||||
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
||||
.wp_themeSkin .mceMenu .mceMenuItemActive {
|
||||
background-color: #CEE1EF;
|
||||
background-color: #CEE1EF;
|
||||
}
|
||||
.wp_themeSkin td.mceMenuItemSeparator {background:#aaa; height:1px}
|
||||
.wp_themeSkin .mceMenuItemTitle a {
|
||||
border:0;
|
||||
background:#ccc;
|
||||
border-bottom:1px solid #aaa;
|
||||
border:0;
|
||||
background:#ccc;
|
||||
border-bottom:1px solid #aaa;
|
||||
}
|
||||
.wp_themeSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
||||
.wp_themeSkin .mceMenuItemDisabled .mceText {color:#888}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -44,7 +44,7 @@ function putFileContents( $path, $content ) {
|
|||
}
|
||||
|
||||
// Set up init variables
|
||||
$https = ( isset($_SERVER['HTTPS']) && 'on' == $_SERVER['HTTPS'] ) ? true : false;
|
||||
$https = ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
||||
|
||||
$baseurl = get_option('siteurl') . '/wp-includes/js/tinymce';
|
||||
if ( $https ) str_replace('http://', 'https://', $baseurl);
|
||||
|
@ -53,11 +53,28 @@ $mce_css = $baseurl . '/wordpress.css';
|
|||
$mce_css = apply_filters('mce_css', $mce_css);
|
||||
if ( $https ) str_replace('http://', 'https://', $mce_css);
|
||||
|
||||
$valid_elements = '*[*]';
|
||||
$valid_elements = apply_filters('mce_valid_elements', $valid_elements);
|
||||
|
||||
/*
|
||||
Setting mce_valid_elements to *[*] skips all of the internal cleanup and can cause problems.
|
||||
The minimal setting would be -strong/-b[*],-em/-i[*],*[*].
|
||||
Best is to use the default cleanup by not specifying mce_valid_elements,
|
||||
and then use extended_valid_elements to add to it.
|
||||
*/
|
||||
$valid_elements = apply_filters('mce_valid_elements', '');
|
||||
$invalid_elements = apply_filters('mce_invalid_elements', '');
|
||||
|
||||
$extended_valid_elements = '@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],bdo,code,col[*],colgroup[*],dfn,fieldset,form[*],input[*],kbd,label[*],legend[*],noscript,optgroup[*],option[*],q[cite|class],samp,textarea[*],title,var';
|
||||
|
||||
$extended_valid_elements = apply_filters('mce_extended_valid_elements', $extended_valid_elements);
|
||||
|
||||
/*
|
||||
The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu.
|
||||
By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server.
|
||||
The + sign marks the default language.
|
||||
More information:
|
||||
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker
|
||||
*/
|
||||
$mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv');
|
||||
|
||||
$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen' );
|
||||
|
||||
/*
|
||||
|
@ -70,13 +87,13 @@ If the plugin uses a button, it should be added with one of the "$mce_buttons" f
|
|||
$mce_external_plugins = apply_filters('mce_external_plugins', array());
|
||||
|
||||
$ext_plugins = "\n";
|
||||
foreach ( $mce_external_plugins as $name => $url ) {
|
||||
$plugins[] = '-' . $name;
|
||||
if ( $https ) str_replace('http://', 'https://', $url);
|
||||
|
||||
$ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
|
||||
if ( ! empty($mce_external_plugins) ) {
|
||||
foreach ( $mce_external_plugins as $name => $url ) {
|
||||
if ( $https ) str_replace('http://', 'https://', $url);
|
||||
$plugins[] = '-' . $name;
|
||||
$ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$plugins = implode($plugins, ',');
|
||||
|
||||
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'image', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ));
|
||||
|
@ -105,6 +122,7 @@ $initArray = array (
|
|||
'theme_advanced_buttons3' => "$mce_buttons_3",
|
||||
'theme_advanced_buttons4' => "$mce_buttons_4",
|
||||
'language' => "$mce_locale",
|
||||
'spellchecker_languages' => "$mce_spellchecker_languages",
|
||||
'theme_advanced_toolbar_location' => 'top',
|
||||
'theme_advanced_toolbar_align' => 'left',
|
||||
'theme_advanced_statusbar_location' => 'bottom',
|
||||
|
@ -113,8 +131,6 @@ $initArray = array (
|
|||
'dialog_type' => 'modal',
|
||||
'relative_urls' => false,
|
||||
'remove_script_host' => false,
|
||||
'fix_list_elements' => true,
|
||||
'fix_table_elements' => true,
|
||||
'gecko_spellcheck' => true,
|
||||
'entities' => '38,amp,60,lt,62,gt',
|
||||
'accessibility_focus' => false,
|
||||
|
@ -129,6 +145,7 @@ $initArray = array (
|
|||
);
|
||||
|
||||
if ( $valid_elements ) $initArray['valid_elements'] = $valid_elements;
|
||||
if ( $extended_valid_elements ) $initArray['extended_valid_elements'] = $extended_valid_elements;
|
||||
if ( $invalid_elements ) $initArray['invalid_elements'] = $invalid_elements;
|
||||
|
||||
// For people who really REALLY know what they're doing with TinyMCE
|
||||
|
@ -240,28 +257,23 @@ echo $content;
|
|||
|
||||
// Write file
|
||||
if ( '' != $cacheKey ) {
|
||||
if ( $old_cache_max ) {
|
||||
$keys_file = $cache_path . '/tinymce_compressed' . $cache_ext . '_key';
|
||||
$old_keys = getFileContents($keys_file);
|
||||
|
||||
if ( '' != $old_keys ) {
|
||||
$keys_ar = explode( "\n", $old_keys );
|
||||
if ( 1 >= $old_cache_max ) $old_keys_rem = $keys_ar;
|
||||
else $old_keys_rem = array_slice( $keys_ar, ($old_cache_max - 1) );
|
||||
|
||||
foreach ( $old_keys_rem as $key ) {
|
||||
$key = trim($key);
|
||||
if ( 32 != strlen($key) ) continue;
|
||||
$old_cache = $cache_path . '/tinymce_' . $key . $cache_ext;
|
||||
@unlink($old_cache);
|
||||
}
|
||||
|
||||
array_unshift( $keys_ar, $cacheKey );
|
||||
$keys_ar = array_slice( $keys_ar, 0, $old_cache_max );
|
||||
$cacheKey = trim( implode( "\n", $keys_ar ) );
|
||||
}
|
||||
if ( (int) $old_cache_max && is_dir($cache_path) ) {
|
||||
|
||||
putFileContents( $keys_file, $cacheKey );
|
||||
$old_cache = array();
|
||||
$handle = opendir($cache_path);
|
||||
while ( false !== ( $file = readdir($handle) ) ) {
|
||||
if ( $file == '.' || $file == '..' ) continue;
|
||||
$saved = filectime("$cache_path/$file");
|
||||
if ( strpos($file, 'tinymce_') !== false && substr($file, -3) == $cache_ext ) $old_cache["$saved"] = $file;
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
krsort($old_cache);
|
||||
if ( 1 >= $old_cache_max ) $del_cache = $old_cache;
|
||||
else $del_cache = array_slice( $old_cache, ($old_cache_max - 1) );
|
||||
|
||||
foreach ( $del_cache as $key )
|
||||
@unlink("$cache_path/$key");
|
||||
}
|
||||
|
||||
putFileContents( $cache_file, $content );
|
||||
|
|
|
@ -36,7 +36,7 @@ class WP_Scripts {
|
|||
$this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' );
|
||||
|
||||
// Modify this version when tinyMCE plugins are changed.
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080226');
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080306');
|
||||
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
|
||||
|
||||
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
|
||||
|
|
Loading…
Reference in New Issue