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.
Use CK Editor as a property editor
Show previous comments
(0)
Comments
(0)
Sign in to comment on this post
Answers approved by surveyjs Support
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