mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
522 B
24 lines
522 B
|
|
let vueImage = new Vue({
|
|
el: '#modal-editor-image',
|
|
data: {
|
|
modeSelected: 'text'
|
|
},
|
|
methods: {
|
|
cancel: (ev) => {
|
|
mdeModalOpenState = false;
|
|
$('#modal-editor-image').slideUp();
|
|
},
|
|
insertImage: (ev) => {
|
|
|
|
if(mde.codemirror.doc.somethingSelected()) {
|
|
mde.codemirror.execCommand('singleSelection');
|
|
}
|
|
let codeBlockText = '\n```' + vueCodeBlock.modeSelected + '\n' + codeEditor.getValue() + '\n```\n';
|
|
|
|
mde.codemirror.doc.replaceSelection(codeBlockText);
|
|
vueCodeBlock.cancel();
|
|
|
|
}
|
|
}
|
|
}); |