Hi,
Ive been trying to add Tip-Tap to a custom property editor and I have had some success but what I’m struggling with is trying to get the toolbar to show. I’ve had a look around the CMS core code and spotted that it needed some config, which made sense, as you need to tell the toolbar what to show/hide. However, no matter what I try, I only ever get an empty text area with no tip-tap toolbar.
Here is my custom property element :
import { customElement, html } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/property-editor';
import {UmbPropertyEditorConfigCollection } from "@umbraco-cms/backoffice/property-editor";
import '@umbraco-cms/backoffice/tiptap';
@customElement('property-editor-custom-map-editor')
export class PropertyEditorCustomMapEditorElement extends UmbLitElement implements UmbPropertyEditorUiElement {
private _configCollection = new UmbPropertyEditorConfigCollection([
{
alias: 'toolbar',
value: [
[
[
"Umb.Tiptap.Toolbar.SourceEditor",
],
[
"Umb.Tiptap.Toolbar.TextAlignLeft",
"Umb.Tiptap.Toolbar.TextAlignCenter",
"Umb.Tiptap.Toolbar.TextAlignRight"
],
[
"Umb.Tiptap.Toolbar.BulletList",
"Umb.Tiptap.Toolbar.OrderedList"
],
[
"Umb.Tiptap.Toolbar.Link",
"Umb.Tiptap.Toolbar.Unlink"
]
]
]
}
]);
render() {
return html`
<umb-property-editor-ui-tiptap>
<umb-input-tiptap>
<umb-tiptap-toolbar configuration="${this._configCollection}" data-mark="tiptap-toolbar</umb-tiptap-toolbar>
</umb-input-tiptap>
</umb-property-editor-ui-tiptap>
`;
}
}
export { PropertyEditorCustomMapEditorElement as element };
declare global {
interface HTMLElementTagNameMap {
'property-editor-custom-map-editor': PropertyEditorCustomMapEditorElement;
}
}
Which outputs :
With no errors in the console.

