Skip to content

Commit d47a684

Browse files
committed
Installed Tiptap's StarterKit package
https://tiptap.dev/docs/editor/extensions/functionality/starterkit This is to steamline the number of direct dependencies.
1 parent abf2fea commit d47a684

File tree

14 files changed

+123
-289
lines changed

14 files changed

+123
-289
lines changed

package-lock.json

Lines changed: 111 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -195,36 +195,20 @@
195195
},
196196
"dependencies": {
197197
"@tiptap/core": "^2.7.4",
198-
"@tiptap/extension-blockquote": "^2.7.4",
199-
"@tiptap/extension-bold": "^2.7.4",
200-
"@tiptap/extension-bullet-list": "^2.7.4",
201-
"@tiptap/extension-code": "^2.7.4",
202-
"@tiptap/extension-code-block": "^2.7.4",
203-
"@tiptap/extension-document": "^2.7.4",
204-
"@tiptap/extension-dropcursor": "^2.7.4",
205-
"@tiptap/extension-gapcursor": "^2.7.4",
206-
"@tiptap/extension-hard-break": "^2.7.4",
207-
"@tiptap/extension-heading": "^2.7.4",
208-
"@tiptap/extension-history": "^2.7.4",
209-
"@tiptap/extension-horizontal-rule": "^2.7.4",
210198
"@tiptap/extension-image": "^2.7.4",
211-
"@tiptap/extension-italic": "^2.7.4",
212199
"@tiptap/extension-link": "^2.7.4",
213-
"@tiptap/extension-list-item": "^2.7.4",
214-
"@tiptap/extension-ordered-list": "^2.7.4",
215-
"@tiptap/extension-paragraph": "^2.7.4",
216200
"@tiptap/extension-placeholder": "^2.7.4",
217-
"@tiptap/extension-strike": "^2.7.4",
218201
"@tiptap/extension-subscript": "^2.7.4",
219202
"@tiptap/extension-superscript": "^2.7.4",
220203
"@tiptap/extension-table": "^2.7.4",
221204
"@tiptap/extension-table-cell": "^2.7.4",
222205
"@tiptap/extension-table-header": "^2.7.4",
223206
"@tiptap/extension-table-row": "^2.7.4",
224-
"@tiptap/extension-text": "^2.7.4",
225207
"@tiptap/extension-text-align": "^2.7.4",
208+
"@tiptap/extension-text-style": "^2.8.0",
226209
"@tiptap/extension-underline": "^2.7.4",
227210
"@tiptap/pm": "^2.7.4",
211+
"@tiptap/starter-kit": "^2.8.0",
228212
"@types/diff": "^5.2.1",
229213
"@types/dompurify": "^3.0.5",
230214
"@types/uuid": "^10.0.0",

src/external/tiptap/index.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
// REQUIRED EXTENSIONS
22
export * from '@tiptap/core';
3-
export { Document } from '@tiptap/extension-document';
4-
export { Dropcursor } from '@tiptap/extension-dropcursor';
5-
export { Gapcursor } from '@tiptap/extension-gapcursor';
6-
export { HardBreak } from '@tiptap/extension-hard-break';
7-
export { History } from '@tiptap/extension-history';
8-
export { Paragraph } from '@tiptap/extension-paragraph';
3+
export { StarterKit } from '@tiptap/starter-kit';
94
export { Placeholder } from '@tiptap/extension-placeholder';
10-
export { Text } from '@tiptap/extension-text';
5+
export { TextStyle } from '@tiptap/extension-text-style';
116

127
// OPTIONAL EXTENSIONS
138
export { Blockquote } from '@tiptap/extension-blockquote';

src/packages/rte/tiptap/components/input-tiptap/input-tiptap.element.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@ import type { UmbTiptapExtensionApi, UmbTiptapToolbarValue } from '../../extensi
22
import { css, customElement, html, property, state, when } from '@umbraco-cms/backoffice/external/lit';
33
import { loadManifestApi } from '@umbraco-cms/backoffice/extension-api';
44
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
5-
import {
6-
Document,
7-
Dropcursor,
8-
Editor,
9-
Gapcursor,
10-
HardBreak,
11-
History,
12-
Paragraph,
13-
Placeholder,
14-
Text,
15-
} from '@umbraco-cms/backoffice/external/tiptap';
5+
import { Editor, Placeholder, StarterKit, TextStyle } from '@umbraco-cms/backoffice/external/tiptap';
166
import { UmbChangeEvent } from '@umbraco-cms/backoffice/event';
177
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
188
import { UmbFormControlMixin } from '@umbraco-cms/backoffice/validation';
@@ -26,12 +16,7 @@ const elementName = 'umb-input-tiptap';
2616
@customElement(elementName)
2717
export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof UmbLitElement, string>(UmbLitElement) {
2818
readonly #requiredExtensions = [
29-
Document,
30-
Dropcursor,
31-
Gapcursor,
32-
HardBreak,
33-
History,
34-
Paragraph,
19+
StarterKit,
3520
Placeholder.configure({
3621
placeholder: ({ node }) => {
3722
if (node.type.name === 'heading') {
@@ -41,7 +26,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof Um
4126
return this.localize.term('placeholders_rteParagraph');
4227
},
4328
}),
44-
Text,
29+
TextStyle,
4530
];
4631

4732
@state()
@@ -106,6 +91,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin<string, typeof Um
10691
if (!element) return;
10792

10893
const dimensions = this.configuration?.getValueByAlias<{ width?: number; height?: number }>('dimensions');
94+
console.log(this.configuration, dimensions);
10995
if (dimensions?.width) this.setAttribute('style', `max-width: ${dimensions.width}px;`);
11096
if (dimensions?.height) element.setAttribute('style', `max-height: ${dimensions.height}px;`);
11197

src/packages/rte/tiptap/extensions/core/blockquote.extension.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/packages/rte/tiptap/extensions/core/bold.extension.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/packages/rte/tiptap/extensions/core/code-block.extension.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/packages/rte/tiptap/extensions/core/heading.extension.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/packages/rte/tiptap/extensions/core/horizontal-rule.extension.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/packages/rte/tiptap/extensions/core/italic.extension.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)