ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE2.4.0 Control Panel: want template editor text to wrap

April 14, 2012 11:19am

Subscribe [3]
  • #1 / Apr 14, 2012 11:19am

    Lesli

    92 posts

    Hello,

    When I’m editing my templates, I want the text in that field to wrap - not be in a monospaced font with no wrapping, like the default 2.4.0 control panel behavior. Where can I change the control panel CSS (I’m presuming that it’s CSS-styled) so that this will occur?

  • #2 / Apr 14, 2012 2:39pm

    boldyellow

    89 posts

    Writing code in the CP is like typing wearing mittens.  For me (and I’m a Mac guy) it’s far easier to just use my favorite code editor (Coda) on my laptop.  I’ve used Mountee very successfully to access and sync my templates.  Plus I get the added benefit of syntax highlighting.

    But you can also just save your templates as files in EE and then work on them using an external editor… the documentation has some info on various methods here.

    Hope that helps some.

  • #3 / Apr 14, 2012 7:28pm

    Lesli

    92 posts

    Thank you for replying, boldyellow, but actually, no, that doesn’t help me. I’m aware that the capability exists in EE to edit flat files and use whatever editor the user chooses, and the capability has existed for quite some time; but when I want to just make minor tweaks to the templates, I don’t want to have to wait until I’m at home with my computer that has CS5 installed on it. I want to be able to use my laptop, log in, make the minor tweak, and go. Or if I’m vacationing, and want to do a little more than just tweaking but still am not doing major changes…I want the ability to edit in the CP, without the thrice-rotted word wrapping.

    Wrapping is default behavior in textareas, so something somewhere else is turning off that default behavior. Problem is…I haven’t been able to find that, looking in /cp-themes/default/global.css. I did find where I could change the font from monospace to a much more straightforward Arial or sans-serif. (Sadly, that same style definition doesn’t describe the wrapping behavior.)

  • #4 / Apr 14, 2012 9:58pm

    boldyellow

    89 posts

    Ahh, I see… so you likely saw the MarkItUp textarea

    <textarea id="template_data" class="markItUpEditor" wrap="off"...
  • #5 / Apr 14, 2012 10:10pm

    Lesli

    92 posts

    That’s in the code itself? No, I did not see that.

    And actually, when looking at the code for my template-editing via the CP, I’m seeing the following:

    <textarea name=“template_data” cols=“100” rows=“28” id=“template_data” wrap=“off” >

    Not seeing anything about MarkItUp. (I’m running 2.4.0.) But the issue now looks like I’ll have to somehow edit the guts of the CP itself every time I upgrade, unless there’s a setting somewhere that I can toggle to allow for wrapping.

  • #6 / Apr 16, 2012 2:42pm

    Dan Decker

    7338 posts

    Hi Lesli,

    There is no control for wrap in the Control Panel, so you aren’t missing anything.

    You might like to look at Editee on Devot:ee for some expanded in-browser editing options.

    Cheers,

  • #7 / Apr 16, 2012 7:39pm

    Lesli

    92 posts

    Hi Dan,

    Thanks for the reply. I want to try and use as few plugins as possible, though, to keep the site and the control panel fast (and keep updates only as complex as they need to be) - and since this wrapping being turned off effectively “damages” (doesn’t quite break, just makes it a really poor user experience) the native in-browser template edit functionality, I hope that it will be fixed soon.

    Can you tell me what file I might manually change that in? The entry-edit and publish fields don’t wrap, so this isn’t a global thing. Someone on the EE team just decided - oh, having the template-editing in monospaced font and not wrapping is going to look more obviously “code-editor”-ish - and made the change.

    (And yet, editing the snippets, my code wraps. I have no problems there! But, quite obviously, I can’t have edits that are 100% snippets.)

  • #8 / Apr 17, 2012 4:48am

    nathanpitman

    531 posts

    I think this should be logged as a feature request, it certainly makes sense that the ‘presentation’ and ‘behaviour’ should be consistent for form based editing. 😊

  • #9 / Apr 18, 2012 5:22pm

    Shane Eckert

    7174 posts

    Hey Lesli,

    I would file a Feature Request for sure.

    Is there anything else I can help with?

    Cheers,

  • #10 / Apr 18, 2012 9:06pm

    Lesli

    92 posts

    I filed this as a feature request yesterday - and I did get a short-term fix: the name of which file to edit, and which line to remove. (And some information about creating a custom CP theme, which didn’t seem to work…)

    But, eh - I have a short-term fix!

  • #11 / Apr 20, 2012 10:47am

    Shane Eckert

    7174 posts

    Hi Lesli,

    Awesome. Thank you for filing that Feature Request.

    Glad you have a fix!

    Have an excellent weekend.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases