@notum-cz/strapi-plugin-tiptap-editor 1.0.1 → 1.0.3-rc.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.
Files changed (121) hide show
  1. package/README.md +427 -64
  2. package/dist/_chunks/{RichTextInput-BZQ2iVqa.mjs → RichTextInput-CfAn0vnH.mjs} +1654 -694
  3. package/dist/_chunks/RichTextInput-CfAn0vnH.mjs.map +1 -0
  4. package/dist/_chunks/RichTextInput-D6g0iPAj.js +2427 -0
  5. package/dist/_chunks/RichTextInput-D6g0iPAj.js.map +1 -0
  6. package/dist/_chunks/{RichTextInput-BlxoJMa2.js → RichTextInput-DR0fhCxp.js} +1707 -745
  7. package/dist/_chunks/RichTextInput-DR0fhCxp.js.map +1 -0
  8. package/dist/_chunks/RichTextInput-RYTRNj8k.mjs +2418 -0
  9. package/dist/_chunks/RichTextInput-RYTRNj8k.mjs.map +1 -0
  10. package/dist/_chunks/en-HTqMhvt6.mjs +59 -0
  11. package/dist/_chunks/en-HTqMhvt6.mjs.map +1 -0
  12. package/dist/_chunks/en-fytkVDTF.js +59 -0
  13. package/dist/_chunks/en-fytkVDTF.js.map +1 -0
  14. package/dist/_chunks/index-B2HLgk4i.js +191 -0
  15. package/dist/_chunks/index-B2HLgk4i.js.map +1 -0
  16. package/dist/_chunks/index-CPhLazds.js +191 -0
  17. package/dist/_chunks/index-CPhLazds.js.map +1 -0
  18. package/dist/_chunks/index-D9s0XUPz.mjs +192 -0
  19. package/dist/_chunks/index-D9s0XUPz.mjs.map +1 -0
  20. package/dist/_chunks/index-DxNQpLyb.mjs +192 -0
  21. package/dist/_chunks/index-DxNQpLyb.mjs.map +1 -0
  22. package/dist/admin/index.js +2 -69
  23. package/dist/admin/index.js.map +1 -1
  24. package/dist/admin/index.mjs +2 -69
  25. package/dist/admin/index.mjs.map +1 -1
  26. package/dist/admin/src/components/BaseTiptapInput.d.ts +1 -0
  27. package/dist/admin/src/components/ColorPickerPopover.d.ts +9 -0
  28. package/dist/admin/src/components/EditorErrorBoundary.d.ts +21 -0
  29. package/dist/admin/src/components/FeatureGuard.d.ts +15 -0
  30. package/dist/admin/src/components/ImageAltPopover.d.ts +3 -0
  31. package/dist/admin/src/components/MediaLibraryWrapper.d.ts +13 -0
  32. package/dist/admin/src/components/PresetSelect.d.ts +21 -0
  33. package/dist/admin/src/components/RichTextInput.d.ts +8 -1
  34. package/dist/admin/src/components/ToolbarButton.d.ts +1 -2
  35. package/dist/admin/src/extensions/Heading.d.ts +3 -1
  36. package/dist/admin/src/extensions/HighlightColor.d.ts +6 -0
  37. package/dist/admin/src/extensions/Image.d.ts +14 -0
  38. package/dist/admin/src/extensions/Link.d.ts +1 -1
  39. package/dist/admin/src/extensions/PasteStripper.d.ts +2 -0
  40. package/dist/admin/src/extensions/Script.d.ts +1 -1
  41. package/dist/admin/src/extensions/StarterKit.d.ts +1 -1
  42. package/dist/admin/src/extensions/Table.d.ts +1 -1
  43. package/dist/admin/src/extensions/TextAlign.d.ts +1 -1
  44. package/dist/admin/src/extensions/TextColor.d.ts +6 -0
  45. package/dist/admin/src/fields/richTextField.d.ts +39 -13
  46. package/dist/admin/src/hooks/usePresetConfig.d.ts +6 -0
  47. package/dist/admin/src/hooks/useThemeConfig.d.ts +2 -0
  48. package/dist/admin/src/index.d.ts +3 -1
  49. package/dist/admin/src/utils/buildExtensions.d.ts +3 -0
  50. package/dist/admin/src/utils/strapiApp.d.ts +18 -0
  51. package/dist/admin/src/utils/themeCache.d.ts +3 -0
  52. package/dist/admin/src/utils/tiptapUtils.d.ts +1 -7
  53. package/dist/server/index.js +251 -6
  54. package/dist/server/index.js.map +1 -1
  55. package/dist/server/index.mjs +250 -6
  56. package/dist/server/index.mjs.map +1 -1
  57. package/dist/server/src/config/index.d.ts +7 -4
  58. package/dist/server/src/controllers/index.d.ts +14 -1
  59. package/dist/server/src/controllers/preset.d.ts +9 -0
  60. package/dist/server/src/controllers/theme.d.ts +8 -0
  61. package/dist/server/src/index.d.ts +65 -5
  62. package/dist/server/src/routes/index.d.ts +26 -1
  63. package/dist/server/src/services/index.d.ts +14 -1
  64. package/dist/server/src/services/preset.d.ts +10 -0
  65. package/dist/server/src/services/theme.d.ts +8 -0
  66. package/dist/shared/types.d.ts +66 -0
  67. package/package.json +43 -21
  68. package/dist/_chunks/AccentCursive-CpAPpH9C.mjs +0 -3383
  69. package/dist/_chunks/AccentCursive-CpAPpH9C.mjs.map +0 -1
  70. package/dist/_chunks/AccentCursive-D6sTlhub.js +0 -3384
  71. package/dist/_chunks/AccentCursive-D6sTlhub.js.map +0 -1
  72. package/dist/_chunks/FormattedHeadingInput-DycgfIze.mjs +0 -101
  73. package/dist/_chunks/FormattedHeadingInput-DycgfIze.mjs.map +0 -1
  74. package/dist/_chunks/FormattedHeadingInput-FFjiRSEJ.js +0 -101
  75. package/dist/_chunks/FormattedHeadingInput-FFjiRSEJ.js.map +0 -1
  76. package/dist/_chunks/RichTextInput-BZQ2iVqa.mjs.map +0 -1
  77. package/dist/_chunks/RichTextInput-BbbQxPc-.js +0 -4414
  78. package/dist/_chunks/RichTextInput-BbbQxPc-.js.map +0 -1
  79. package/dist/_chunks/RichTextInput-BjLR2pi0.js +0 -4416
  80. package/dist/_chunks/RichTextInput-BjLR2pi0.js.map +0 -1
  81. package/dist/_chunks/RichTextInput-BlxoJMa2.js.map +0 -1
  82. package/dist/_chunks/RichTextInput-Bm3X8fR2.mjs +0 -4400
  83. package/dist/_chunks/RichTextInput-Bm3X8fR2.mjs.map +0 -1
  84. package/dist/_chunks/RichTextInput-Bms-gSvK.js +0 -4407
  85. package/dist/_chunks/RichTextInput-Bms-gSvK.js.map +0 -1
  86. package/dist/_chunks/RichTextInput-BtNjPJRN.mjs +0 -4400
  87. package/dist/_chunks/RichTextInput-BtNjPJRN.mjs.map +0 -1
  88. package/dist/_chunks/RichTextInput-Bw3tcXfp.js +0 -4407
  89. package/dist/_chunks/RichTextInput-Bw3tcXfp.js.map +0 -1
  90. package/dist/_chunks/RichTextInput-CsgNpoxq.mjs +0 -4409
  91. package/dist/_chunks/RichTextInput-CsgNpoxq.mjs.map +0 -1
  92. package/dist/_chunks/RichTextInput-CwTvEMda.js +0 -4407
  93. package/dist/_chunks/RichTextInput-CwTvEMda.js.map +0 -1
  94. package/dist/_chunks/RichTextInput-DG-36krM.js +0 -1181
  95. package/dist/_chunks/RichTextInput-DG-36krM.js.map +0 -1
  96. package/dist/_chunks/RichTextInput-DLac-zNQ.mjs +0 -4400
  97. package/dist/_chunks/RichTextInput-DLac-zNQ.mjs.map +0 -1
  98. package/dist/_chunks/RichTextInput-DSXttrvi.js +0 -4407
  99. package/dist/_chunks/RichTextInput-DSXttrvi.js.map +0 -1
  100. package/dist/_chunks/RichTextInput-DeJ6Exto.mjs +0 -4400
  101. package/dist/_chunks/RichTextInput-DeJ6Exto.mjs.map +0 -1
  102. package/dist/_chunks/RichTextInput-DgT88AkO.mjs +0 -1175
  103. package/dist/_chunks/RichTextInput-DgT88AkO.mjs.map +0 -1
  104. package/dist/_chunks/RichTextInput-DlMaDJQF.mjs +0 -4400
  105. package/dist/_chunks/RichTextInput-DlMaDJQF.mjs.map +0 -1
  106. package/dist/_chunks/RichTextInput-DtaYdjCs.mjs +0 -4400
  107. package/dist/_chunks/RichTextInput-DtaYdjCs.mjs.map +0 -1
  108. package/dist/_chunks/RichTextInput-YTKXo5oq.js +0 -4407
  109. package/dist/_chunks/RichTextInput-YTKXo5oq.js.map +0 -1
  110. package/dist/_chunks/RichTextInput-tmg-oMJk.mjs +0 -4407
  111. package/dist/_chunks/RichTextInput-tmg-oMJk.mjs.map +0 -1
  112. package/dist/_chunks/RichTextInput-umhMsI5o.js +0 -4407
  113. package/dist/_chunks/RichTextInput-umhMsI5o.js.map +0 -1
  114. package/dist/_chunks/en-B4KWt_jN.js +0 -5
  115. package/dist/_chunks/en-B4KWt_jN.js.map +0 -1
  116. package/dist/_chunks/en-Byx4XI2L.mjs +0 -5
  117. package/dist/_chunks/en-Byx4XI2L.mjs.map +0 -1
  118. package/dist/admin/src/components/FormattedHeadingInput.d.ts +0 -4
  119. package/dist/admin/src/extensions/AccentCursive.d.ts +0 -18
  120. package/dist/admin/src/fields/formattedHeadingField.d.ts +0 -20
  121. package/dist/admin/src/pluginId.d.ts +0 -1
