I am sure that @Fonski answer is correct but thought I would update this for anyone else that did was confused as to where to put the code. I placed the following in my _config.php
file to get it to work:
$defaultEditorConfig = HtmlEditorConfig::get('cms');
$defaultEditorConfig->setOptions(
array(
'mode' => 'textareas',
'theme' => 'advanced',
'force_br_newlines' => false,
'force_p_newlines' => false,
'forced_root_block' => ''
)
);
Note: If you just want to remove the p tag that automatically wraps image tags (etc) all you need to set is the 'forced_root_block' => ''
option.
EDIT: This advice is for those using SilverStripe, I posted this thinking the questions was SilverStripe specific.
forced_root_block: ''
stops tinymce for constantly wrapping my<span>
tags with<p>
. Thank you! – Calomel