Question T5995
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Re: Instantiating a markdown library

Instantiating a markdown library

created 4 years ago

Hello.
I have begun investigating the use of a markdown library.

What I find confusing is that SurveyJS 'supports' markdown by passing every 'text' string into the onTextMarkdown event callback. EVERY string. I would have thought that SurveyJS would perform the 'filtering' of strings, meaning 'support for markdown', and not pass that task to the callback.

In the example - https://surveyjs.io/Examples/Library?id=survey-markdown-radiogroup-marked&platform=Knockoutjs&theme=modern#content-js , a 'marked' object is instantiated for every string in the JSON. This cannot be efficient.

I realise that publishing a string of all HTML and markdown tags for implementing a regex or substring test creates a maintenance issue but if that exercise (testing for tags) is not performed prior to instantiating a markdown library object, performance suffers.

I seek guidanceā€¦

Met vriendelijk groeten,
Max

Answers approved by surveyjs Support

created 4 years ago

Hello,

I've marked this issue as a duplicate of the https://surveyjs.answerdesk.io/ticket/details/t5996 thread. In case of I missed something please feel free to write here again.

Thanks, Serge
SurveyJS Team

    Comments (1)

      Hello.
      The two emails are related.

      The second one is my simplistic 'filtering solution' for text strings with HTML tags.

      Mvg.

      From: Serge T [surveyjs Support]
      Sent: Monday, December 28, 2020 9:46 AM
      To: d04105641@inbox.lv
      Subject: RE: Instantiating a markdown library [T5995]