[wp-trac] [WordPress Trac] #5374: "Write page/post" > "code"
textarea is to right
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 21 02:40:40 GMT 2007
#5374: "Write page/post" > "code" textarea is to right
--------------------------+-------------------------------------------------
Reporter: cacycleworks | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version: 2.3.1
Severity: minor | Keywords:
--------------------------+-------------------------------------------------
This seems similar to Ticket #s [http://trac.wordpress.org/ticket/3684
3684] and [http://trac.wordpress.org/ticket/3540 3540] however it's not
exactly like them.
On the "Write page/post" the "code" textarea is far to the right of the
center working pane, so that a portion gets cut off. The box's left edge
is perfectly aligned to the end of the "code" tool buttons. I thought it
was a touch odd with the out-of-box install, but the problem made the page
unusable when I applied a theme.
I'm certain my methodology goes against the WP coding style/ ethos, as I
found a quick CSS <DIV> hack that changed the behavior in wp-includes
/general-template.php ...
''original source:''
{{{
wp-includes/general-template.php
906 </script>
907 <?php
908
909 $the_editor = apply_filters('the_editor', "<div><textarea
class='mceEditor' $rows cols='40' name='$id' tabindex='2'
id='$id'>%s</textarea></div>\n");
910 $the_editor_content = apply_filters('the_editor_content', $content);
911
912 printf($the_editor, $the_editor_content);
913
914 ?>
915 <script type="text/javascript">
}}}
''a workaround I used which fixed the symptom:''
{{{
wp-includes/general-template.php
907 <div style="float:left; width:100%;">
908 <?php
909
910 $the_editor = apply_filters('the_editor', "<textarea
class='mceEditor' $rows cols='40' name='$id' tabindex='2'
id='$id'>%s</textarea>\n");
911 $the_editor_content = apply_filters('the_editor_content', $content);
912
913 printf($the_editor, $the_editor_content);
914
915 ?></div>
}}}
Note that I did try to change {{{ apply_filters('the_editor',
"<div><textarea }}}
to: {{{ apply_filters('the_editor', "<div}}} '''{{{style=\"float:left;
width:100%;\"}}}''' {{{><textarea }}}
and: {{{ apply_filters('the_editor', "<div}}} '''{{{style='float:left;
width:100%;'}}}''' {{{><textarea }}}
however these caused errors as print_r complained about the numbers of
arguments passed. I did initially try only {{{'style='float:left'}}} and
that worked, but then the text area was only about 100px wide, so I wanted
to add the width, too.
I figure someone familiar with the code and the CSS of this area may be
able to incorporate the change or implement a more simple solution. :)
version: wordpress-2.3.1.tar.gz
OS: kubuntu gutsy 7.10 amd64
browser: FF
served by LAMP install on same machine.
--
Ticket URL: <http://trac.wordpress.org/ticket/5374>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list