How do I edit text from a database without CKEditor adding heaps of unwanted <p> </p> and
<br /> when it loads the text.
How do I call the text and have it appear in the editor as it is written without garbage bein added to it throughout.
How do I edit text from a database without CKEditor adding heaps of unwanted <p> </p> and
<br /> when it loads the text.
How do I call the text and have it appear in the editor as it is written without garbage bein added to it throughout.
I'm having the same problem.
I'm having the same problem. When the editor saves, it seems to be adding a <BR><BR> after every </p> tag. If you open and resave the data several times, the space between paragraphs become HUGE. Where in the code is this translation being made and how can I stop or fix this?
I'm new to CKeditor but not to JAVA Script or ASP programming. I cannot figure out where in the code to try and fix this. Please help a newby out.
Thanks.
Opps, I fould out the problem
Opps, I fould out the problem was me and not CKeditor. Maybe you are having the same problem.
What I was doing was reading my data from a text file using ASP. I was using the .READLINE and adding the <BR> after every line of text. CKeditor translats the <BR> to <p> </p>.
Anyway, I changed the .READLINE to .READALL and didn't add the <BR> and all is well.
CKeditor translate <BR> tags to <p> </p>. The Editor uses <br /> instead of <BR> so maybe if you translate your text before sending it to the editor it will fix your problem.
Again, where in the code can I change how things get translated? For instance, how can I make it so <BR> tags are left <BR> and not translated to <p> </p>??? This information would be most helpful.
Thanks to all.
The problem is when the text is recalled
I am working in php/mysql.
The markup is being saved to the database as it is written. My problem is when the markup is recalled to the editor the <br> is being added after a <br> or </p>, or a <p> added after <strong> or </div> and </p> before <br>
Has me beat, think I'll forget this idea and use a simple text area with a seperate area for headings.
It would help to see the code
It would help to see the code before it is sent to the database and how it's changed once it's pulled from the database. Also, which version of CKEditor are you using?
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
The problem is when the text is recalled
I still think the problem is at your end. Try reading your data from your database and just display it on your browser. Then look at the Source HTML and see if there are any surprises in the HTML code.
Then try encoding your data with the PHP command htmlentities() and display that on your browser. See any surprises?
The Editor will not translate nothing into something, so you will need to find out what is in your data that the Editor is translating in a way you don't want.
Then read the data into the Editor and press the Source button. Again, look to see how the Editor translated your HTML data. Save the data and compare what the editor generated to what get put into your database. Somewhere the data is getting strange translations.
We know the Editor translate <BR> to <P>space<?P>, which is not good so don't use <BR>. Instead, use </ br> which is what the editor uses. There maybe other such translation difference you have to consider. But any HTML data created by the Editor should be read in exactly the same as it translate it. If it doesn't, then somehow other tags or characters is getting into your data such as hidden code like charage returns or line feeds.
Hope you figure it out.
How can I tell what version
How can I tell what version of the editor I am using? I've open several of the files, such as the ckeditor.js but I do not see a version anywhere.
Vversion
In CHANGES.md
You can also click the About
You can also click the About CKEditor button from the toolbar (the one with a question mark icon), editor version and revision are there.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!