Ionaru / Ionaru/easy-markdown-editor

Add instructions on how to add multiple editors to a single page.

Open
#627 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.1k
Forks
363
PR merge metrics
No merged PRs in 30d

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.

Contributor guide

Open the contributing guide

Research direction

No documentation file or test is named in the issue. Locate the existing EasyMDE documentation entry point, then add the supplied multiple-editor example and explanation. Done means the documentation clearly explains how to initialize multiple editors on one page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.