|
|
@ -1158,7 +1158,40 @@ function initWikiForm() { |
|
|
|
spellChecker: false, |
|
|
|
spellChecker: false, |
|
|
|
toolbar: ["bold", "italic", "strikethrough", "|", |
|
|
|
toolbar: ["bold", "italic", "strikethrough", "|", |
|
|
|
"heading-1", "heading-2", "heading-3", "heading-bigger", "heading-smaller", "|", |
|
|
|
"heading-1", "heading-2", "heading-3", "heading-bigger", "heading-smaller", "|", |
|
|
|
"code", "quote", "|", |
|
|
|
{ |
|
|
|
|
|
|
|
name: "code-inline", |
|
|
|
|
|
|
|
action: function(e){ |
|
|
|
|
|
|
|
let cm = e.codemirror; |
|
|
|
|
|
|
|
let selection = cm.getSelection(); |
|
|
|
|
|
|
|
cm.replaceSelection("`" + selection + "`"); |
|
|
|
|
|
|
|
if (!selection) { |
|
|
|
|
|
|
|
let cursorPos = cm.getCursor(); |
|
|
|
|
|
|
|
cm.setCursor(cursorPos.line, cursorPos.ch - 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cm.focus(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
className: "fa fa-angle-right", |
|
|
|
|
|
|
|
title: "Add Inline Code", |
|
|
|
|
|
|
|
},"code", "quote", "|", { |
|
|
|
|
|
|
|
name: "checkbox-empty", |
|
|
|
|
|
|
|
action: function(e){ |
|
|
|
|
|
|
|
let cm = e.codemirror; |
|
|
|
|
|
|
|
cm.replaceSelection("\n- [ ] " + cm.getSelection()); |
|
|
|
|
|
|
|
cm.focus(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
className: "fa fa-square-o", |
|
|
|
|
|
|
|
title: "Add Checkbox (empty)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "checkbox-checked", |
|
|
|
|
|
|
|
action: function(e){ |
|
|
|
|
|
|
|
let cm = e.codemirror; |
|
|
|
|
|
|
|
cm.replaceSelection("\n- [x] " + cm.getSelection()); |
|
|
|
|
|
|
|
cm.focus(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
className: "fa fa-check-square-o", |
|
|
|
|
|
|
|
title: "Add Checkbox (checked)", |
|
|
|
|
|
|
|
}, "|", |
|
|
|
"unordered-list", "ordered-list", "|", |
|
|
|
"unordered-list", "ordered-list", "|", |
|
|
|
"link", "image", "table", "horizontal-rule", "|", |
|
|
|
"link", "image", "table", "horizontal-rule", "|", |
|
|
|
"clean-block", "preview", "fullscreen"] |
|
|
|
"clean-block", "preview", "fullscreen"] |
|
|
|