diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/index.html b/index.html index 3999a2e86..be6aea332 100644 --- a/index.html +++ b/index.html @@ -9,17 +9,25 @@ </head> <body> <div id="app"></div> + <script> + OC = { webroot: '/OC_WEBROOT' } + </script> <script type="module"> - import { RichTextReader } from './src/package.js' + import { RichTextReader, ImageResolver, IMAGE_RESOLVER } from './src/package.js' import Vue from 'vue' + import content from './src/tests/fixtures/basic.md?raw' const app = new Vue({ data() { return { - content: '**Hello There**', + content } }, - provide: { - currentDirectory: '/' + provide() { + const val = {} + Object.defineProperties(val, { + [IMAGE_RESOLVER]: { get: () => this.$imageResolver }, + }) + return val }, render: (h) => h('div', [ h('textarea', { @@ -38,6 +46,14 @@ props: { content: app.content } }), ]), + created() { + this.$imageResolver = new ImageResolver({ + currentDirectory: '/dir/', + shareToken: 'SHARE_TOKEN', + user: { uid: 'USER_UID' }, + fileId: '4173', + }) + }, }) app.$mount('#app') </script> |