diff --git a/components/baseEditor.vue b/components/baseEditor.vue new file mode 100644 index 0000000..0b0824f --- /dev/null +++ b/components/baseEditor.vue @@ -0,0 +1,36 @@ + + \ No newline at end of file diff --git a/lib/client/editorConfig.ts b/lib/client/editorConfig.ts new file mode 100644 index 0000000..0edefcb --- /dev/null +++ b/lib/client/editorConfig.ts @@ -0,0 +1,136 @@ +export const fancy = { + branding: false, + selector: 'textarea#txt', + menubar: false, + elementpath: false, + formats: { + bold: { + inline: 'b' + }, + italic: { + inline: 'i' + }, + underline: { + inline: 'u' + } + }, + schema: 'html5', + custom_colors: true, + style_formats: [ + // { title: 'Image formats' }, + { + title: 'Blocks', + items: [ + { title: 'p', block: 'p' }, + { title: 'div', block: 'div' }, + { title: 'pre', block: 'pre' } + ] + }, + { + title: "Image", + items: [ + { title: 'Image Left', selector: 'img', styles: { 'float': 'left', 'margin': '0 10px 0 10px' } }, + { title: 'Image Right', selector: 'img', styles: { 'float': 'right', 'margin': '0 0 10px 10px' } }, + { title: 'Rounded corners', styles: { 'border-radius': '0.7em'} } + ] + }, + { title: 'Code/Monospace', selector: "p,div,h1,h2,h3,h4,h5,h6", classes: [ 'font-mono' ] }, + ], + toolbar_groups: { + alignment: { + icon: 'align-left', + tooltip: "Alignment", + items: "alignleft aligncenter alignright | alignjustify" + }, + heading: { + icon: 'format', + tooltip: 'Header', + items: 'h1 h2 h3 h4 h5 h6' + } + }, + toolbar: "undo redo | paste | bold italic underline | hr image link | forecolor styles | heading alignment | code", + contextmenu: 'bold italic underline | hr | link | image | paste', + external_plugins: { + "mentions": "/plugins/mentions/plugin.min.js" + }, + plugins: + `advlist autolink lists link image charmap preview anchor searchreplace visualblocks advcode fullscreen insertdatetime media table help wordcount save mentions`.split(" ") +} +export const comment = { + branding: false, + height: 200, + menubar: false, + elementpath: false, + formats: { + bold: { + inline: 'b' + }, + italic: { + inline: 'i' + }, + underline: { + inline: 'u' + } + }, + external_plugins: { + "mentions": "/plugins/mentions/plugin.min.js" + }, + schema: 'html5', + plugins: + `advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table code help save mentions`.split(" "), + toolbar: 'bold italic underline | link', + contextmenu: 'bold italic underline | paste | link' +} + +export const story = { + branding: false, + selector: 'textarea#txt', + height: 500, + menubar: false, + elementpath: false, + formats: { + bold: { + inline: 'b' + }, + italic: { + inline: 'i' + }, + underline: { + inline: 'u' + } + }, + content_css: ["/test.css", "/quickfix.css"], + schema: 'html5', + plugins: + `advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table advcode help wordcount save`.split(" "), + toolbar: 'undo redo | paste |' + + 'bold italic underline | hr | alignleft aligncenter ' + + 'alignright alignjustify | ' + + '| code', + contextmenu: 'bold italic underline | hr | paste | link' +} +export const bare = { + branding: false, + height: 200, + menubar: false, + elementpath: false, + formats: { + bold: { + inline: 'b' + }, + italic: { + inline: 'i' + }, + underline: { + inline: 'u' + } + }, + schema: 'html5', + external_plugins: { + "mentions": "/plugins/mentions/plugin.min.js" + }, + plugins: + `advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table advcode help save mentions`.split(" "), + toolbar: 'bold italic underline | hr link', + contextmenu: 'bold italic underline | paste | hr link' +} \ No newline at end of file