-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Description
Please add instructions on how to add multiple editors to one page. Use code:
document.addEventListener('DOMContentLoaded', function() {
const easyMDE1 = new EasyMDE({
element: document.getElementById('editor1')
});
const easyMDE2 = new EasyMDE({
element: document.getElementById('editor2')
});
const easyMDE3 = new EasyMDE({
element: document.getElementById('editor3')
});
});
Explanation:
document.addEventListener('DOMContentLoaded', function() { ... }); ensures that the JavaScript code runs only after the entire HTML document has been loaded and parsed.
new EasyMDE({ element: ... }); creates a new EasyMDE instance. The element option specifies which textarea element to transform into an editor.
You can pass an object with various configuration options to the EasyMDE constructor to customize each editor's appearance and behavior (e.g., toolbar, spellChecker, autosave). Refer to the EasyMDE documentation for a complete list of options.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels