Dears,
I cloned the community version of ( surveyjs-nodejs) -> https://github.com/surveyjs/surveyjs-nodejs .
I’m trying to remove some of the toolbox items such as ( html and file ). The problem is I checked the following documentation ->https://www.surveyjs.io/Examples/Builder/?id=toolboxcustomization&theme=bootstrap , but to be honest I was a little confused because I couldn’t find the javascript file that has the editor object to be able to remove some question items.
Your support is highly appreciated.
Regards,
Reem
The information in this email may contain confidential material and it is intended solely for the addresses. Access to this email by anyone else is unauthorized. If you are not the intended recipient, please delete the email and destroy any copies of it, any disclosure, copying, distribution is prohibited and may be considered unlawful. Contents of this email and any attachments may be altered, Statement and opinions expressed in this email are those of the sender, and do not necessarily reflect those of Saudi Telecommunications Company (STC).
Hello,
You need to get the
editor
object.It is created here - https://github.com/surveyjs/surveyjs-nodejs/blob/master/public/editor.js#L51
You can work with the
editor
object in any line below, e.g. as some properties are set - https://github.com/surveyjs/surveyjs-nodejs/blob/master/public/editor.js#L72-L74Thanks, Serge
SurveyJS Team
I found addItem function and changeCategory in the documentation. Can you please tell me if there’a a function for the editor to remove a toolboxquestion item?
The function I found are down below :
editor .toolbox .addItem({ name: "countries", isCopied: true, iconName: "icon-default", title: "All countries", json: { "type": "dropdown", optionsCaption: "Select a country...", choicesByUrl: { url: "https://restcountries.eu/rest/v2/all" } } });
And
editor .toolbox .changeCategories([ { name: "panel", category: "Panels" }, { name: "paneldynamic", category: "Panels" }, { name: "matrix", category: "Matrix" }, { name: "matrixdropdown", category: "Matrix" }, { name: "matrixdynamic", category: "Matrix" } ]);
`````````Thank you,``````Reem```
I figure it out. thanks for guiding me to the editor object.
Regards,
Reem