This repository is a fork of SimpleMDE, made by Sparksuite. Go to the dedicated section for more information.
A drop-in JavaScript text area replacement for writing beautiful and understandable Markdown. EasyMDE allows users who may be less experienced with Markdown to use familiar toolbar buttons and shortcuts.
In addition, the syntax is rendered while editing to clearly show the expected result. Headings are larger, emphasized words are italicized, links are underlined, etc.
EasyMDE also features both built-in auto saving and spell checking. The editor is entirely customizable, from theming to toolbar buttons and javascript hooks.
Via npm:
npm install easymde
Via the UNPKG CDN:
<link rel="stylesheet" href="https://unpkg.com/easymde/dist/easymde.min.css">
<script src="https://unpkg.com/easymde/dist/easymde.min.js"></script>
Or jsDelivr:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.css">
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
After installing and/or importing the module, you can load EasyMDE onto the first textarea element on the web page:
<textarea></textarea>
<script>
const easyMDE = new EasyMDE();
</script>
Alternatively you can select a specific textarea, via JavaScript:
<textarea id="my-text-area"></textarea>
<script>
const easyMDE = new EasyMDE({element: document.getElementById('my-text-area')});
</script>
Use easyMDE.value() to get the content of the editor:
<script>
easyMDE.value();
</script>
Use easyMDE.value(val) to set the content of the editor:
<script>
easyMDE.value('New input for **EasyMDE**');
</script>
true, force downloads Font Awesome (used for icons). If set to false, prevents downloading. Defaults to undefined, which will intelligently check whether Font Awesome has already been included, then download accordingly.true, focuses the editor automatically. Defaults to false.true, saves the text automatically. Defaults to false.10000 (10 seconds).autosave.delay or 10000 (10 seconds).locale: en-US, format: hour:minute.{ delay: 300 }, it will check every 300 ms if the editor is visible and if positive, call CodeMirror's refresh().** or __. Defaults to **.``` or ~~~. Defaults to ```.* or _. Defaults to *.*, - or +. Defaults to *.textarea element to use. Defaults to the first textarea element on the page.true, force text changes made in EasyMDE to be immediately stored in original text area. Defaults to false.false, indent using spaces instead of tabs. Defaults to true.false by default, preview for images will appear only for images on separate lines. as argument and returns a string that serves as the src attribute of the <img> tag in the preview. Enables dynamic previewing of images in the frontend without having to upload them to a server, allows copy-pasting of images to the editor with preview.["[", "](http://)"].true, enables line numbers in the editor.false, disable line wrapping. Defaults to true."500px". Defaults to "300px".minHeight option will be ignored. Should be a string containing a valid CSS value like "500px". Defaults to undefined.true when the editor is currently going into full screen mode, or false.true, will render headers without a space after the #. Defaults to false.false, will not process GFM strikethrough syntax. Defaults to true.true, let underscores be a delimiter for separating words. Defaults to false.false, will replace CSS classes returned by the default Markdown mode. Otherwise the classes returned by the custom mode will be combined with the classes returned by the default mode. Defaults to true."editor-preview".true, a JS alert window appears asking for the link or image URL. Defaults to false.URL of the image:.URL for the link:.true, enables the image upload functionality, which can be triggered by drag and drop, copy-paste and through the browse-file window (opened when the user click on the upload-image icon). Defaults to false.1024 * 1024 * 2 (2 MB).image/png, image/jpeg.imageMaxSize, imageAccept, imageUploadEndpoint and imageCSRFToken ineffective.onSuccess and onError callback functions as parameters. onSuccess(imageUrl: string) and onError(errorMessage: string){"data": {"filePath": "<filePath>"}} where filePath is the path of the image (absolute if imagePathAbsolute is set to true, relative if otherwise);{"error": "<errorCode>"}, where errorCode can be noFileGiven (HTTP 400 Bad Request), typeNotAllowed (HTTP 415 Unsupported Media Type), fileTooLarge (HTTP 413 Payload Too Large) or importError (see errorMessages below). If errorCode is not one of the errorMessages, it is alerted unchanged to the user. This allows for server-side error messages.
No default value.true, will treat imageUrl from imageUploadFunction and filePath returned from imageUploadEndpoint as an absolute rather than relative path, i.e. not prepend window.location.origin to it.imageCSRFToken has value, defaults to csrfmiddlewaretoken.true, passing CSRF token via header. Defaults to false, which pass CSRF through request body.#image_name#, #image_size# and #image_max_size# will replaced by their respective values, that can be used for customization or internationalization:uploadImage is set to true. Defaults to Attach files by drag and dropping or pasting from clipboard..Drop image to upload it..Uploading images #images_names#.Uploading #file_name#: #progress#%.Uploaded #image_name#.B, KB, MB (example: 218 KB). You can use B,KB,MB instead if you prefer without whitespaces (218KB).errorCallback option, where #image_name#, #image_size# and #image_max_size# will replaced by their respective values, that can be used for customization or internationalization:You must select a file..imageAccept list, or the server returned this error code. Defaults to This image type is not allowed..$ claude mcp add easy-markdown-editor \
-- python -m otcore.mcp_server <graph>