You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/extensions.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,67 +30,67 @@ This example assumes that you will be creating an Umbraco package using the Vite
30
30
You can learn how to do this [Vite Package Setup](../../../../../customizing/development-flow/vite-package-setup.md) article.
31
31
{% endhint %}
32
32
33
-
In this example, you will take the native Tiptap open-source extension [Task List](https://tiptap.dev/docs/editor/extensions/nodes/task-list). Then register it with the rich text editor and add a toolbar button to invoke the Task List action.
33
+
In this example, you will take the native Tiptap open-source extension [Highlight](https://tiptap.dev/docs/editor/extensions/marks/highlight). Then register it with the rich text editor and add a toolbar button to invoke the Task List action.
34
34
35
-
1. Install both the Task List and Task Item extensions from the npm registry.
35
+
1. Install the Highlight extension from the npm registry.
3. Create the toolbar action to invoke the Task List extension.
52
+
3. Create the toolbar action to invoke the Highlight extension.
54
53
55
54
```
56
55
import { UmbTiptapToolbarElementApiBase } from '@umbraco-cms/backoffice/tiptap';
57
56
import type { Editor } from '@umbraco-cms/backoffice/external/tiptap';
58
57
59
-
export default class UmbTiptapToolbarTaskListExtensionApi extends UmbTiptapToolbarElementApiBase {
58
+
export default class UmbTiptapToolbarHighlightExtensionApi extends UmbTiptapToolbarElementApiBase {
60
59
override execute(editor?: Editor) {
61
-
editor?.chain().focus().toggleTaskList().run();
60
+
editor?.chain().focus().toggleHighlight().run();
62
61
}
63
62
}
64
63
```
65
64
66
65
Once you have the above code in place, they can be referenced in the [package manifest](../../../../../extending/property-editors/package-manifest.md) file.
0 commit comments