package/README.md CHANGED
@@ -1,35 +1,64 @@
1
1
  <div align="center">
2
+ <picture>
3
+ <img src="https://raw.githubusercontent.com/notum-cz/strapi-plugin-tiptap-editor/main/assets/notum-tiptap-icon.png" height="250" alt="Notum Tiptap Plugin Logo"/>
4
+ </picture>
2
5
 
3
- <picture >
4
- <!-- User has no color preference: -->
5
- <img src="assets/notum-logo.svg" height="60" alt="Description of what the image shows"/>
6
- </picture>
7
6
  <h1>TipTap Editor Plugin for Strapi V5</h1>
8
-
7
+ <p>by<br />
8
+ <a href="https://notum.tech/?utm_source=strapi-plugin&utm_medium=github&utm_campaign=tiptap-readme">
9
+ <img style="margin-top: 0.5rem" src="https://raw.githubusercontent.com/notum-cz/strapi-plugin-tiptap-editor/main/assets/notum-logo.svg" alt="Notum Technologies" />
10
+ </a>
11
+ </p>
12
+
9
13
  <p>
10
- Enhance WYSIWYG experience in Strapi V5 with TipTap.
14
+ A drop-in TipTap WYSIWYG editor for Strapi v5. <br />
15
+ Rich text, tables, images, and more, configured in minutes.
11
16
  </p>
