Update mdarea to v1.0.1 (#20)

* Update mdarea to v1.0.1
This commit is contained in:
Alexander Skvortsov 2020-08-16 20:43:45 -04:00 committed by GitHub
parent 6d06fcf731
commit c0aa73f01a
3 changed files with 426 additions and 823 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,9 @@
"name": "@flarum/markdown",
"dependencies": {
"flarum-webpack-config": "0.1.0-beta.10",
"mdarea": "^0.0.10",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
"mdarea": "^1.0.1",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
},
"scripts": {
"dev": "webpack --mode development --watch",

View File

@ -28,9 +28,12 @@ app.initializers.add('flarum-markdown', function(app) {
extend(TextEditor.prototype, 'configTextarea', function(value, element, isInitialized, context) {
if (isInitialized) return;
const editor = new MarkdownArea(element);
editor.disableInline();
editor.ignoreTab();
const editor = new MarkdownArea(element, {
keyMap: {
indent: ['Ctrl+m'],
outdent: ['Ctrl+M']
}
});
context.onunload = function() {
editor.destroy();