vue-markdown-editor icon indicating copy to clipboard operation
vue-markdown-editor copied to clipboard

code auto new line

Open hezohngkai opened this issue 2 years ago • 0 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @kangc/[email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@kangc/v-md-editor/src/command/code.js b/node_modules/@kangc/v-md-editor/src/command/code.js
index 21cb6d3..099c89b 100644
--- a/node_modules/@kangc/v-md-editor/src/command/code.js
+++ b/node_modules/@kangc/v-md-editor/src/command/code.js
@@ -2,7 +2,7 @@ export { code as name } from '@/utils/constants/command.js';
 
 export default function (editor) {
   editor.insert((selected) => {
-    const prefix = '``` language';
+    const prefix = '``` language11';
     const suffix = '```';
     let text = `${prefix}\n${suffix}`;
 
@@ -12,7 +12,7 @@ export default function (editor) {
 
     return {
       text,
-      selected: 'language',
+      selected: 'language11',
     };
   });
 }

This issue body was partially generated by patch-package.

hezohngkai avatar Jul 21 '22 05:07 hezohngkai