12
-
13
-
14
- <!-- Badges -->
15
- <p>
16
- <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/graphs/contributors">
17
- <img src="https://img.shields.io/github/contributors/notum-cz/strapi-plugin-tiptap-editor" alt="contributors" />
18
- </a>
19
- <a href="">
20
- <img src="https://img.shields.io/github/last-commit/notum-cz/strapi-plugin-tiptap-editor" alt="last update" />
21
- </a>
22
- <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/issues/">
23
- <img src="https://img.shields.io/github/issues/notum-cz/strapi-plugin-tiptap-editor" alt="open issues" />
24
- </a>
25
- <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/blob/main/LICENSE">
26
- <img src="https://img.shields.io/github/license/notum-cz/strapi-plugin-tiptap-editor" alt="license" />
27
- </a>
28
- </p>
29
-
30
- <h4>
31
- <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/issues/">Report Bug or Request Feature</a>
32
-
17
+
18
+ <!-- Badges -->
19
+ <p>
20
+ <a
21
+ href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/graphs/contributors"
22
+ >
23
+ <img
24
+ src="https://img.shields.io/github/contributors/notum-cz/strapi-plugin-tiptap-editor"
25
+ alt="contributors"
26
+ />
27
+ </a>
28
+ <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/commits">
29
+ <img
30
+ src="https://img.shields.io/github/last-commit/notum-cz/strapi-plugin-tiptap-editor"
31
+ alt="last update"
32
+ />
33
+ </a>
34
+ <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/issues/">
35
+ <img
36
+ src="https://img.shields.io/github/issues/notum-cz/strapi-plugin-tiptap-editor"
37
+ alt="open issues"
38
+ />
39
+ </a>
40
+ <a
41
+ href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/blob/main/LICENSE"
42
+ >
43
+ <img
44
+ src="https://img.shields.io/github/license/notum-cz/strapi-plugin-tiptap-editor"
45
+ alt="license"
46
+ />
47
+ </a>
48
+ <a
49
+ href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/stargazers"
50
+ >
51
+ <img
52
+ src="https://img.shields.io/github/stars/notum-cz/strapi-plugin-tiptap-editor"
53
+ alt="stars"
54
+ />
55
+ </a>
56
+ </p>
57
+
58
+ <h4>
59
+ <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/issues/"
60
+ >Report Bug or Request Feature</a
61
+ >
33
62
  </h4>
