MDL-80072 editor_tiny: Editor options should not be passed to format_text

This commit is contained in:
Andrew Nicols 2023-12-07 13:40:37 +08:00
parent 3e6437e67c
commit 4349a9164e
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

View File

@ -59,7 +59,11 @@ class plugininfo extends plugin implements plugin_with_buttons, plugin_with_menu
$texexample = '$$\pi$$';
// Format a string with the active filter set.
// If it is modified - we assume that some sort of text filter is working in this context.
$result = format_text($texexample, true, $options);
$formatoptions = [
'context' => $context,
];
$result = format_text($texexample, true, $formatoptions);
$texfilteractive = ($texexample !== $result);
if (isset($options['context'])) {