Ind.ie is now Small Technology Foundation.
Commit edd7cec6 authored by Aral Balkan's avatar Aral Balkan

Add markdown shortcuts to the editor

I had fork Patrick Lee’s excellent Markdown Shortcuts module as it wasn’t playing ball with Vue/Nuxt and giving me “Quill is undefined” errors. More info in the readme at https://github.com/aral/quill-markdown-shortcuts-for-vue-quill-editor
parent 4ff28727
......@@ -10876,10 +10876,8 @@
"fast-diff": "1.1.2"
}
},
"quill-markdown-shortcuts": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/quill-markdown-shortcuts/-/quill-markdown-shortcuts-0.0.6.tgz",
"integrity": "sha512-mBgb5fTvUqiZ9zHn9gKLHNQnj3E+BeHKqNte59QpaioAEFiN9DEW3SW1eXO8P+Zgf+4okMk2Z2oNR/OdD5BXqw=="
"quill-markdown-shortcuts-for-vue-quill-editor": {
"version": "github:aral/quill-markdown-shortcuts-for-vue-quill-editor#dddb6bf5abc17546f5d0597e03d095c83e090b94"
},
"radix-router": {
"version": "3.0.1",
......
......@@ -182,7 +182,7 @@ export default {
placeholder: 'What’s on your mind?',
theme: 'snow',
modules: {
// markdownShortcuts: {},
markdownShortcuts: {},
toolbar: [
[{ header: [1, 2, false] }],
['image', 'blockquote']
......
/* Client-side Quill Editor plugin */
import Vue from 'vue'
import Quill from 'quill'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
// import MarkdownShortcuts from 'quill-markdown-shortcuts'
// const Quill = VueQuillEditor.Quill
// Quill.register('modules/markdownShortcuts', MarkdownShortcuts)
import MarkdownShortcuts from 'quill-markdown-shortcuts-for-vue-quill-editor'
Quill.register('modules/markdownShortcuts', MarkdownShortcuts)
Vue.use(VueQuillEditor)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment