Skip to content

Commit 6093834

Browse files
committed
TinyMCE tweaks from skeltoac. fixes WordPress#1852
git-svn-id: https://develop.svn.wordpress.org/trunk@3015 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b6930ce commit 6093834

7 files changed

Lines changed: 53 additions & 29 deletions

File tree

wp-admin/admin-header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function blurry() {
100100
entity_encoding : "raw",
101101
relative_urls : false,
102102
remove_script_host : false,
103-
valid_elements : "a[href|title],strong/b,em/i,strike,u,p[class|align],ol,ul,li,br,img[class|src|alt|title|width|height|align],sub,sup,blockquote,table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class],address,h1[class|align],h2[class|align],h3[class|align],h4[class|align],h5[class|align],h6[class|align],hr",
103+
valid_elements : "-a[href|title|rel],-strong/b,-em/i,-strike,-del,-u,p[class|align],-ol,-ul,-li,br,img[class|src|alt|title|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],-div[dir|class|align],-span[class|align],-pre[class],address,-h1[class|align],-h2[class|align],-h3[class|align],-h4[class|align],-h5[class|align],-h6[class|align],hr",
104104
plugins : "wordpress,autosave"
105105
<?php do_action('mce_options'); ?>
106106
});

wp-admin/edit-form-advanced.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function focusit() {
131131
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div>
132132
</fieldset>
133133

134-
<fieldset id="postdiv">
134+
<fieldset id="<?php echo ( 'true' != get_user_option('rich_editing') ) ? 'postdiv' : 'postdivrich'; ?>">
135135
<legend><?php _e('Post') ?></legend>
136136

137137
<?php

wp-admin/edit-page-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function focusit() { // focus on first input field
117117
</fieldset>
118118

119119

120-
<fieldset id="postdiv">
120+
<fieldset id="<?php echo ( 'true' != get_user_option('rich_editing') ) ? 'postdiv' : 'postdivrich'; ?>">
121121
<legend><?php _e('Page Content') ?></legend>
122122
<?php
123123
$rows = get_settings('default_post_edit_rows');

wp-admin/wp-admin.css

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ a.delete:hover {
1313
color: #fff;
1414
}
1515

16-
#postdiv div {
17-
margin-left: 1em;
18-
}
19-
2016
#planetnews ul {
2117
list-style: none;
2218
margin: 0;
@@ -54,7 +50,7 @@ a:visited {
5450
}
5551

5652
a:hover {
57-
border-bottom: 1px solid #3a75ae;
53+
/* border-bottom: 1px solid #3a75ae;*/
5854
color: #069;
5955
}
6056

@@ -193,7 +189,7 @@ textarea, input, select {
193189
.available-theme a.screenshot {
194190
width: 250px;
195191
height: 200px;
196-
display: block;
192+
display: inline-block;
197193
margin: auto;
198194
background: #f1f1f1;
199195
border: 1px solid #ccc;
@@ -202,7 +198,7 @@ textarea, input, select {
202198
}
203199

204200
.available-theme a.screenshot:hover {
205-
border: 1px solid #666;
201+
/* border: 1px solid #666;*/
206202
}
207203

208204
.available-theme img {
@@ -352,7 +348,7 @@ table .vers, table .name {
352348
}
353349

354350
#submenu {
355-
background: #0d324f;;
351+
background: #0d324f;
356352
border-bottom: none;
357353
margin: 0;
358354
padding: 3px 2em 0 3em;
@@ -386,9 +382,33 @@ table .vers, table .name {
386382
border: none;
387383
}
388384

389-
#content, #titlediv input, #quicktags {
390-
margin-left: 2%;
391-
width: 97%;
385+
#titlediv {
386+
margin: 0 8px 0 0;
387+
padding: 0px;
388+
}
389+
390+
#postdiv {
391+
margin: 0 8px 0 0;
392+
padding: 0px;
393+
}
394+
395+
#postdivrich {
396+
margin: 0px;
397+
padding: 0px;
398+
}
399+
400+
#content {
401+
margin: 0 0 0 0;
402+
width: 100%;
403+
}
404+
405+
#titlediv input {
406+
margin: 0px;
407+
width: 100%;
408+
}
409+
410+
#quicktags {
411+
margin-left: -1px;
392412
}
393413

394414
#currenttheme img {
@@ -429,9 +449,14 @@ table .vers, table .name {
429449
font-size: 1.5em;
430450
}
431451

452+
#postexcerpt div {
453+
margin-right: 8px;
454+
}
455+
432456
#excerpt {
457+
margin: 0px;
433458
height: 4em;
434-
width: 98%;
459+
width: 100%;
435460
}
436461

437462
#footer {
@@ -490,8 +515,8 @@ table .vers, table .name {
490515

491516
#postcustom table {
492517
border: 1px solid #ccc;
493-
margin: .5em;
494-
width: 98%;
518+
margin: 0px;
519+
width: 100%;
495520
}
496521

497522
#postcustom table input, #postcustom table textarea {
@@ -654,7 +679,7 @@ table .vers, table .name {
654679
margin-bottom: 1em;
655680
}
656681
#moremeta fieldset div {
657-
margin-left: 5px;
682+
margin: 2px 0 0 5px;
658683
}
659684
#moremeta {
660685
line-height: 130%;
@@ -677,7 +702,6 @@ table .vers, table .name {
677702

678703
#advancedstuff div {
679704
margin-top: .5em;
680-
margin-left: 2%;
681705
}
682706

683707
#categorydiv div div {
@@ -783,4 +807,4 @@ a.dbx-toggle-open, a.dbx-toggle-open:visited {
783807
-moz-opacity: 0.8;
784808
-khtml-opacity: 0.8;
785809
filter: alpha(opacity=80);
786-
}
810+
}

wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ function TinyMCE_wordpress_cleanup(type, content) {
190190
}
191191
}
192192

193+
// The Curse of the Trailing <br />
194+
content = content.replace(new RegExp('<br ?/?>[ \t]*$', ''), '');
195+
193196
break;
194197
}
195198

wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ function TinyMCE_wordpress_cleanup(type, content) {
190190
}
191191
}
192192

193+
// The Curse of the Trailing <br />
194+
content = content.replace(new RegExp('<br ?/?>[ \t]*$', ''), '');
195+
193196
break;
194197
}
195198

wp-includes/js/tinymce/themes/advanced/css/editor_content.css

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@
44
body {
55
background-color: #FFFFFF;
66
font-family: Verdana, Arial, Helvetica, sans-serif;
7-
font-size: 10px;
8-
scrollbar-3dlight-color: #F0F0EE;
9-
scrollbar-arrow-color: #676662;
10-
scrollbar-base-color: #F0F0EE;
11-
scrollbar-darkshadow-color: #DDDDDD;
12-
scrollbar-face-color: #E0E0DD;
13-
scrollbar-highlight-color: #F0F0EE;
14-
scrollbar-shadow-color: #F0F0EE;
15-
scrollbar-track-color: #F5F5F5;
7+
font-size: 0.9em;
8+
line-height: 1.2em;
9+
padding: .3em;
1610
}
1711

1812
td {

0 commit comments

Comments
 (0)