Hey guys,
first of all greate work with CKEDITOR 4.3 :)
I have the problem, that my Java-Applikation behind my CKEDITOR is getting a failure, when I save an part of a html cause it my have not have a root-tag.
Well let me show what i mean
This is my content from CKEDITOR sent to my Servlet:
<P>Es stehen Ihnen folgende weitere Suchmöglichkeiten zur Verfügung:</P> <P> .... </P>
But my servlet doesn't recognize it as html and converts it to normal text (it replaces < and > to html-entities.
So I wanted to ask: Is it possible to let CKEDITOR automaticly add a root-tag (div in this case) arround my content if there is none (like below)?
<div> <P>Es stehen Ihnen folgende weitere Suchmöglichkeiten zur Verfügung:</P> <P> .... </P> </div>
Kind regards Basti890
Hi,
Hi,
If Div is root tag you need then why not checking the first element either on server or on client side.
Just check if this is a div and if not then add it.
I'm not sure you full HTML can also be send but it is rather easy to check if first element is div and not HTML or doctype and HTML.
On server-side this is checking string that was received in request.
On client-side you can use http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toDataFormat event (with highest priority) to add missing tags.