fix: 更新编辑器
This commit is contained in:
parent
633cbb7544
commit
11feae3439
2
typecho/write/css/joe.write.min.css
vendored
2
typecho/write/css/joe.write.min.css
vendored
File diff suppressed because one or more lines are too long
@ -121,7 +121,7 @@ body.fullscreen {
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
.cm-wrap {
|
||||
.cm-editor {
|
||||
flex-shrink: 0;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
2
typecho/write/dist/index.bundle.js
vendored
2
typecho/write/dist/index.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -2,20 +2,20 @@ import { undo, redo } from '@codemirror/history';
|
||||
export default class JoeAction {
|
||||
constructor() {
|
||||
$('body').append(`
|
||||
<div class="cm-modal">
|
||||
<div class="cm-modal__wrapper">
|
||||
<div class="cm-modal__wrapper-header">
|
||||
<div class="cm-modal__wrapper-header--text"></div>
|
||||
<div class="cm-modal__wrapper-header--close">×</div>
|
||||
</div>
|
||||
<div class="cm-modal__wrapper-bodyer"></div>
|
||||
<div class="cm-modal__wrapper-footer">
|
||||
<button class="cm-modal__wrapper-footer--cancle">取消</button>
|
||||
<button class="cm-modal__wrapper-footer--confirm">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
<div class="cm-modal">
|
||||
<div class="cm-modal__wrapper">
|
||||
<div class="cm-modal__wrapper-header">
|
||||
<div class="cm-modal__wrapper-header--text"></div>
|
||||
<div class="cm-modal__wrapper-header--close">×</div>
|
||||
</div>
|
||||
<div class="cm-modal__wrapper-bodyer"></div>
|
||||
<div class="cm-modal__wrapper-footer">
|
||||
<button class="cm-modal__wrapper-footer--cancle">取消</button>
|
||||
<button class="cm-modal__wrapper-footer--confirm">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
$('.cm-modal__wrapper-footer--cancle, .cm-modal__wrapper-header--close').on('click', () => $('.cm-modal').removeClass('active'));
|
||||
$('.cm-modal__wrapper-footer--confirm').on('click', () => {
|
||||
this.options.confirm();
|
||||
@ -27,8 +27,8 @@ export default class JoeAction {
|
||||
title: '提示',
|
||||
innerHtml: '内容',
|
||||
hasFooter: true,
|
||||
confirm: () => {},
|
||||
handler: () => {}
|
||||
confirm: () => { },
|
||||
handler: () => { }
|
||||
};
|
||||
this.options = Object.assign(_options, options);
|
||||
$('.cm-modal__wrapper-header--text').html(this.options.title);
|
||||
|
@ -3,19 +3,19 @@
|
||||
"serve": "rollup -c -w"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/closebrackets": "^0.18.0",
|
||||
"@codemirror/commands": "^0.18.3",
|
||||
"@codemirror/highlight": "^0.18.4",
|
||||
"@codemirror/history": "^0.18.1",
|
||||
"@codemirror/lang-markdown": "^0.18.4",
|
||||
"@codemirror/language-data": "^0.18.0",
|
||||
"@codemirror/matchbrackets": "^0.18.0",
|
||||
"@codemirror/state": "^0.18.7",
|
||||
"@codemirror/view": "^0.18.18"
|
||||
"@codemirror/closebrackets": "^0.19.0",
|
||||
"@codemirror/commands": "^0.19.2",
|
||||
"@codemirror/highlight": "^0.19.2",
|
||||
"@codemirror/history": "^0.19.0",
|
||||
"@codemirror/lang-markdown": "^0.19.1",
|
||||
"@codemirror/language-data": "^0.19.0",
|
||||
"@codemirror/matchbrackets": "^0.19.1",
|
||||
"@codemirror/state": "^0.19.1",
|
||||
"@codemirror/view": "^0.19.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"rollup": "^2.52.8",
|
||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||
"rollup": "^2.56.3",
|
||||
"rollup-plugin-terser": "^7.0.2"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user