Make DFW use the exact same style as the normal editor, remove width resizing in DFW as it would clash with editor-style.css for some themes, fixes #17644
git-svn-id: http://svn.automattic.com/wordpress/trunk@18103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fb76d8852b
commit
40c95fc8f7
|
@ -480,16 +480,11 @@ PubSub.prototype.publish = function( topic, args ) {
|
|||
wptitlehint('wp-fullscreen-title');
|
||||
|
||||
$(document).keyup(function(e){
|
||||
var c = e.keyCode || e.charCode, a, data;
|
||||
var c = e.keyCode || e.charCode, data;
|
||||
|
||||
if ( !fullscreen.settings.visible )
|
||||
return true;
|
||||
|
||||
if ( navigator.platform && navigator.platform.indexOf('Mac') != -1 )
|
||||
a = e.ctrlKey; // Ctrl key for Mac
|
||||
else
|
||||
a = e.altKey; // Alt key for Win & Linux
|
||||
|
||||
if ( 27 == c ) { // Esc
|
||||
data = {
|
||||
event: e,
|
||||
|
@ -506,15 +501,6 @@ PubSub.prototype.publish = function( topic, args ) {
|
|||
fullscreen.off();
|
||||
}
|
||||
|
||||
if ( a && (61 == c || 107 == c || 187 == c) ) // +
|
||||
api.dfw_width(25);
|
||||
|
||||
if ( a && (45 == c || 109 == c || 189 == c) ) // -
|
||||
api.dfw_width(-25);
|
||||
|
||||
if ( a && 48 == c ) // 0
|
||||
api.dfw_width(0);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,287 +0,0 @@
|
|||
/*
|
||||
Distraction Free Writing mode TinyMCE Styles
|
||||
*/
|
||||
|
||||
html, body.mceContentBody {
|
||||
background: transparent !important;
|
||||
width: auto !important;
|
||||
max-width: none !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
color: #444;
|
||||
font-family: Georgia, "Bitstream Charter", serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
p,
|
||||
dl,
|
||||
td,
|
||||
th,
|
||||
ul,
|
||||
ol,
|
||||
blockquote {
|
||||
font-size: 16px;
|
||||
}
|
||||
tr th,
|
||||
thead th,
|
||||
label,
|
||||
tr th,
|
||||
thead th {
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
|
||||
}
|
||||
pre,
|
||||
code,
|
||||
code var {
|
||||
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
|
||||
}
|
||||
body, input, textarea {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
hr {
|
||||
background-color: #e7e7e7;
|
||||
border: 0;
|
||||
clear: both;
|
||||
height: 1px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
/* Text elements */
|
||||
p {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
ul {
|
||||
list-style: square;
|
||||
margin: 0 0 18px 1.5em;
|
||||
}
|
||||
ol {
|
||||
list-style: decimal;
|
||||
margin: 0 0 18px 1.5em;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
dl {
|
||||
margin: 0 0 24px 0;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
strong {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
cite,
|
||||
em,
|
||||
i {
|
||||
border: none;
|
||||
font-style: italic;
|
||||
}
|
||||
big {
|
||||
font-size: 131.25%;
|
||||
}
|
||||
ins {
|
||||
background: #ffc;
|
||||
border: none;
|
||||
color: #333;
|
||||
}
|
||||
del {
|
||||
text-decoration: line-through;
|
||||
color: #555;
|
||||
}
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
padding: 0 3em;
|
||||
}
|
||||
blockquote cite,
|
||||
blockquote em,
|
||||
blockquote i {
|
||||
font-style: normal;
|
||||
}
|
||||
pre {
|
||||
background: #f7f7f7;
|
||||
color: #222;
|
||||
line-height: 18px;
|
||||
margin-bottom: 18px;
|
||||
padding: 1.5em;
|
||||
}
|
||||
abbr,
|
||||
acronym {
|
||||
border-bottom: 1px dotted #666;
|
||||
cursor: help;
|
||||
}
|
||||
ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
sup,
|
||||
sub {
|
||||
font-size: 10px;
|
||||
height: 0;
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sup {
|
||||
bottom: 1ex;
|
||||
}
|
||||
sub {
|
||||
top: .5ex;
|
||||
}
|
||||
a:link {
|
||||
color: #06c;
|
||||
}
|
||||
a:visited {
|
||||
color: #743399;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
color: #ff4b33;
|
||||
}
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
dd,
|
||||
pre,
|
||||
hr {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
pre,
|
||||
kbd,
|
||||
tt,
|
||||
var {
|
||||
font-size: 15px;
|
||||
line-height: 21px;
|
||||
}
|
||||
code {
|
||||
font-size: 13px;
|
||||
}
|
||||
strong,
|
||||
b,
|
||||
dt,
|
||||
th {
|
||||
color: #000;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
line-height: 1.5em;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2.4em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
h4 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
}
|
||||
h6 {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
table {
|
||||
border: 1px solid #e7e7e7 !important;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin: 0 -1px 24px 0;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
tr th,
|
||||
thead th {
|
||||
border: none !important;
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
padding: 9px 24px;
|
||||
}
|
||||
tr td {
|
||||
border: none !important;
|
||||
border-top: 1px solid #e7e7e7 !important;
|
||||
padding: 6px 24px;
|
||||
}
|
||||
img {
|
||||
margin: 0;
|
||||
}
|
||||
img.size-auto,
|
||||
img.size-large,
|
||||
img.size-full,
|
||||
img.size-medium {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.alignleft,
|
||||
img.alignleft {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: 24px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.alignright,
|
||||
img.alignright {
|
||||
display: inline;
|
||||
float: right;
|
||||
margin-left: 24px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.aligncenter,
|
||||
img.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
img.alignleft,
|
||||
img.alignright,
|
||||
img.aligncenter {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.wp-caption {
|
||||
background: #f1f1f1;
|
||||
border: none;
|
||||
-khtml-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 20px;
|
||||
max-width: 632px !important; /* prevent too-wide images from breaking layout */
|
||||
padding: 4px;
|
||||
text-align: center;
|
||||
}
|
||||
.wp-caption img {
|
||||
margin: 5px;
|
||||
}
|
||||
.wp-caption p.wp-caption-text {
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
.wp-smiley {
|
||||
margin: 0;
|
||||
}
|
|
@ -49,7 +49,6 @@
|
|||
s.wp_fullscreen_editor_id = ed.id;
|
||||
s.theme_advanced_resizing = false;
|
||||
s.theme_advanced_statusbar_location = 'none';
|
||||
s.content_css = s.content_css + ',' + s.wp_fullscreen_content_css;
|
||||
s.height = tinymce.isIE ? b.scrollHeight : b.offsetHeight;
|
||||
|
||||
tinymce.each(ed.getParam('wp_fullscreen_settings'), function(v, k) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(a,c){var d=this,g=0,e={},f=tinymce.DOM;a.addCommand("wpFullScreenClose",function(){if(a.getParam("wp_fullscreen_is_enabled")){f.win.setTimeout(function(){tinyMCE.remove(a);f.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});a.addCommand("wpFullScreenSave",function(){var h=tinyMCE.get("wp_mce_fullscreen"),i;h.focus();i=tinyMCE.get(h.getParam("wp_fullscreen_editor_id"));i.setContent(h.getContent({format:"raw"}),{format:"raw"})});a.addCommand("wpFullScreenInit",function(){var j=a.getDoc(),h=j.body,i;if(a.id=="wp_mce_fullscreen"){return}tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(a.settings,function(k,l){e[l]=k});e.id="wp_mce_fullscreen";e.wp_fullscreen_is_enabled=true;e.wp_fullscreen_editor_id=a.id;e.theme_advanced_resizing=false;e.theme_advanced_statusbar_location="none";e.content_css=e.content_css+","+e.wp_fullscreen_content_css;e.height=tinymce.isIE?h.scrollHeight:h.offsetHeight;tinymce.each(a.getParam("wp_fullscreen_settings"),function(m,l){e[l]=m});i=new tinymce.Editor("wp_mce_fullscreen",e);i.onInit.add(function(k){var m=tinymce.DOM,l=m.select("a.mceButton",m.get("wp-fullscreen-buttons"));if(!a.isHidden()){k.setContent(a.getContent())}else{k.setContent(switchEditors.wpautop(k.getElement().value))}setTimeout(function(){k.onNodeChange.add(function(o,n,p){tinymce.each(l,function(s){var r,q;if(r=m.get("wp_mce_fullscreen_"+s.id.substr(6))){q=r.className;if(q){s.className=q}}})})},1000);k.focus()});i.render()});if("undefined"!=fullscreen){a.addButton("fullscreen",{title:"fullscreen.desc",onclick:function(){fullscreen.on()}})}if(a.getParam("fullscreen_is_enabled")||!a.getParam("wp_fullscreen_is_enabled")){return}function b(){var k=a.getDoc(),h=k.body,m=k.documentElement,j=tinymce.DOM,l,i;if(tinymce.isIE){i=h.scrollHeight}else{if(tinymce.isWebKit){i=h.offsetHeight}else{i=m.offsetHeight}}l=(i>300)?i:300;if(g!=l){g=l;j.setStyle(j.get(a.id+"_ifr"),"height",l+"px")}}a.onInit.add(function(i,h){i.onChange.add(b);i.onSetContent.add(b);i.onPaste.add(b);i.onKeyUp.add(b);i.onPostRender.add(b);i.getBody().style.overflowY="hidden"});if(a.getParam("autoresize_on_init",true)){a.onLoadContent.add(function(i,h){setTimeout(function(){b()},1200)})}a.addCommand("wpAutoResize",b)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})();
|
||||
(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(a,c){var d=this,g=0,e={},f=tinymce.DOM;a.addCommand("wpFullScreenClose",function(){if(a.getParam("wp_fullscreen_is_enabled")){f.win.setTimeout(function(){tinyMCE.remove(a);f.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});a.addCommand("wpFullScreenSave",function(){var h=tinyMCE.get("wp_mce_fullscreen"),i;h.focus();i=tinyMCE.get(h.getParam("wp_fullscreen_editor_id"));i.setContent(h.getContent({format:"raw"}),{format:"raw"})});a.addCommand("wpFullScreenInit",function(){var j=a.getDoc(),h=j.body,i;if(a.id=="wp_mce_fullscreen"){return}tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(a.settings,function(k,l){e[l]=k});e.id="wp_mce_fullscreen";e.wp_fullscreen_is_enabled=true;e.wp_fullscreen_editor_id=a.id;e.theme_advanced_resizing=false;e.theme_advanced_statusbar_location="none";e.height=tinymce.isIE?h.scrollHeight:h.offsetHeight;tinymce.each(a.getParam("wp_fullscreen_settings"),function(m,l){e[l]=m});i=new tinymce.Editor("wp_mce_fullscreen",e);i.onInit.add(function(k){var m=tinymce.DOM,l=m.select("a.mceButton",m.get("wp-fullscreen-buttons"));if(!a.isHidden()){k.setContent(a.getContent())}else{k.setContent(switchEditors.wpautop(k.getElement().value))}setTimeout(function(){k.onNodeChange.add(function(o,n,p){tinymce.each(l,function(s){var r,q;if(r=m.get("wp_mce_fullscreen_"+s.id.substr(6))){q=r.className;if(q){s.className=q}}})})},1000);k.focus()});i.render()});if("undefined"!=fullscreen){a.addButton("fullscreen",{title:"fullscreen.desc",onclick:function(){fullscreen.on()}})}if(a.getParam("fullscreen_is_enabled")||!a.getParam("wp_fullscreen_is_enabled")){return}function b(){var k=a.getDoc(),h=k.body,m=k.documentElement,j=tinymce.DOM,l,i;if(tinymce.isIE){i=h.scrollHeight}else{if(tinymce.isWebKit){i=h.offsetHeight}else{i=m.offsetHeight}}l=(i>300)?i:300;if(g!=l){g=l;j.setStyle(j.get(a.id+"_ifr"),"height",l+"px")}}a.onInit.add(function(i,h){i.onChange.add(b);i.onSetContent.add(b);i.onPaste.add(b);i.onKeyUp.add(b);i.onPostRender.add(b);i.getBody().style.overflowY="hidden"});if(a.getParam("autoresize_on_init",true)){a.onLoadContent.add(function(i,h){setTimeout(function(){b()},1200)})}a.addCommand("wpAutoResize",b)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})();
|
|
@ -228,15 +228,7 @@ wp_admin_css( 'wp-admin', true );
|
|||
<div id="content3" class="hidden">
|
||||
<h2><?php _e('Writing at Full Speed') ?></h2>
|
||||
<p><?php _e('Rather than reaching for your mouse to click on the toolbar, use these access keys. Windows and Linux use Ctrl + letter. Macintosh uses Command + letter.') ?></p>
|
||||
<p class="dfw-extra"><?php
|
||||
|
||||
printf( __('In Distraction free writing mode use %1$s to make the editor wider, %2$s to make it narrower and %3$s to reset it to the original theme width.'),
|
||||
'<span class="win">Alt +</span><span class="mac">Ctrl +</span>',
|
||||
'<span class="win">Alt -</span><span class="mac">Ctrl -</span>',
|
||||
'<span class="win">Alt 0</span><span class="mac">Ctrl 0</span>'
|
||||
);
|
||||
|
||||
?></p>
|
||||
<table class="keys" width="100%" style="border: 0 none;">
|
||||
<tr class="top"><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th></tr>
|
||||
<tr><th>c</th><td><?php _e('Copy') ?></td><th>v</th><td><?php _e('Paste') ?></td></tr>
|
||||
|
|
Binary file not shown.
|
@ -36,7 +36,7 @@ $wp_db_version = 17517;
|
|||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '342-20110527';
|
||||
$tinymce_version = '342-20110601';
|
||||
|
||||
/**
|
||||
* Holds the cache manifest version
|
||||
|
|
Loading…
Reference in New Issue