diff --git a/locallib.php b/locallib.php index 8eb0d842dc93f29727f663275dc3575f5a4973cd..aba372e3163094636f96bf73b0b5592862a53ff5 100644 --- a/locallib.php +++ b/locallib.php @@ -90,7 +90,7 @@ function pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page = $capabilities->useprintcomments = has_capability('mod/pdfannotator:printcomments', $context); // 3. Comment editor setting. $editorsettings = new stdClass(); - $editorsettings->active_editor = explode(',', get_config('core', 'texteditors'))[0]; + $editorsettings->active_editor = get_class(editors_get_preferred_editor(FORMAT_HTML)); $params = [$cm, $documentobject, $context->id, $USER->id, $capabilities, $toolbarsettings, $page, $annoid, $commid, $editorsettings]; $PAGE->requires->js_init_call('adjustPdfannotatorNavbar', null, true); diff --git a/shared/index.js b/shared/index.js index a7848bf4fbf8ded9b5e32a820fbe426f489ab7ad..6ea604ce456a7f56a52da060c225f83f68f3038f 100644 --- a/shared/index.js +++ b/shared/index.js @@ -6928,7 +6928,7 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to .then(function(html, js) { let commentListForm = document.getElementById('comment-list-form'); templates.prependNodeContents(commentListForm, html, js); - if (_editorSettings.active_editor === 'textarea') { + if (_editorSettings.active_editor === 'textarea_texteditor') { document.getElementById('id_pdfannotator_content').setAttribute('style', 'display:unset !important'); } }) diff --git a/version.php b/version.php index 0e0985c96322b18cbc2145e70bc4376e90126d64..10c067d68094e02e7fa05aae5f7ecb98487b1b4d 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_pdfannotator'; -$plugin->version = 2023052300; +$plugin->version = 2023112900; $plugin->release = 'PDF Annotator v1.5 release 5'; $plugin->requires = 2021051700; $plugin->maturity = MATURITY_STABLE;