@tiptap/extension-emoji 3.6.7 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-emoji",
3
3
  "description": "emoji extension for tiptap",
4
- "version": "3.6.7",
4
+ "version": "3.7.0",
5
5
  "homepage": "https://tiptap.dev/api/nodes/emoji",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -36,9 +36,9 @@
36
36
  "dist"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@tiptap/core": "^3.6.7",
40
- "@tiptap/pm": "^3.6.7",
41
- "@tiptap/suggestion": "^3.6.7"
39
+ "@tiptap/core": "^3.7.0",
40
+ "@tiptap/suggestion": "^3.7.0",
41
+ "@tiptap/pm": "^3.7.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "emoji-regex": "^10.4.0",
@@ -49,9 +49,9 @@
49
49
  "emoji-datasource": "^7.0.2",
50
50
  "json5": "^2.2.3",
51
51
  "tsm": "^2.3.0",
52
- "@tiptap/core": "^3.6.7",
53
- "@tiptap/pm": "^3.6.7",
54
- "@tiptap/suggestion": "^3.6.7"
52
+ "@tiptap/core": "^3.7.0",
53
+ "@tiptap/pm": "^3.7.0",
54
+ "@tiptap/suggestion": "^3.7.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup",
package/src/emoji.ts CHANGED
@@ -235,6 +235,14 @@ export const Emoji = Node.create<EmojiOptions, EmojiStorage>({
235
235
  return emojiItem?.emoji || `:${node.attrs.name}:`
236
236
  },
237
237
 
238
+ renderMarkdown: node => {
239
+ if (!node.attrs?.name) {
240
+ return ''
241
+ }
242
+
243
+ return `:${node.attrs.name}:`
244
+ },
245
+
238
246
  addCommands() {
239
247
  return {
240
248
  setEmoji: