I am having problem to get selected html written in ckeditor in javascript in my drupal project. can any one help me out?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CKEditor’s API doesn’t provide exactly this, but looking at the docs it looks as though you could do the following (untested):
CKEditor also has HTML parsing and serialization APIs that I don’t know much about, so you may be able to use those to tailor the HTML to your requirements rather than use the raw output from the browser’s
innerHTMLimplementation.