diff --git a/package.json b/package.json
index 6eef88b..1d50f66 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,9 @@
"keywords": [
"directus",
"directus-extension",
+ "directus-custom-bundle",
"directus-custom-interface",
+ "directus-custom-display",
"tiptap"
],
"homepage": "https://github.com/gbicou/directus-extension-tiptap",
@@ -14,10 +16,24 @@
"license": "MIT",
"repository": "github:gbicou/directus-extension-tiptap",
"directus:extension": {
- "type": "interface",
- "path": "dist/index.js",
- "source": "src/index.ts",
- "host": "^9.23.4"
+ "host": "^9.23.4",
+ "type": "bundle",
+ "path": {
+ "app": "dist/app.js",
+ "api": "dist/api.js"
+ },
+ "entries": [
+ {
+ "type": "interface",
+ "name": "directus-extension-tiptap-interface",
+ "source": "src/interface.ts"
+ },
+ {
+ "type": "display",
+ "name": "directus-extension-tiptap-display",
+ "source": "src/display.ts"
+ }
+ ]
},
"files": [
"dist"
diff --git a/src/display.ts b/src/display.ts
new file mode 100644
index 0000000..6b9fbb1
--- /dev/null
+++ b/src/display.ts
@@ -0,0 +1,12 @@
+import { defineDisplay } from "@directus/extensions-sdk";
+import TiptapDisplay from "./tiptap-display.vue";
+
+export default defineDisplay({
+ id: "tiptap",
+ name: "TipTap",
+ icon: "text_fields",
+ description: "Tip Tap content",
+ component: TiptapDisplay,
+ options: null,
+ types: ["json", "text"],
+});
diff --git a/src/index.ts b/src/interface.ts
similarity index 90%
rename from src/index.ts
rename to src/interface.ts
index 279f566..9b3e924 100644
--- a/src/index.ts
+++ b/src/interface.ts
@@ -10,4 +10,5 @@ export default defineInterface({
types: ["json", "text"],
group: "standard",
options: null,
+ recommendedDisplays: ["tiptap"],
});
diff --git a/src/tiptap-display.vue b/src/tiptap-display.vue
new file mode 100644
index 0000000..eb22372
--- /dev/null
+++ b/src/tiptap-display.vue
@@ -0,0 +1,26 @@
+
+ {{ text }}
+
+
+
diff --git a/src/tiptap-editor.vue b/src/tiptap-editor.vue
index 2f737be..a69e33e 100644
--- a/src/tiptap-editor.vue
+++ b/src/tiptap-editor.vue
@@ -219,28 +219,27 @@