UNPKG
v-md-editor
Version:
latest (1.0.6)
1.0.6
A markdown editor built on Vue
v-md-editor
/
src
/
command
/
codeInline.js
12 lines
(10 loc)
•
282 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
{ codeInline
as
name }
from
'@/utils/constants/command.js'
;
export
default
function
(
editor
) { editor.
insert
(
(
selected
) =>
{
const
content = selected?
selected
:
'代码'
;
return
{
text
:
' ```'
+content+
'``` '
,
selected
: content, }; }); }