0

I am using CKEditor in my project.I wanted to know what happens when we submit the text entered(on click of a submit button).Wanted to know if the text entered gets posted as HTML or just plain text when we submit?

Thanks, Shilpa

2 Answers 2

1

...have you tried???

it submits as HTML

Sign up to request clarification or add additional context in comments.

3 Comments

I am trying to add the Submit button to display the text entered (document.myform.submit();) But its not working though. Could you let me know how to add the Submit button?
ckeditor() converts a textarea to an RTE (rich text editor). when you submit the form that the textarea is contained in (using a normal <input type="submit"/> button), the original textarea is updated with the HTML, and the form is submitted. I think the conversion is delayed, so querying the value of the textarea itself will not give you the HTML. if you want to know the value of the CKEditor HTML, you need to use something like .getData(). Anotehr similar question is answered here: stackoverflow.com/questions/2440680/…
I was not able to create the submit button. I have used the <input type="submit" value="Submit" /> and when i click on the submit button, it just refreshes the screen and does nothing..
0

The submitted text from textarea(styled with ckeditor) included some HTML tags. For example, the bold tag, <b>Sample Text</b>. But if you want to remove the tags in php, just use the function striptags.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.