Feature request: Add settings() API method to editor

Feature request: Add settings() API method to editor

paulhickmanpaulhickman Posts: 21Questions: 1Answers: 0

Can you add a settings() method to the editor API to work as per the method on the data tables API.

I have a situation where I am re-using a data table with an editor with multiple data sources, so I need to change the ajax properties after creation of the editor. There is currently no public API to do this so I am editing myEditor.s.ajax directly, which works but uses an API that isn't public.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    The settings object isn't public in DataTables, and it isn't in Editor either. The only reason it is exposed in DataTables is to be able to create a new DataTables API instance from it.

    If there isn't a public API to manipulate the properties you want, then they shouldn't be manipulated through a private interface as they can, will and do change between versions.

    Having said that the s property is basically the settings object in Editor.

    Allan

  • paulhickmanpaulhickman Posts: 21Questions: 1Answers: 0

    Thinking about it, a better/safer solution for both data tables and the editor would be provide an API method to $.extend() the existing ajax settings with a new set of ajax settings.

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Agreed - an API to modify the Ajax configuration would be good. Added to the list :-)

    Allan

This discussion has been closed.