mount-redraw.js:15 TypeError: Cannot set properties of null (setting 'value')
at e.<anonymous> (index.js:156:19)
at forEach.t.<computed> [as oncreate] (extend.ts:39:16)
at Function.a (render.js:30:16)
at render.js:971:48
at Function.a [as sync] (mount-redraw.js:14:10)
at e.show (ComposerState.js:88:14)
at IndexPage.tsx:288:9
at new Promise (<anonymous>)
at n.newDiscussionAction (IndexPage.tsx:285:12)
at forEach.t.<computed> [as newDiscussionAction] (extend.ts:37:41)
An error occurs when I do the following:
I clicked the "create discussion" button, the editor popup appeared,
Then I clicked on the Rich Text icon and closed the "editor"...
I went back to the "create discussion" button and "editor" appeared. get the error as shown on the screen.
In case there is no error as shown:
When I "create a discussion" the presentation appears... I turn it off and then back on again but it doesn't cause an error
PIC1: check Button Icon Rich Text : On Off I clicked the "create discussion" button >> ERROR
PIC2: no check Button Icon Rich Text : On Off I clicked the "create discussion" button >> NO ERROR << WORKING
// Replace BBCode delimiters with alias delimiters if `aliases_as_primary` set to true.
extend(TextEditor.prototype, 'oncreate', function (original, vnode) {
const $textarea = vnode.dom.querySelector('textarea');
const composerClass = app.composer.body.componentClass;
if (getFlarumComposers().indexOf(composerClass) === -1) {
// If this isn't a native Flarum composer (i.e. it created by an extension)
// then we will replace alias delimiters with BBCode ones on the fly.
// Because it seems there is no way to manipulate their `onsubmit` call
// as we did for native Flarum composers above.
$textarea.addEventListener('input', function () {
$textarea.value = replaceDelimiters($textarea.value);
});
} else {
// This is a native Flarum composer and its BBCode delimiters should be
// replaced with alias delimiters if `aliases_as_primary` set to true.
// This will take effect on the `EditPostComposer` only at this point
// because other native composers are empty by default.
if (!app.forum.attribute('mathren.aliases_as_primary')) return;
$textarea.value = replaceDelimiters(this.value, true);
}
});
Error: $textarea.value = replaceDelimiters(this.value, true);
Disable extension/the-turk-mathren >> OK WORKING
FIX:
Enable : extension/the-turk-mathren
in extension/the-turk-mathren: Disable : Use alias delimiters as primary delimiters if possible <<< WORKING