1/* Add buttons related to Markdown to the toolbar */ 2 3if (typeof window.toolbar !== 'undefined') { 4 toolbar[toolbar.length] = { 5 type: "insert", 6 title: "Markdown Doctype", 7 icon: "../../plugins/commonmark/images/markdown.png", 8 key: "", 9 insert: "<!DOCTYPE markdown>", 10 block: "true" 11 }; 12 toolbar[toolbar.length] = { 13 type: "picker", 14 title: "Markdown syntax", 15 icon: "../../plugins/commonmark/images/markdown_white.png", 16 class: "pk_hl", 17 key: "", 18 list: [ 19 { 20 type: "format", 21 title: toolbar[0].title, 22 icon: "bold.png", 23 key: "", 24 open: "**", 25 close: "**", 26 block: "false" 27 }, 28 { 29 type: "format", 30 title: toolbar[1].title, 31 icon: "italic.png", 32 key: "", 33 open: "*", 34 close: "*", 35 block: "false" 36 }, 37 { 38 type: "format", 39 title: toolbar[3].title, 40 icon: "mono.png", 41 key: "", 42 open: "`", 43 close: "`", 44 block: "false" 45 }, 46 { 47 type: "format", 48 title: toolbar[4].title, 49 icon: "bold.png", 50 key: "", 51 open: "~~", 52 close: "~~", 53 block: "false" 54 } 55 ] 56 }; 57} 58