refactor: adjust integration points
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* useFileEditor — resolves which registered editor can handle a given MIME type.
|
* useFileEditor — resolves which registered editor can handle a given MIME type.
|
||||||
*
|
*
|
||||||
* Other modules register editors at the `documents_file_editor` integration
|
* Other modules register editors at the `documents_editor` integration
|
||||||
* point by including an entry in their `integrations.ts`:
|
* point by including an entry in their `integrations.ts`:
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* documents_file_editor: [{
|
* documents_editor: [{
|
||||||
* id: 'my_editor',
|
* id: 'my_editor',
|
||||||
* meta: { mimeTypes: ['text/plain'] },
|
* meta: { mimeTypes: ['text/plain'] },
|
||||||
* component: () => import('./components/MyEditor.vue'),
|
* component: () => import('./components/MyEditor.vue'),
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
import { useIntegrationStore } from '@KTXC'
|
import { useIntegrationStore } from '@KTXC'
|
||||||
import type { EntityObject } from '@DocumentsManager/models/entity'
|
import type { EntityObject } from '@DocumentsManager/models/entity'
|
||||||
|
|
||||||
const INTEGRATION_POINT = 'documents_file_editor'
|
const INTEGRATION_POINT = 'documents_editor'
|
||||||
|
|
||||||
function mimeMatchesPattern(mime: string, pattern: string): boolean {
|
function mimeMatchesPattern(mime: string, pattern: string): boolean {
|
||||||
if (pattern.endsWith('/*')) {
|
if (pattern.endsWith('/*')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user