Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
64a301c
Updates Tiptap toolbar configuration screengrab
leekelleher May 12, 2025
ea68353
Adds Statusbar configuration to Tiptap RTE
leekelleher May 12, 2025
07f9813
Adds Stylesheets configuration to Tiptap RTE
leekelleher May 12, 2025
ee25939
Adds Style Menu article for Tiptap RTE
leekelleher May 12, 2025
eb2ebc5
Duplicated to v16 docs
leekelleher May 12, 2025
0ff618c
Added Style Menu to SUMMARY
leekelleher May 12, 2025
bb2047a
Corrected Vale warnings
leekelleher May 12, 2025
f72a29f
Further Vale corrections
leekelleher May 12, 2025
d44a1c4
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
ca83e68
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
89a9117
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
7e5c8f9
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
70b1dc4
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
9476a1a
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
1e04e1d
Update 15/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
44fad3b
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
00f9ac2
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
34dbfd4
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
6968ac9
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
05a2ae7
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
e251511
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
c9a3a06
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-…
eshanrnh May 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 15/umbraco-cms/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
* [Configuration](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/configuration.md)
* [Extensions](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/extensions.md)
* [Blocks](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/blocks.md)
* [Style Menu](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu.md)
* [Change Rich Text Editor UI](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/change-rich-text-editor-ui.md)
* [Rich Text Editor TinyMce](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor-tinymce/README.md)
* [Configuration](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor-tinymce/configuration.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ The Rich Text Editor (RTE) Tiptap property editor is highly configurable and bas

Customize everything from toolbar options to editor size to where pasted images are saved.

## [Style Menu](style-menu.md)

Define a cascading text formatting and style menu for the Rich Text Editor toolbar.

## [Blocks](blocks.md)

Use Blocks to define specific parts that can be added as part of the markup of the Rich Text Editor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You have full control over which options should be available on the RTE.

![Toolbar: All options enabled](images/rte-tiptap-all-toolbar-items.png)

In the example above, all 27 options have been enabled. These options include font styles like bold and italics, bullet lists, and options to embed videos and insert images.
In the example above, all 38 options have been enabled. These options include font styles like bold and italics, bullet lists, and options to embed videos and insert images.

You can customize the look of the toolbar:

Expand All @@ -17,6 +17,18 @@ You can customize the look of the toolbar:

![Enhance and customize the capabilities of the Rich Text Editor toolbar](images/rte-tiptap-capabilities-and-toolbar.png)

## Statusbar

As well as the toolbar, you can configure extensions for the statusbar.

![Statusbar with Word Count extension enabled](images/rte-tiptap-statusbar.png)

## Stylesheets

To apply custom styles to the Rich Text Editor, you can select from any existing stylesheets.

Stylesheets can be created in the **Settings** section. To learn more about this feature, see the [Stylesheets in the Backoffice](../../../../design/stylesheets-javascript.md) article.

## Dimensions

Define `height` and `width` of the editor displayed in the content section.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Style Menu

A Style Menu is a configurable extension that adds a cascading menu to the toolbar for applying text styles and formatting.

![Rich Text Editor cascading style menu](images/rte-tiptap-stylemenu.png)

{% hint style="info" %}
Any custom stylesheets associated with the Rich Text Editor will not auto generate a style menu in the toolbar.
{% endhint %}

### Creating a Style Menu

In this article, you can find an example of how to set up a Style Menu using the package manifest file.

{% code title="umbraco-package.json" %}

Check warning on line 15 in 15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.UmbracoTerms] We prefer 'Umbraco' over 'umbraco.' Raw Output: {"message": "[UmbracoDocs.UmbracoTerms] We prefer 'Umbraco' over 'umbraco.'", "location": {"path": "15/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu.md", "range": {"start": {"line": 15, "column": 16}}}, "severity": "WARNING"}
```json
{
"name": "Name of your package",
"alias": "My.Package",
"extensions": [
{
"type": "tiptapToolbarExtension",
"kind": "styleMenu",
"alias": "MyCustom.Tiptap.StyleMenu",
"name": "My Custom Tiptap Style Menu",
"meta": {
"alias": "myCustomStyleMenu",
"icon": "icon-palette",
"label": "My custom styles"
},
"items": [
{
"label": "Headings",
"items": [
{
"label": "Heading 2",
"data": { "tag": "h2" },
"appearance": { "icon": "icon-heading-2" }
},
{
"label": "Heading 3",
"data": { "tag": "h3" },
"appearance": { "style": "font-size: large;" }
},
{
"label": "Heading 4",
"data": { "tag": "h4" }
}
]
},
{
"label": "Attributes",
"items": [
{
"label": "Classes",
"data": { "class": "foo" }
},
{
"label": "IDs",
"data": { "id": "bar" }
},
{
"label": "Mixed",
"data": { "tag": "span", "class": "foo", "id": "bar" }
}
]
}
]
}
]
}
```
{% endcode %}


