tiptap/examples/main.js

181 lines
5.2 KiB
JavaScript
Raw Normal View History

2018-08-21 05:02:21 +08:00
import Vue from 'vue'
2018-08-22 19:30:53 +08:00
import VueRouter from 'vue-router'
2018-08-21 05:02:21 +08:00
import svgSpriteLoader from 'helpers/svg-sprite-loader'
2018-08-22 20:10:44 +08:00
import App from 'Components/App'
2018-08-21 05:02:21 +08:00
const __svg__ = { path: './assets/images/icons/*.svg', name: 'assets/images/[hash].sprite.svg' }
svgSpriteLoader(__svg__.filename)
Vue.config.productionTip = false
2018-08-22 19:30:53 +08:00
Vue.use(VueRouter)
const routes = [
{
path: '/',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/Basic'),
2018-08-23 00:23:31 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Basic',
2018-08-23 00:23:31 +08:00
},
2018-08-22 20:10:44 +08:00
},
{
2018-08-22 21:53:17 +08:00
path: '/menu-bubble',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/MenuBubble'),
2018-08-23 00:23:31 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/MenuBubble',
2018-08-23 00:23:31 +08:00
},
2018-08-22 20:10:44 +08:00
},
2018-10-14 05:41:54 +08:00
{
path: '/floating-menu',
component: () => import('Components/Routes/FloatingMenu'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/FloatingMenu',
2018-10-14 05:41:54 +08:00
},
},
2018-08-22 20:10:44 +08:00
{
path: '/links',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/Links'),
2018-08-23 00:23:31 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Links',
2018-08-23 00:23:31 +08:00
},
2018-08-22 19:30:53 +08:00
},
2018-09-01 02:42:13 +08:00
{
path: '/images',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/Images'),
2018-09-01 02:42:13 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Images',
2018-09-01 02:42:13 +08:00
},
},
2018-08-22 22:05:44 +08:00
{
path: '/hiding-menu-bar',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/HidingMenuBar'),
2018-08-23 00:23:31 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/HidingMenuBar',
2018-08-23 00:23:31 +08:00
},
2018-08-22 22:05:44 +08:00
},
2018-12-07 01:07:08 +08:00
{
2018-12-08 16:30:36 +08:00
path: '/tables',
component: () => import('Components/Routes/Tables'),
2018-12-07 01:07:08 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Tables',
2018-12-07 01:07:08 +08:00
},
},
2018-08-22 22:20:56 +08:00
{
path: '/todo-list',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/TodoList'),
2018-08-23 00:23:31 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/TodoList',
2018-08-23 00:23:31 +08:00
},
2018-08-22 22:20:56 +08:00
},
2019-05-23 23:41:11 +08:00
{
2019-06-05 03:56:01 +08:00
path: '/search-and-replace',
component: () => import('Components/Routes/SearchAndReplace'),
2019-05-23 23:41:11 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/SearchAndReplace',
2019-05-23 23:41:11 +08:00
},
},
2018-09-29 15:40:36 +08:00
{
path: '/suggestions',
component: () => import('Components/Routes/Suggestions'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Suggestions',
2018-09-29 15:40:36 +08:00
},
},
2018-08-22 22:34:04 +08:00
{
path: '/markdown-shortcuts',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/MarkdownShortcuts'),
2018-08-23 00:23:31 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/MarkdownShortcuts',
2018-08-23 00:23:31 +08:00
},
2018-08-22 22:34:04 +08:00
},
{
path: '/code-highlighting',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/CodeHighlighting'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/CodeHighlighting',
},
},
2018-11-09 05:54:37 +08:00
{
path: '/history',
component: () => import('Components/Routes/History'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/History',
2018-11-09 05:54:37 +08:00
},
},
2018-08-23 01:28:57 +08:00
{
path: '/read-only',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/ReadOnly'),
2018-08-23 01:28:57 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/ReadOnly',
2018-08-23 01:28:57 +08:00
},
},
2018-08-23 05:12:19 +08:00
{
path: '/embeds',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/Embeds'),
2018-08-23 05:12:19 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Embeds',
2018-08-23 05:12:19 +08:00
},
},
2018-09-07 04:58:54 +08:00
{
path: '/placeholder',
2018-09-07 05:21:21 +08:00
component: () => import('Components/Routes/Placeholder'),
2018-09-07 04:58:54 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Placeholder',
2018-09-07 04:58:54 +08:00
},
},
2019-07-31 16:10:40 +08:00
{
path: '/focus',
component: () => import('Components/Routes/Focus'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Focus',
2019-07-31 16:10:40 +08:00
},
},
2018-08-28 15:31:08 +08:00
{
2019-05-04 06:28:29 +08:00
path: '/collaboration',
component: () => import('Components/Routes/Collaboration'),
2018-08-28 15:31:08 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Collaboration',
2018-08-28 15:31:08 +08:00
},
},
2019-06-22 04:00:42 +08:00
{
path: '/title',
component: () => import('Components/Routes/Title'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Title',
2019-06-22 04:00:42 +08:00
},
},
2019-07-24 16:29:51 +08:00
{
path: '/trailing-paragraph',
component: () => import('Components/Routes/TrailingParagraph'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/TrailingParagraph',
2019-07-24 16:29:51 +08:00
},
},
2019-10-03 21:56:41 +08:00
{
path: '/drag-handle',
component: () => import('Components/Routes/DragHandle'),
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/DragHandle',
2019-10-03 21:56:41 +08:00
},
},
2019-02-03 21:06:17 +08:00
{
2019-05-04 06:28:29 +08:00
path: '/export',
component: () => import('Components/Routes/Export'),
2019-02-03 21:06:17 +08:00
meta: {
2020-08-13 17:23:17 +08:00
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/main/examples/Components/Routes/Export',
2019-02-03 21:06:17 +08:00
},
},
2018-08-22 19:30:53 +08:00
]
const router = new VueRouter({
routes,
2018-09-03 20:00:18 +08:00
mode: 'history',
2018-08-22 20:10:44 +08:00
linkActiveClass: 'is-active',
linkExactActiveClass: 'is-exact-active',
2018-08-22 19:30:53 +08:00
})
2018-08-21 05:02:21 +08:00
new Vue({
2018-08-22 19:30:53 +08:00
router,
2018-08-21 05:02:21 +08:00
render: h => h(App),
}).$mount('#app')