awcodes / filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
MIT License
261 stars 71 forks source link

Asymetric grid doesn't save gridspans when saved as html #240

Closed RobertsG closed 8 months ago

RobertsG commented 8 months ago

Filament Version

v3.1

Plugin Version

v3.2.6

PHP Version

PHP 8.1.0

Problem description

When saving an asymmetric grid and reopening a document the grid looses it's grid span settings. Saving with output::Html.

Expected behavior

When reopening a saved entry with the tiptap editor the gridspan should be restored.

Steps to reproduce

Create a three column grid, set it as asymetric, set the first column to span 1 and the second to span 2. Save the document and reload the page with the editor, the span settings will be lost. Saving with the default output::Html.

Reproduction repository

No response

Relevant log output

No response

RobertsG commented 8 months ago

As far as I can see, the data in the table has the correct values. But the editor and the preview generated using tiptap_converter()->asHtml($data['content'])

Show the grid elements as <div class="filament-tiptap-grid-builder__column" data-col-span="" style="grid-column: span ;"><p>a</p></div> With the grid-column: span and data-col-span="" missing the integer value representing the column count.

kezzine commented 8 months ago

I got the same bug here.

awcodes commented 8 months ago

I'll look into it, but I recommend using the grid builder instead.