The `items` property defines the structure of the style menu. Each menu item has the following options:

- `label`: _(required)_ The label of the menu item. This supports localization keys.
- `appearance`: This defines the appearance of the menu item. The value has 2 optional properties:
- `icon`: To prefix an icon to the menu item.
- `style`: To apply CSS rules to the menu item.
- `data`: To configure the function of the style menu item. The value has 3 optional properties:
- `tag`: A [supported HTML tag](#supported-html-tags) name. This will be applied to the selected text.
- `class`: Applies a class attribute with the defined class name to the containing tag of the selected text.
- `id`: Applies an ID attribute with the defined ID value to the containing tag of the selected text.
- `separatorAfter`: When `true`, it will add a line separator after the menu item.
- `items`: To enable a cascading menu, an array of nested menu items may be added.


Once configured, all custom style menus will appear in the Rich Text Editor toolbar options, as described in the [Rich Text Editor Configuration](configuration.md) article.


#### Supported HTML tags

Since the Tiptap has a strict rich-text schema, only supported HTML tags can be used in the style menu, _(arbitrary markup will be excluded)._ The following HTML tag names are supported:

- `h1`
- `h2`
- `h3`
- `h4`
- `h5`
- `h6`
- `p`
- `blockquote`
- `code`
- `codeBlock`
- `div`
- `em` (italic)
- `ol`
- `strong` (bold)
- `s` (strike-through)
- `span`
- `u` (underline)
- `ul`
1 change: 1 addition & 0 deletions 16/umbraco-cms/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
* [Configuration](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/configuration.md)
* [Extensions](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/extensions.md)
* [Blocks](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/blocks.md)
* [Style Menu](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu.md)
* [Login](fundamentals/backoffice/login.md)
* [Document Blueprints](fundamentals/backoffice/document-blueprints.md)
* [Sidebar](fundamentals/backoffice/sidebar.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ The Rich Text Editor property editor is highly configurable and based on [Tiptap

Customize everything from toolbar options to editor size to where pasted images are saved.

## [Style Menu](style-menu.md)

Define a cascading text formatting and style menu for the Rich Text Editor toolbar.

## [Blocks](blocks.md)

Use Blocks to define specific parts that can be added as part of the markup of the Rich Text Editor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You have full control over which options should be available on the RTE.

![Toolbar: All options enabled](images/rte-tiptap-all-toolbar-items.png)

In the example above, all 27 options have been enabled. These options include font styles like bold and italics, bullet lists, and options to embed videos and insert images.
In the example above, all 38 options have been enabled. These options include font styles like bold and italics, bullet lists, and options to embed videos and insert images.

You can customize the look of the toolbar:

Expand All @@ -17,6 +17,18 @@ You can customize the look of the toolbar:

![Enhance and customize the capabilities of the Rich Text Editor toolbar](images/rte-tiptap-capabilities-and-toolbar.png)

## Statusbar

As well as the toolbar, you can configure extensions for the statusbar.

![Statusbar with Word Count extension enabled](images/rte-tiptap-statusbar.png)

## Stylesheets

To apply custom styles to the Rich Text Editor, you can select from any existing stylesheets.

Stylesheets can be created in the **Settings** section. To learn more about this feature, see the [Stylesheets in the Backoffice](../../../../design/stylesheets-javascript.md) article.

## Dimensions

Define `height` and `width` of the editor displayed in the content section.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Style Menu

A Style Menu is a configurable extension that adds a cascading menu to the toolbar for applying text styles and formatting.

![Rich Text Editor cascading style menu](images/rte-tiptap-stylemenu.png)

{% hint style="info" %}
Any custom stylesheets associated with the Rich Text Editor will not auto generate a style menu in the toolbar.
{% endhint %}

### Creating a Style Menu

In this article, you can find an example of how to set up a Style Menu using the package manifest file.

{% code title="umbraco-package.json" %}

Check warning on line 15 in 16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.UmbracoTerms] We prefer 'Umbraco' over 'umbraco.' Raw Output: {"message": "[UmbracoDocs.UmbracoTerms] We prefer 'Umbraco' over 'umbraco.'", "location": {"path": "16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/style-menu.md", "range": {"start": {"line": 15, "column": 16}}}, "severity": "WARNING"}
```json
{
"name": "Name of your package",
"alias": "My.Package",
"extensions": [
{
"type": "tiptapToolbarExtension",
"kind": "styleMenu",
"alias": "MyCustom.Tiptap.StyleMenu",
"name": "My Custom Tiptap Style Menu",
"meta": {
"alias": "myCustomStyleMenu",
"icon": "icon-palette",
"label": "My custom styles"
},
"items": [
{
"label": "Headings",
"items": [
{
"label": "Heading 2",
"data": { "tag": "h2" },
"appearance": { "icon": "icon-heading-2" }
},
{
"label": "Heading 3",
"data": { "tag": "h3" },
"appearance": { "style": "font-size: large;" }
},
{
"label": "Heading 4",
"data": { "tag": "h4" }
}
]
},
{
"label": "Attributes",
"items": [
{
"label": "Classes",
"data": { "class": "foo" }
},
{
"label": "IDs",
"data": { "id": "bar" }
},
{
"label": "Mixed",
"data": { "tag": "span", "class": "foo", "id": "bar" }
}
]
}
]
}
]
}
```
{% endcode %}


The `items` property defines the structure of the style menu. Each menu item has the following options:

- `label`: _(required)_ The label of the menu item. This supports localization keys.
- `appearance`: This defines the appearance of the menu item. The value has 2 optional properties:
- `icon`: To prefix an icon to the menu item.
- `style`: To apply CSS rules to the menu item.
- `data`: To configure the function of the style menu item. The value has 3 optional properties:
- `tag`: A [supported HTML tag](#supported-html-tags) name. This will be applied to the selected text.
- `class`: Applies a class attribute with the defined class name to the containing tag of the selected text.
- `id`: Applies an ID attribute with the defined ID value to the containing tag of the selected text.
- `separatorAfter`: When `true`, it will add a line separator after the menu item.
- `items`: To enable a cascading menu, an array of nested menu items may be added.


Once configured, all custom style menus will appear in the Rich Text Editor toolbar options, as described in the [Rich Text Editor Configuration](configuration.md) article.


#### Supported HTML tags

Since the Tiptap has a strict rich-text schema, only supported HTML tags can be used in the style menu, _(arbitrary markup will be excluded)._ The following HTML tag names are supported:
- `h1`
- `h2`
- `h3`
- `h4`
- `h5`
- `h6`
- `p`
- `blockquote`
- `code`
- `codeBlock`
- `div`
- `em` (italic)
- `ol`
- `strong` (bold)
- `s` (strike-through)
- `span`
- `u` (underline)
- `ul`
Loading