I have a poetry site and I just added CKEditor. When javascript is disabled, the simple editor is automatically available. However it doesn't work like my people expect. You have to enter an HTML <br> to get a new line. They use the enter key to separate lines but the result is a single run-together paragraph.
If I could know that javascript is disabled or unavailable like in iphones or pads.I could treat the text before it is displayed or stored in the mysql database. Is there any way to do this? or to substitute a simple textarea when javascript is not available?
CKEditor obviously "knows" that javascript is not available and displays the simple editor. I need to know how it knows.
If I could know that javascript is disabled or unavailable like in iphones or pads.I could treat the text before it is displayed or stored in the mysql database. Is there any way to do this? or to substitute a simple textarea when javascript is not available?
CKEditor obviously "knows" that javascript is not available and displays the simple editor. I need to know how it knows.
Re: javascript disabled problem
CKEditor does not "know" this. CKEditor code is simply written in JavaScript. If for some reason the execution of its script is impossible, a normal textarea is displayed.
Take a look at our samples ("_samples" folder of your CKEditor installation). We just add a <noscript> element with an alert message that informs the users that CKEditor could not be loaded due to JavaScript being disabled. You can probably do the same on your page, instructing your users to use HTML tags to format their content. For an advanced solution, you can create a hidden field programatically using JavaScript, as a flag to mark that JS is enabled, and then act accordingly.
Hope this helps.
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!