Question T15651
Visible to All Users

Choices CK editor

created a year ago

Hello,

I want to add ck editor into choices. And I did it but I have a questions.

Clipboard-File-1.png

TypeScript
SurveyCore.Serializer.addProperty("itemvalue", { name: "ckeditor", type: "ckeditor", displayName: "CK Editor", isSerializable: true, showMode: "form", isDynamicChoices: true, onSetValue: (obj: any, value: any, jsonConv: any) => { obj.text = value; }, });

Questions:

  1. How to make label text in choices the same as in the ck editor?
  2. How to change ck editor text when label was changed in choices or in the control?
  3. How to add "+" button to custom checkbox control?
    Clipboard-File-2.png
  4. How to add possibility to change label in the custom control?
    Clipboard-File-3.png

Thanks,
Anton

Answers approved by surveyjs Support

created a year ago

Hello Anton,
If you wish to use a custom editor to edit a property value, please use the PropertyGridEditorCollection.register function to register your custom CKEditor for properties of the specified type/name. Refer to the following demo: Custom Property Editor. Please note that a custom property grid editor can be used within the Property grid only. The custom property editor should not be used on a design surface.

Please let me know if you can successfully register a custom CKEditor within a survey creator.

Also, it seems that your message contains additional questions regarding a custom control. To avoid mixing multiple topics in one thread, I would greatly appreciate it if you could submit a separate issue and attach some sample illustrating your custom question configuration.

Thank you

    Show previous comments (11)

      Hi Anton,
      I created the following demo and confirmed that it works: https://codesandbox.io/p/sandbox/elated-shamir-rpcdms?file=%2Fsrc%2FSurveyCreatorComponent.jsx%3A63%2C36.

      Please review the demo and let me know if it helps.

        Jane,

        Thank you a lot! Will investigate.

        Thanks,
        Anton

          Hi Anton,
          No problem. Please feel free to contact us if you have any further questions.