Hello,
We are in the process of updating from survey-editor to survey-creator, and we have hit a problem. With this function:
JavaScriptvar CustomTextEditorWidget = {
render: function(editor, htmlElement) {
//code for rendering custom property editor
},
validate: function(editor, newValue) {
if (!newValue) return null;
if (newValue.length < 2) return "Length is less than 2";
if (newValue.length > 5) return "Length is more than 5";
return null;
}
};
We use editor.object
to create some logic for our render function. One of the things we want to know is whether editor.object
is inside a panel. Previously, !object.parent || object.parent.isPage
would return true if a question is not inside a panel, and false if it was inside a panel. Since the update, this does not work, because even when a question is inside a panel, object.parent
is undefined.