We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a7fdd6 commit c540f9fCopy full SHA for c540f9f
script.js
@@ -82,7 +82,7 @@
82
* @param {string} id The newly uploaded file ID
83
*/
84
function insertSyntax(id) {
85
- if (proseMirrorIsActive) {
+ if (typeof window.proseMirrorIsActive !== 'undefined' && window.proseMirrorIsActive === true) {
86
const pm = window.Prosemirror.view;
87
const imageNode = pm.state.schema.nodes.image.create({id: id});
88
pm.dispatch(pm.state.tr.replaceSelectionWith(imageNode));
0 commit comments