fix: error when rendering widgets inside table (fix #3198) #3261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: Widgets inside of table cells causing data loss
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
This PR addresses an issue where rendering widgets inside a table causes an error, resulting in the table cell being removed from both the visual and markdown views when switching modes. This leads to data loss. The fix is based on a previous bug report and potential solution found here.
Business Case
Fixing this issue is crucial for users who rely on the accurate rendering of widgets within tables. The current bug leads to data loss, which can significantly impact user productivity and trust in the application. By resolving this issue, we ensure a more reliable and seamless user experience, which is essential for maintaining user satisfaction and retention.
Steps to Reproduce
Open the TOAST UI Editor Demo:
Switch to Markdown Mode:
Add a Table with a Widget:
Switch to Visual Mode:
Observe the Table:
@Widget
) is still present.Switch Back to Markdown Mode:
Check the Markdown Content:
editor.getMarkdown()
and observe the output.Expected Result
@Widget
) should be present in both Visual and Markdown modes.editor.getMarkdown()
output should include the cell with the widget.Actual Result
editor.getMarkdown()
output does not include the cell with the widget, resulting in data loss.fix: resolve a bug completely (#3198)
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