Hi, Im using CKEDITOR and have encountered a problem with whitespace being trimmed. Here is the problem
THIS
<h1><?=$city;?> Team - Book Now</h1>
IS CHANGED TO THIS
<h1>
<?=$city;?>Team - Book Now</h1>
As you can see im echoing a PHP var here but ckeditor things <?=$city;?> is the start of a tag hence it is removing the whitespace before Team
I've searched for hours and tried various suggestions but none work. I am using jquery to call ckeditor so if you have a solution, jquery would be best way to provide it
THANK YOU!
THIS
<h1><?=$city;?> Team - Book Now</h1>
IS CHANGED TO THIS
<h1>
<?=$city;?>Team - Book Now</h1>
As you can see im echoing a PHP var here but ckeditor things <?=$city;?> is the start of a tag hence it is removing the whitespace before Team
I've searched for hours and tried various suggestions but none work. I am using jquery to call ckeditor so if you have a solution, jquery would be best way to provide it
THANK YOU!
Re: whitespace issue
Try something like this:
// Set instance parameters so that its resulting HTML is created as an unbroken stream
CKEDITOR.instances[TextAreaElement.attr("id")].on("instanceReady", function(e)
{
e.editor.dataProcessor.writer.indentationChars = "";
e.editor.dataProcessor.writer.lineBreakChars = "";
});
See this in the documentation:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Output_Formatting