Is it possible to change the ajaxUrl for an existing editor
Is it possible to change the ajaxUrl for an existing editor
paulhickman
Posts: 21Questions: 1Answers: 0
Is there an official API method to dynamically change the ajaxUrl setting of an existing editor object?
From the object inspector in chrome, It looks like I could write:
[code]
myEditor.s.ajaxUrl.create = 'newurl'
[/code]
and it will work, but I suspect that is not a method that would be supported for future version compatibility.
From the object inspector in chrome, It looks like I could write:
[code]
myEditor.s.ajaxUrl.create = 'newurl'
[/code]
and it will work, but I suspect that is not a method that would be supported for future version compatibility.
This discussion has been closed.
Replies
What is the use case? If this is likely to be a common then perhaps this should be added. The other option is for the `ajax` option to allow function assignment as well as strings / objects as it does at the moment, so the function would be run when Editor needs the URL, allowing it to be computed externally.
Allan
However, the dialog is not removed from the DOM when it is closed so the 2nd time I open it, I'm modiyfing any existing table and editor.
Like DataTables, generally speaking, Editor settings should not be changed, as that change wouldn't be reflected without somehow telling Editor that something has changed.
Generally, I would recommend simply creating a new Editor instance for each form with a different Ajax url, but I can see that it would be useful to be able to modify the value on-the-fly.
Regards,
Allan