Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

2.3 and the position of the HTML editor toolbar


Go to End
Reply


9 Posts   2006 Views

Avatar
Carbon Crayon

Community Member, 598 Posts

23 March 2009 at 10:38am

Hi Guys

Having been using 2.3 for a while now it's really noticable how much has improved from previous versions. There is one change however which I am finding a little difficult to deal with on a current project and that is the repositioning of the TinyMCE editor to the inside of the field itself.

In principle I it's a great idea, reducing clutter on pages that dont need it and also making clear which boxes are HTML and which are not. And in most cases that probably outweighs the negatives.

However it becomes a real problem on pages that have large amounts of content in one editor because switching on auto resize makes the field far bigger than the surrounding window, so say you wanted to make some text near the bottom bold, you now have to scroll down to the bottom, highlight it and then scroll all the way back to the top to find the bold button. Seriously tedious and not something I want to have to explain to clients. So the other option, and the one that has been implemented by default is to keep the field fixed and relatively small. This is fine for small amounts of content but when you have a very large page it becomes a total nightmare.

So anyway I am wondering how I would go about moving the tool bar back to be persistent at the top of the screen? And also what are other peoples opinions about this?

Avatar
Willr

Forum Moderator, 5513 Posts

23 March 2009 at 5:53pm

The reason for moving the editor to be nearer the content rather then the top was more of a technical one rather then a design one. The amount of customizing to get tinymce at the top was huge, when sam upgraded tiny_mce the decision was made that we would take the easy way and just attach it to the content field, reducing the amount of editing we had to do to tinymce.

So the short answer is no, moving it back up to the top would be a world of hurt AFAIK.

Avatar
Fuzz10

Community Member, 787 Posts

23 March 2009 at 10:20pm

hi Aram,

On another note ; mind telling me how you set the (re)-size of the TinyMCE field ? ;)

Avatar
Carbon Crayon

Community Member, 598 Posts

23 March 2009 at 11:30pm

@willr - Ahh I see. that's a shame but understandable. I take it there are no plans to move it back to the top at some point?

@Fuzz - There are 2 ways to change the size, you can either make it autoresize by changing the value in cms/javascript/tinymce.template.js to true or you can set a larger fixed size when defining the field by adding the number of rows to the definition: new HTMLEditor("Content", "Content", 45).

Unfortunately neither are ideal for the reasons stated above, but they are better than the default :)

Avatar
Fuzz10

Community Member, 787 Posts

23 March 2009 at 11:31pm

Thanks..

A default size sounds like a good addition to the _config.php , no ?

Avatar
Carbon Crayon

Community Member, 598 Posts

23 March 2009 at 11:46pm

Yea that would be really useful.

Also having a user re-sizable editor window would be great, like they have on the TinyMCE demo page: http://tinymce.moxiecode.com/examples/full.php

I tried adding theme_advanced_resizing : true to the template but it doesn't seem to work, is that locked off by silverstripe?

Avatar
Carbon Crayon

Community Member, 598 Posts

24 March 2009 at 12:04am

oooh just found full screen mode which pretty much solves all the problems!

in cms/javascript/tinymce.template.js add the following:

line 32 in the plugins list add: ,fullscreen
line 35 or 36 in the buttons list add: ,fullscreen

then you have a button which will fullscreen the editor and make editing large blocks of content a breeze! :)

Avatar
Fuzz10

Community Member, 787 Posts

24 March 2009 at 9:04pm

heey.. that is a good find !

Thanks !

Go to Top