This question seems to be recurring in the forums, but never answered. I want to create a new empty editor that would have set the styles (bold, font style, etc...). I cannot use the "default" style, as this changes every instance.
There is one workaround - after creating I use setData() method to inject HTML markup to the editor, but there needs to be a nbps for the styles to take the effect.
If I inject the HTML without the space, the style is not set (checking immediately with getData, and clicking into the editor). Also preinjecting the markup into the textarea does not work.
If there is any other solution, please let me know, otherwise I hope this might help someone.
There is one workaround - after creating I use setData() method to inject HTML markup to the editor, but there needs to be a nbps for the styles to take the effect.
CKEDITOR.instances.content_view3.setData('<p class="large"><strong> </strong></p>')
If I inject the HTML without the space, the style is not set (checking immediately with getData, and clicking into the editor). Also preinjecting the markup into the textarea does not work.
If there is any other solution, please let me know, otherwise I hope this might help someone.