34
63
  </div>
35
64
 
@@ -48,36 +77,55 @@ Enhance WYSIWYG experience in Strapi V5 with TipTap.
48
77
  - [Installation](#installation)
49
78
  - [1. Install the plugin via npm or yarn](#1-install-the-plugin-via-npm-or-yarn)
50
79
  - [2. Rebuild Strapi and test the plugin](#2-rebuild-strapi-and-test-the-plugin)
51
- - [Roadmap](#roadmap)
52
- - [Community](#community)
53
- - [This plugin is maintained by Notum Technologies, a Czech-based Strapi Enterprise Partner.](#this-plugin-is-maintained-by-notum-technologies-a-czech-based-strapi-enterprise-partner)
80
+ - [Configuration](#configuration)
81
+ - [Defining Presets](#defining-presets)
82
+ - [Assigning a Preset to a Field](#assigning-a-preset-to-a-field)
83
+ - [Multiple Presets](#multiple-presets)
84
+ - [Available Extensions](#available-extensions)
85
+ - [Inline Formatting](#inline-formatting)
86
+ - [Block Elements](#block-elements)
87
+ - [Headings](#headings)
88
+ - [Links](#links)
89
+ - [Tables](#tables)
90
+ - [Text Alignment](#text-alignment)
91
+ - [Images](#images)
92
+ - [Configuration Reference](#configuration-reference)
93
+ - [Feature Values](#feature-values)
94
+ - [Full Preset Example](#full-preset-example)
95
+ - [Config Validation](#config-validation)
96
+ - [🤝 Community](#-community)
97
+ - [Maintained by Notum Technologies](#maintained-by-notum-technologies)
54
98
  - [Current maintainer](#current-maintainer)
55
99
  - [Contributors](#contributors)
56
- - [How can Notum help you with your STRAPI project?](#how-can-notum-help-you-with-your-strapi-project)
57
100
  - [Contributing](#contributing)
58
101
 
59
102
  <!-- About the Project -->
60
103
 
61
104
  ## About the Project
62
105
 
63
- > [!IMPORTANT]
64
- > This is an **initial release** of the plugin and it doesn't support all features, nor does it support **extensive configuration**. The first thing we will be adding is the ability to configure which features of TipTap you want to use in your Strapi instance.
65
- >
66
- > If you have any suggestions or feature requests, please don't hesitate to open an issue or submit a pull request.
67
-
68
106
  <!-- Features -->
69
107
 
70
108
  ### Features
71
109
 
72
- - Rich text editing with TipTap, a modern and extensible WYSIWYG editor built on ProseMirror.
73
- - Seamless integration with Strapi's content management system.
110
+ - **Rich text editing** powered by [TipTap](https://tiptap.dev/) - a modern, extensible WYSIWYG editor built on ProseMirror
111
+ - **Headings** (H1–H6), **bold**, **italic**, **underline**, **strikethrough**
112
+ - **Ordered & unordered lists**, task lists
113
+ - **Links**, **tables**
114
+ - **Images** from Strapi Media Library with alt text editing and alignment
115
+ - **Code blocks** with syntax highlighting
116
+ - **Blockquotes**, **horizontal rules**
117
+ - Full **keyboard shortcut** support
118
+ - Seamless integration with Strapi's content management system
74
119
 
75
120
  <!-- Screenshots -->
76
121
 
77
122
  ### Screenshots
78
123
 
79
124
  <div align="center">
80
- <img src="./assets/tiptap.png" alt="screenshot" />
125
+ <picture>
126
+ <source srcset="https://raw.githubusercontent.com/notum-cz/strapi-plugin-tiptap-editor/main/assets/tiptap-plugin-dark.png" media="(prefers-color-scheme: dark)">
127
+ <img src="https://raw.githubusercontent.com/notum-cz/strapi-plugin-tiptap-editor/main/assets/tiptap-plugin-light.png" alt="Strapi Plugin TipTap Editor Interface" />
128
+ </picture>
81
129
  </div>
82
130
 
83
131
  <!-- Supported Versions -->
@@ -86,6 +134,10 @@ Enhance WYSIWYG experience in Strapi V5 with TipTap.
86
134
 
87
135
  This plugin is compatible with Strapi `v5.x.x` and has been tested on Strapi `v5.34.0`. We expect it should also work on older version of Strapi V5.
88
136
 
137
+ | Plugin version | Strapi Version | Full Support |
138
+ | -------------- | -------------- | ------------ |
139
+ | 1.0.0 | 5.34.0 | ✅ |
140
+
89
141
  <!-- Getting Started -->
90
142
 
91
143
  ## Getting Started
@@ -112,23 +164,346 @@ yarn add @notum-cz/strapi-plugin-tiptap-editor
112
164
  yarn start
113
165
  ```
114
166
 
115
- <!-- Roadmap -->
167
+ ## Configuration
116
168
 
117
- ## Roadmap
169
+ The plugin uses a **preset** system. A preset is a named configuration that defines which editor tools are available. You define presets in your Strapi plugin config file, then assign them to individual fields via the Content-Type Builder.
118
170
 
119
- We're open to feedback and feature requests. Our current roadmap includes:
171
+ ### Defining Presets
120
172
 
121
- - [ ] Q2 2026: Add support for configuring which TipTap features to use in Strapi.
173
+ Create or update the plugin configuration file at `config/plugins.ts` (or `config/plugins.js`):
122
174
 
123
- <!-- Contributing -->
175
+ ```ts
176
+ // config/plugins.ts
124
177
 
125
- ## Community
178
+ export default () => ({
179
+ 'tiptap-editor': {
180
+ config: {
181
+ presets: {
182
+ // Preset name -> feature configuration
183
+ minimal: {
184
+ bold: true,
185
+ italic: true,
186
+ link: true,
187
+ },
188
+ },
189
+ },
190
+ },
191
+ });
192
+ ```
193
+
194
+ Only features explicitly set to `true` (or an options object) will appear in the toolbar. Any feature not listed, or set to `false`, will be hidden.
195
+
196
+ ### Assigning a Preset to a Field
197
+
198
+ 1. In the Strapi admin, open the **Content-Type Builder**.
199
+ 2. Add or edit a field and choose the **Rich Text (Tiptap)** custom field type.
200
+ 3. In the **Advanced Settings** tab, select a preset from the **Editor Preset** dropdown.
201
+ 4. Save the content type.
202
+
203
+ The editor for that field will now show only the tools defined in the selected preset.
204
+
205
+ ### Multiple Presets
206
+
207
+ You can define as many presets as you need. Different fields (even within the same content type) can use different presets:
208
+
209
+ ```ts
210
+ // config/plugins.ts
211
+
212
+ export default () => ({
213
+ 'tiptap-editor': {
214
+ config: {
215
+ presets: {
216
+ // A minimal preset for short-form content like titles or captions
217
+ minimal: {
218
+ bold: true,
219
+ italic: true,
220
+ underline: true,
221
+ },
222
+
223
+ // A standard preset for blog posts and articles
224
+ standard: {
225
+ bold: true,
226
+ italic: true,
227
+ underline: true,
228
+ strike: true,
229
+ heading: true,
230
+ bulletList: true,
231
+ orderedList: true,
232
+ blockquote: true,
233
+ link: true,
234
+ },
235
+
236
+ // A full preset with every feature enabled
237
+ full: {
238
+ bold: true,
239
+ italic: true,
240
+ underline: true,
241
+ strike: true,
242
+ code: true,
243
+ codeBlock: true,
244
+ heading: true,
245
+ blockquote: true,
246
+ bulletList: true,
247
+ orderedList: true,
248
+ link: true,
249
+ table: true,
250
+ textAlign: true,
251
+ superscript: true,
252
+ subscript: true,
253
+ mediaLibrary: true,
254
+ },
255
+ },
256
+ },
257
+ },
258
+ });
259
+ ```
260
+
261
+ ## Available Extensions
262
+
263
+ ### Inline Formatting
264
+
265
+ | Key | Description | Toolbar | Keyboard Shortcut |
266
+ | ------------- | ------------------ | ------------ | ---------------------- |
267
+ | `bold` | Bold text | **B** button | `Ctrl/Cmd + B` |
268
+ | `italic` | Italic text | _I_ button | `Ctrl/Cmd + I` |
269
+ | `underline` | Underlined text | **U** button | `Ctrl/Cmd + U` |
270
+ | `strike` | Strikethrough text | ~~S~~ button | `Ctrl/Cmd + Shift + S` |
271
+ | `code` | Inline code | `<>` button | `Ctrl/Cmd + E` |
272
+ | `superscript` | Superscript text | x^2 button | `Ctrl/Cmd + .` |
273
+ | `subscript` | Subscript text | x_2 button | `Ctrl/Cmd + ,` |
274
+
275
+ **Usage:** Set to `true` to enable with defaults.
276
+
277
+ ```ts
278
+ {
279
+ bold: true,
280
+ italic: true,
281
+ underline: true,
282
+ strike: true,
283
+ code: true,
284
+ superscript: true,
285
+ subscript: true,
286
+ }
287
+ ```
126
288
 
127
- ### This plugin is maintained by [Notum Technologies](https://notum.tech), a Czech-based Strapi Enterprise Partner.
289
+ ### Block Elements
128
290
 
129
- We're a software agency specializing in custom solutions based on Strapi. We're passionate about sharing our expertise with the open-source community.
291
+ | Key | Description | Toolbar |
292
+ | ------------- | ------------------ | -------------------------------- |
293
+ | `blockquote` | Block quotes | Quote button |
294
+ | `codeBlock` | Fenced code blocks | (via keyboard or markdown input) |
295
+ | `bulletList` | Unordered lists | Bullet list button |
296
+ | `orderedList` | Numbered lists | Numbered list button |
130
297
 
131
- This plugin is overseen by Ondřej Jánošík and it has been originally developed by [Ivo Pisařovic](https://github.com/ivopisarovic) and [Dominik Juriga](https://github.com/dominik-juriga).
298
+ **Usage:** Set to `true` to enable.
299
+
300
+ ```ts
301
+ {
302
+ blockquote: true,
303
+ codeBlock: true,
304
+ bulletList: true,
305
+ orderedList: true,
306
+ }
307
+ ```
308
+
309
+ ### Headings
310
+
311
+ | Key | Description | Toolbar |
312
+ | --------- | ---------------------- | --------------------------------- |
313
+ | `heading` | Heading levels (h1-h6) | Style dropdown + SEO tag dropdown |
314
+
315
+ The heading extension includes an SEO tag selector that lets content editors set the semantic HTML tag independently from the visual heading level. This allows for proper document outline without being constrained by visual styles.
316
+
317
+ **Simple usage** — enables all heading levels (h1-h6):
318
+
319
+ ```ts
320
+ {
321
+ heading: true,
322
+ }
323
+ ```
324
+
325
+ **Custom levels** — restrict which heading levels are available:
326
+
327
+ ```ts
328
+ {
329
+ // Only allow h1, h2, and h3 in the style dropdown
330
+ heading: {
331
+ levels: [1, 2, 3],
332
+ },
333
+ }
334
+ ```
335
+
336
+ The `levels` array accepts values from `1` to `6`. The SEO tag dropdown always shows all six levels (h1-h6) regardless of this setting, since the semantic tag is independent of the visual heading level.
337
+
338
+ ### Links
339
+
340
+ | Key | Description | Toolbar |
341
+ | ------ | ----------- | ------------------------- |
342
+ | `link` | Hyperlinks | Link button + link dialog |
343
+
344
+ Links open a dialog where editors can enter a URL. By default, links do not open on click in the editor (to allow editing).
345
+
346
+ **Simple usage:**
347
+
348
+ ```ts
349
+ {
350
+ link: true,
351
+ }
352
+ ```
353
+
354
+ **With options:**
355
+
356
+ ```ts
357
+ {
358
+ link: {
359
+ openOnClick: true, // Open links on click in the editor (default: false)
360
+ HTMLAttributes: {
361
+ rel: 'noopener noreferrer',
362
+ target: '_blank',
363
+ },
364
+ },
365
+ }
366
+ ```
367
+
368
+ ### Tables
369
+
370
+ | Key | Description | Toolbar |
371
+ | ------- | ------------------------------ | ---------------------------------- |
372
+ | `table` | Insertable and editable tables | Table button + column/row controls |
373
+
374
+ Enables table insertion with controls for adding/removing columns and rows. Tables are resizable by default.
375
+
376
+ ```ts
377
+ {
378
+ table: true,
379
+ }
380
+ ```
381
+
382
+ ### Text Alignment
383
+
384
+ | Key | Description | Toolbar |
385
+ | ----------- | ----------------------- | ------------------------------------ |
386
+ | `textAlign` | Text alignment controls | Left, Center, Right, Justify buttons |
387
+
388
+ Enables all four alignment buttons (left, center, right, justify).
389
+
390
+ ```ts
391
+ {
392
+ textAlign: true,
393
+ }
394
+ ```
395
+
396
+ ### Images
397
+
398
+ | Key | Description | Toolbar |
399
+ | -------------- | -------------------------------- | ------------------------------------------- |
400
+ | `mediaLibrary` | Images from Strapi Media Library | Image button + alt text popover + alignment |
401
+
402
+ Enables image insertion from the Strapi Media Library. When enabled, the toolbar shows an image button that opens the Media Library picker. After selecting an image:
403
+
404
+ - The image appears in the editor at its natural size (constrained to editor width)
405
+ - Alt text is prefilled from the asset's `alternativeText` metadata
406
+ - Clicking a selected image opens a popover to edit alt text or delete the image
407
+ - Three alignment buttons (left, center, right) allow repositioning the image
408
+
409
+ The image stores both the URL (`src`) and the Strapi asset ID (`data-asset-id`) in the Tiptap JSON output.
410
+
411
+ **Content safety:** If you remove `mediaLibrary` from a preset, existing images in content are preserved and rendered read-only — they are never silently deleted.
412
+
413
+ ```ts
414
+ {
415
+ mediaLibrary: true,
416
+ }
417
+ ```
418
+
419
+ ## Configuration Reference
420
+
421
+ ### Feature Values
422
+
423
+ Each feature key in a preset accepts one of these values:
424
+
425
+ | Value | Meaning |
426
+ | --------------- | ---------------------------------------------------------- |
427
+ | `true` | Feature enabled with default options |
428
+ | `false` | Feature explicitly disabled |
429
+ | _(key omitted)_ | Feature disabled (absent keys are treated as disabled) |
430
+ | `{ ... }` | Feature enabled with custom options (merged with defaults) |
431
+
432
+ ### Full Preset Example
433
+
434
+ Here is a single preset with every available feature enabled and annotated:
435
+
436
+ ```ts
437
+ // config/plugins.ts
438
+
439
+ export default () => ({
440
+ 'tiptap-editor': {
441
+ config: {
442
+ presets: {
443
+ everything: {
444
+ // Inline formatting
445
+ bold: true,
446
+ italic: true,
447
+ underline: true,
448
+ strike: true,
449
+ code: true,
450
+ superscript: true,
451
+ subscript: true,
452
+
453
+ // Block elements
454
+ blockquote: true,
455
+ codeBlock: true,
456
+ bulletList: true,
457
+ orderedList: true,
458
+
459
+ // Headings — all levels (same as heading: true)
460
+ heading: {
461
+ levels: [1, 2, 3, 4, 5, 6],
462
+ },
463
+
464
+ // Links — custom HTML attributes
465
+ link: {
466
+ HTMLAttributes: {
467
+ rel: 'noopener noreferrer',
468
+ },
469
+ },
470
+
471
+ // Tables
472
+ table: true,
473
+
474
+ // Text alignment (left, center, right, justify)
475
+ textAlign: true,
476
+
477
+ // Images from Strapi Media Library
478
+ mediaLibrary: true,
479
+ },
480
+ },
481
+ },
482
+ },
483
+ });
484
+ ```
485
+
486
+ ### Config Validation
487
+
488
+ The plugin validates your configuration at startup. If a preset contains an invalid feature key, Strapi will throw an error with a message listing the invalid keys and all allowed keys. This prevents typos from silently disabling features.
489
+
490
+ ```ts
491
+ // This will throw an error at startup:
492
+ {
493
+ presets: {
494
+ blog: {
495
+ bold: true,
496
+ boldd: true, // Typo! Not a valid feature key
497
+ },
498
+ },
499
+ }
500
+ ```
501
+
502
+ ## 🤝 Community
503
+
504
+ ### Maintained by [Notum Technologies](https://notum.tech/?utm_source=strapi-plugin&utm_medium=github&utm_campaign=tiptap-readme)
505
+
506
+ Built and maintained by [Notum Technologies](https://notum.tech/?utm_source=strapi-plugin&utm_medium=github&utm_campaign=tiptap-readme), a Czech-based Strapi Enterprise Partner with a passion for open-source tooling.
132
507
 
133
508
  #### Current maintainer
134
509
 
@@ -136,25 +511,13 @@ This plugin is overseen by Ondřej Jánošík and it has been originally develop
136
511
 
137
512
  #### Contributors
138
513
 
139
- This plugin has been brought to you thanks to the following contributors:
140
-
141
514
  <a href="https://github.com/notum-cz/strapi-plugin-tiptap-editor/graphs/contributors">
142
- <img src="https://contrib.rocks/image?repo=notum-cz/strapi-plugin-tiptap-editor" />
515
+ <img src="https://contrib.rocks/image?repo=notum-cz/strapi-plugin-tiptap-editor" alt="Contributors" />
143
516
  </a>
144
517
 
145
- ### [How can Notum help you with your STRAPI project?](https://www.notum.tech/notum-and-strapi)
146
-
147
- ✔️ We offer valuable assistance in developing custom STRAPI, web, and mobile apps to fulfill your requirements and goals.. <br>
148
- ✔️ With a track record of 100+ projects, our open communication and exceptional project management skills provide us with the necessary tools to get your project across the finish line.<br>
149
-
150
- To initiate a discussion about your Strapi project, feel free to reach out to us via email at sales@notum.cz. We're here to assist you!
151
-
152
518
  ### Contributing
153
519
 
154
- Contributions are always welcome! Please follow these steps to contribute:
520
+ Contributions of all kinds are welcome: code, documentation, bug reports, and feature ideas.
521
+ <br> <br> Browse the [open issues](https://github.com/notum-cz/strapi-plugin-tiptap-editor/issues) to find something to work on, or open a new one to start a discussion. Pull requests are always appreciated!
155
522
 
156
- 1. Fork the Project
157
- 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
158
- 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
159
- 4. Push to the Branch (`git push origin feature/AmazingFeature`)
160
- 5. Open a Pull Request
523
+ If you'd like to directly contribute, check our [Contributions document](https://github.com/notum-cz/strapi-plugin-tiptap-editor?tab=contributing-ov-file).