File tree Expand file tree Collapse file tree 6 files changed +44
-45
lines changed
Expand file tree Collapse file tree 6 files changed +44
-45
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ export default {
4141 return
4242 }
4343
44- if (typeof insert === ' function' )
45- insert = insert ()
44+ if (typeof insert === ' function' ) { insert = insert () }
4645
4746 if (! Array .isArray (insert)) {
4847 insert = [insert, ' ' ]
Original file line number Diff line number Diff line change 11export default {
2- name : 'delete' ,
3- icon : 'fa-strikethrough' ,
4- title : '删除线' ,
5- action : {
6- insert : [ '~~' , '~~' ]
7- }
8- }
2+ name : 'delete' ,
3+ icon : 'fa-strikethrough' ,
4+ title : '删除线' ,
5+ action : {
6+ insert : [ '~~' , '~~' ]
7+ }
8+ }
Original file line number Diff line number Diff line change 1- export default function header ( level ) {
2- return {
3- name : 'h' + level ,
4- icon : 'icon-blold' ,
5- content : 'H' + level ,
6- title : level + '级标题' ,
7- action : {
8- insert : function ( ) {
9- let output = "" ;
10- for ( let i = 0 ; i < level ; i ++ ) {
11- output += "#"
12- }
13- return output + " "
14- }
1+ export default function header ( level ) {
2+ return {
3+ name : 'h' + level ,
4+ icon : 'icon-blold' ,
5+ content : 'H' + level ,
6+ title : level + '级标题' ,
7+ action : {
8+ insert : function ( ) {
9+ let output = ''
10+ for ( let i = 0 ; i < level ; i ++ ) {
11+ output += '#'
1512 }
13+ return output + ' '
14+ }
1615 }
17- }
16+ }
17+ }
Original file line number Diff line number Diff line change 11export default {
2- name : 'hr' ,
3- icon : 'fa-minus' ,
4- title : '分割线' ,
5- action : {
6- insert : " ------------"
7- }
8- }
2+ name : 'hr' ,
3+ icon : 'fa-minus' ,
4+ title : '分割线' ,
5+ action : {
6+ insert : ' ------------'
7+ }
8+ }
Original file line number Diff line number Diff line change 11export default {
2- name : 'ol' ,
3- icon : 'fa-list-ol' ,
4- title : '有序列表' ,
5- action : {
6- insert : " 1. "
7- }
8- }
2+ name : 'ol' ,
3+ icon : 'fa-list-ol' ,
4+ title : '有序列表' ,
5+ action : {
6+ insert : ' 1. '
7+ }
8+ }
Original file line number Diff line number Diff line change 11export default {
2- name : 'ul' ,
3- icon : 'fa-list-ul' ,
4- title : '无序列表' ,
5- action : {
6- insert : "- "
7- }
8- }
2+ name : 'ul' ,
3+ icon : 'fa-list-ul' ,
4+ title : '无序列表' ,
5+ action : {
6+ insert : '- '
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments