File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ export default (editor, opts = {}) => {
42
42
const title = options . title || modalTitle ;
43
43
const content = this . getContent ( ) ;
44
44
const code = target . get ( keyCustomCode ) || '' ;
45
- editor . Modal . open ( { title, content } ) ;
45
+ editor . Modal
46
+ . open ( { title, content } )
47
+ . getModel ( )
48
+ . once ( 'change:open' , ( ) => editor . stopCommand ( this . id ) ) ;
46
49
this . getCodeViewer ( ) . setContent ( code ) ;
47
50
} ,
48
51
@@ -61,7 +64,7 @@ export default (editor, opts = {}) => {
61
64
* @return {HTMLElement }
62
65
*/
63
66
getContent ( ) {
64
- const { editor, options , target } = this ;
67
+ const { editor } = this ;
65
68
const content = document . createElement ( 'div' ) ;
66
69
const codeViewer = this . getCodeViewer ( ) ;
67
70
const pfx = editor . getConfig ( 'stylePrefix' ) ;
You can’t perform that action at this time.
0 commit comments