MDL-51179 Atto: Extend autosave fix to cover text changes
Added new functions to editor api - set/get_text so the original form text can be determined from an editor. When calling use_editor() you should first call set_text() with the text that will be inserted in the form element. There is also a new scheduled task for cleaning Atto autosave drafts.
This commit is contained in:
@@ -82,6 +82,7 @@ abstract class qbehaviour_renderer extends plugin_renderer_base {
|
||||
|
||||
$commenttext = format_text($commenttext, $commentformat, array('para' => false));
|
||||
|
||||
$editor->set_text($commenttext);
|
||||
$editor->use_editor($id, array('context' => $options->context));
|
||||
|
||||
$commenteditor = html_writer::tag('div', html_writer::tag('textarea', s($commenttext),
|
||||
|
||||
Reference in New Issue
Block a user