diff options
Diffstat (limited to 'src/components/EditorWrapper.provider.js')
-rw-r--r-- | src/components/EditorWrapper.provider.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/EditorWrapper.provider.js b/src/components/EditorWrapper.provider.js index c66cc9cb6..b791075c5 100644 --- a/src/components/EditorWrapper.provider.js +++ b/src/components/EditorWrapper.provider.js @@ -22,6 +22,7 @@ export const EDITOR = Symbol('tiptap:editor') export const FILE = Symbol('editor:file') +export const IMAGE_RESOLVER = Symbol('image:resolver') export const IS_MOBILE = Symbol('editor:is-mobile') export const IS_PUBLIC = Symbol('editor:is-public') export const IS_RICH_EDITOR = Symbol('editor:is-rich-editor') @@ -76,3 +77,17 @@ export const useFileMixin = { }, }, } + +export const useImageResolver = { + inject: { + $imageResolver: { + from: IMAGE_RESOLVER, + default: { + resolve(src) { + console.warn('No image resolver provided. Some image sources cannot be resolved.') + return [src] + }, + }, + }, + }, +} |