Having multiple editor fields on the same settings form


I had problems when I was trying to setup a settings form for my custom modules which contains multiple editor fields.

I solved it by appending the name of the field to the editor id when fields are generated within


So in case field type is editor, I replaced the line :

$editor_id = 'flrich' . time();

By :

$editor_id = 'flrich' . time() . '_' . $name;

In this way we ensure that all editors will have differnt ids.

I did the same for code editor field.



Thanks, Nicolas! I’ll add that in the next update.