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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Messed up wysiwyg editor


Go to End


3 Posts   1372 Views

Avatar
_dp

Community Member, 3 Posts

29 November 2009 at 7:20am

hi

i wanted to modify the width of the wysiwyg editor, so i searched for it in the documentation and found this:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/width

i tried to place it into my _config.php file and my Page.php file, but this didnt work.

then i tried and added this code to my Page.php:

public function getCMSFields() {
		$fields = parent::getCMSFields();
		
		HtmlEditorConfig::get('cms')->setOption('width', '460');
 
 		return $fields;
	}

But this somehow messed my editor up. there are no buttons displayed anymore, instead i only see bb codes listed below the textbox.

how can i reset the config for the editor?

Avatar
baba-papa

Community Member, 279 Posts

29 November 2009 at 8:58pm

Simply delete your code changes and everything should work like before. If you make changes to getCMSFields() no changes in the database occure.

Avatar
_dp

Community Member, 3 Posts

30 November 2009 at 3:35am

Hi

thx, i reset to the default template and start from the scratch now