Is there a way to add a rich text editor to a popup (dialogue) that uses ajax?
I already have a popup with a form in it, the form can be saved correctly in ajax. I would now like to replace a regular textarea with a rich text editor (like atto). As I don't have access to a mform in this popup I haven't found a solution yet.
I have been able to get the html of a MoodleQuickForm_editor form element via a webservice but it only displays a regular textarea. The javascript probably isn't called for the popup, to initialise the RTE. I tried to add some direct calls to Y.M.editor_atto.Editor.init in the javascript of the mustache template for my popup but I only got errors because Y.M.editor_atto does not exist.
So is there a way to add a rich text editor in a popup? And once I have the editor, would it be possible to handle file uploads? (the form is saved via ajax)