mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 09:54:28 -06:00
add two options inputStyle and nativeSpellcheck
This commit is contained in:
parent
c12761a42a
commit
4245da6eae
@ -180,6 +180,8 @@ easyMDE.value('New input for **EasyMDE**');
|
||||
- **shortcuts**: Keyboard shortcuts associated with this instance. Defaults to the [array of shortcuts](#keyboard-shortcuts).
|
||||
- **showIcons**: An array of icon names to show. Can be used to show specific icons hidden by default without completely customizing the toolbar.
|
||||
- **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 necessarry for enable nativeSpellcheck.
|
||||
- **nativeSpellcheck**: If set to `false`, disable native spell checker. 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`.
|
||||
|
@ -1858,6 +1858,8 @@ EasyMDE.prototype.render = function (el) {
|
||||
placeholder: options.placeholder || el.getAttribute('placeholder') || '',
|
||||
styleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : !isMobile(),
|
||||
configureMouse: configureMouse,
|
||||
inputStyle: (options.inputStyle != undefined) ? options.inputStyle : (!isMobile()) ? 'textarea' : 'contenteditable',
|
||||
spellcheck: (options.nativeSpellcheck != undefined) ? options.nativeSpellcheck : true,
|
||||
});
|
||||
|
||||
this.codemirror.getScrollerElement().style.minHeight = options.minHeight;
|
||||
|
Loading…
x
Reference in New Issue
Block a user