Hello everyone,
I got an issue when I try to add some HTML codes, my HTML is executed in the CKEditor Textarea. I mean, all my HTML codes have changed of place in my Textarea, so how can I fix it?
Before the adding :
<pre><div>toto</div></pre>
In my database :
<pre><div>toto</div></pre>
In my Textarea when I wanna edit :
<pre> </pre><div>toto</div>
Someone?
Someone?
I'm not sure if this is what
I'm not sure if this is what you're after. But CKEDITOR seems to add a lot of white space, I added these rules to mine to prevent ckeditor from inserting space. Also I disabled 'pre' because it doesn't store well in a DB.
I put your code in my config
I put your code in my config.js file but I get the same issue...
In my database : <pre class="html " data-pbcklang="html"><div>toto</div></pre><p>totoppppppp</p>
In my textarea : <pre class="html " data-pbcklang="html"><br></pre><div>toto</div><p>totoppppppp</p>
<pre> element allows only
<pre> element allows only phrasing content (inline stuff) inside - http://www.w3.org/TR/html-markup/pre.html - so CKEditor is fixing this invalid HTML.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Another plugin
So, do you know another plugin to publish code snippets?
See the Insert Pre plugin (it
See the Insert Pre plugin (it is used on our forum, too).
There are some code highlighters available, too, just check the Add-ons Repository.
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!
Same thing...
I use ExpressJS for the back-end, maybe it's the issue...
The code in your database is
The code in your database is wrong.
It should be
if you want to see the text
in your final page.
BTW Anna, I didn't realize that the Pre button was enabled.
Ok, so, what I have to do?
You found my issue ! (All my apologies to Reinmar, because he already said me this and I didn't understand...)
Thank you.