textarea using codemirror
codemirror fails to load as it cant find the path to the keymap
The problem appears to lie in the js as this code
if (this.options.keyMapUrl) {
await import(`${this.host}/${this.options.keyMapUrl}`);
}
results in
"keyMapUrl":"media\/vendor\/codemirror\/keymap\/vim.min.js"}
instead of
"keyMapUrl":"MYFOLDER\/media\/vendor\/codemirror\/keymap\/vim.min.js"}
@dgrammatiko looks like it might be the same error we have had before but the js makes no sense to me so sorry I cant fix it
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-03-08 16:30:31 |
Closed_By | ⇒ | Quy |
So:
joomla-cms/plugins/editors/codemirror/layouts/editors/codemirror/element.php
Lines 37 to 38 in e462044
$basePath
and$modePath
in the layout are passed fromjoomla-cms/plugins/editors/codemirror/codemirror.php
Lines 261 to 262 in e462044
joomla-cms/plugins/editors/codemirror/codemirror.php
Lines 51 to 60 in e462044
So it's obvious that those paths need the
Uri::root()
at the start