nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
16.91k stars 1.72k forks source link

Widgets in a table are not rendered #3198

Open ArthurWD opened 8 months ago

ArthurWD commented 8 months ago

Describe the bug

Widgets in a table are not rendered

To Reproduce

Steps to reproduce the behavior:

  1. Add a table
  2. Add a widget in a cell
  3. Switch from markdown to wysiwyg and back
  4. Widget is not rendered correctly

Expected behavior

Widget should remain

Additional context

I fixed it by editting apps/editor/src/convertors/toWysiwyg/toWwConvertors.ts. I've changed hasParaNode in tableCell to the following which works for me, but I'm not sure if it works in all cases:

      const hasParaNode = (childNode: MdNode | null) =>
        childNode &&
        (isInlineNode(childNode) ||
          isCustomInline(childNode) ||
          isCustomHTMLInlineNode(state, childNode));