2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-06-28 05:31:06 -06:00

Add new option to documentation and typings

This commit is contained in:
Jeroen Akkerman 2020-06-03 12:55:27 +02:00
parent 4a6119daaf
commit 8fa73cf079
3 changed files with 5 additions and 0 deletions

View File

@ -186,6 +186,7 @@ easyMDE.value('New input for **EasyMDE**');
- **spellChecker**: If set to `false`, disable the spell checker. Defaults to `true`.
- **inputStyle**: `textarea` or `contenteditable`. Defaults to `textarea` for desktop and `contenteditable` for mobile. `contenteditable` option is necessary to enable nativeSpellcheck.
- **nativeSpellcheck**: If set to `false`, disable native spell checker. Defaults to `true`.
- **sideBySideFullscreen**: If set to `false`, allows side-by-side editing without going into fullscreen. Defaults to `true`.
- **status**: If set to `false`, hide the status bar. Defaults to the array of built-in status bar items.
- Optionally, you can set an array of status bar items to include, and in what order. You can even define your own custom status bar items.
- **styleSelectedText**: If set to `false`, remove the `CodeMirror-selectedtext` class from selected lines. Defaults to `true`.
@ -288,6 +289,7 @@ var editor = new EasyMDE({
},
}], // Another optional usage, with a custom status bar item that counts keystrokes
styleSelectedText: false,
sideBySideFullscreen: false,
syncSideBySidePreviewScroll: false,
tabSize: 4,
toolbar: false,

View File

@ -164,6 +164,7 @@ const editorImagesCustom = new EasyMDE({
});
new EasyMDE({
sideBySideFullscreen: true,
autosave: {
enabled: true,
delay: 2000,
@ -180,6 +181,7 @@ new EasyMDE({
});
new EasyMDE({
sideBySideFullscreen: false,
toolbar: [
'bold',
'italic',

1
types/easymde.d.ts vendored
View File

@ -183,6 +183,7 @@ declare namespace EasyMDE {
spellChecker?: boolean;
inputStyle?: 'textarea' | 'contenteditable';
nativeSpellcheck?: boolean;
sideBySideFullscreen?: boolean;
status?: boolean | ReadonlyArray<string | StatusBarItem>;
styleSelectedText?: boolean;
tabSize?: number;