Dynamic add fields in initEdit function
Dynamic add fields in initEdit function
yy113420113
Posts: 2Questions: 1Answers: 0
I want add some field dynamically after editor window shown, and I try following code.
editor.on( 'initEdit', function(e, node, data) {
this.add(
{label: 'test', name: 'test'},
'domain'
).set('test', 'just for test');
});
I got errors TypeError: s[f] is undefined
when submit the form.
I need help.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
Unfortunately, that looks like a bug in Editor. Thanks for letting me know about it. I'm afraid there is no simple workaround at the moment - although I will look for one.
Allan
Is there any other way to solve this problem?
No - as I say, I don't think there is a workaround for this. The issue is that the internal data structure isn't correctly handling this situation. I hope to get a chance to look into it in more detail today.
Allan
Sorry for the long delay with this one. I've just committed a fix for this problem and it will be available in Editor 1.6 which will drop next week.
Regards,
Allan