nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.

Home Page:http://ui.toast.com/tui-editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Widgets in a table are not rendered

ArthurWD opened this issue · comments

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));