Anonymous AMD/RequireJS support
Closed this issue · 6 comments
Doesn't appear to work nicely with requireJS.
Normally it could be shimmed, but you have throw new Error("Medium Editor is not loaded on the page.");
which appears to kill any chance of using it!
It was added to MediumEditor here:
yabwe/medium-editor@afbf2b6
Makes sense. I never did this in the past. Contributions are welcome!
Please add dis T_T
When you require("medium-editor-markdown")
it supposed that it will resolve with a function, which is the extension itself.
Can we reiterate what is the problem here?
Apologies for reviving this, but could you provide an example of how the require
works in the README? I'm struggling to get this to work via webpack.
I deserve to be hated for this, but this works:
const MediumEditor = require('medium-editor');
window.MediumEditor = MediumEditor;
const MeMarkdown = require('medium-editor-markdown/dist/me-markdown.standalone').MeMarkdown;
Is this still an issue with the latest versions?