Cockpit icon indicating copy to clipboard operation
Cockpit copied to clipboard

Configuration of TIPTAP in wysiwyg

Open Mikearaya opened this issue 8 months ago • 8 comments

We had tinymce configured in our CMS but now i tink cockpit is using tiptap, is there a way it can be configured similar to how tinymce was configured

Mikearaya avatar May 01 '25 09:05 Mikearaya

What do you want to configure specifically?

aheinze avatar May 01 '25 12:05 aheinze

 tinymce: {
    menubar: 'file edit view insert format tools table help',
    toolbar: 'blocks fontfamily fontsize | bold italic underline strikethrough superscript subscript | anchor align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | code fullscreen preview | accordion accordionremove | insertAssetButton',
  },

this was some of the previous configuration but currently we want to enable adding anchor area in textarea

Mikearaya avatar May 01 '25 12:05 Mikearaya

#240 Hi! We actually faced the same issue — the new WYSIWYG editor lacks custom toolbar configuration, which was basically a dealbreaker for updating. Because of that, we had to stick with the previous version, even though it’s not fully up-to-date. Hopefully, this feature will be supported soon so we can upgrade.

praserx avatar Jun 24 '25 18:06 praserx

you should be able to configure the toolbar via field configuration:

{
   toolbar: 'format | color | alignLeft alignCenter alignRight | link image | listBullet listOrdered | table hr'
}

aheinze avatar Jun 24 '25 20:06 aheinze

@aheinze Thanks! I’ll give that a try. One more question though — we were using features like switching to the generated code view and adding custom tags with specific classes (e.g., for multimedia elements or special action buttons). We also used tables quite a lot, and I saw that TipTap seems to support them via a module — I noticed it in your example.

Is that table module fully supported in Cockpit? Just want to be sure before diving in. Thanks a lot!

praserx avatar Jun 25 '25 07:06 praserx

you should be able to configure the toolbar via field configuration:

{
   toolbar: 'format | color | alignLeft alignCenter alignRight | link image | listBullet listOrdered | table hr'
}

Where can this be found? @aheinze

OgDev-01 avatar Jun 26 '25 09:06 OgDev-01

My aim is to customise my toolbar from

Image to something close to 👇

Image

Even if the icons and styles are not the same, but i need more items in my toolbar.

Thanks in advance @aheinze 👍

OgDev-01 avatar Jun 26 '25 09:06 OgDev-01

you should be able to configure the toolbar via field configuration:

{
   toolbar: 'format | color | alignLeft alignCenter alignRight | link image | listBullet listOrdered | table hr'
}

Where can this be found? @aheinze

Image

urania-dev avatar Jul 18 '25 13:07 urania-dev