mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
parent
6d06fcf731
commit
c0aa73f01a
1234
extensions/markdown/js/package-lock.json
generated
1234
extensions/markdown/js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -3,9 +3,9 @@
|
||||||
"name": "@flarum/markdown",
|
"name": "@flarum/markdown",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"flarum-webpack-config": "0.1.0-beta.10",
|
"flarum-webpack-config": "0.1.0-beta.10",
|
||||||
"mdarea": "^0.0.10",
|
"mdarea": "^1.0.1",
|
||||||
"webpack": "^4.43.0",
|
"webpack": "^4.44.1",
|
||||||
"webpack-cli": "^3.3.11"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
|
|
|
@ -28,9 +28,12 @@ app.initializers.add('flarum-markdown', function(app) {
|
||||||
extend(TextEditor.prototype, 'configTextarea', function(value, element, isInitialized, context) {
|
extend(TextEditor.prototype, 'configTextarea', function(value, element, isInitialized, context) {
|
||||||
if (isInitialized) return;
|
if (isInitialized) return;
|
||||||
|
|
||||||
const editor = new MarkdownArea(element);
|
const editor = new MarkdownArea(element, {
|
||||||
editor.disableInline();
|
keyMap: {
|
||||||
editor.ignoreTab();
|
indent: ['Ctrl+m'],
|
||||||
|
outdent: ['Ctrl+M']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
context.onunload = function() {
|
context.onunload = function() {
|
||||||
editor.destroy();
|
editor.destroy();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user