Question T3529
Visible to All Users

Use CK Editor as a property editor

created 5 years ago

I Use CK Editor as a property editor design survey but it not work when I answer, I've read a lot about it in the support
but there was no result can you give me an example
Thank you.
survey1.png
survey2.png

Answers approved by surveyjs Support

created 5 years ago

Hello,

The CK Editor saves text as HTML. In our samples for SurveyJS Creator (https://www.surveyjs.io/Examples/Survey-Creator?id=ckeditorpropertyeditor&theme=bootstrap#content-js) and for SurveyJS Library (https://www.surveyjs.io/Examples/Library?id=survey-markdown-radiogroup&platform=jQuery&theme=modern#content-js) we're using 3rd party markdown converter:

JavaScript
//Create showdown mardown converter var converter = new showdown.Converter(); survey .onTextMarkdown .add(function (survey, options) { //convert the mardown text to html var str = converter.makeHtml(options.text); //remove root paragraphs <p></p> str = str.substring(3); str = str.substring(0, str.length - 4); //set html options.html = str; });

Thanks, Serge
SurveyJS Team