Darginec05 / Yoopta-Editor

Build Notion-like, Craft-like, Coda-like, Medium-like editors with Yoopta
https://yoopta.dev/
MIT License
1.36k stars 103 forks source link

[BUG] Yoopta export - incorrect transformation of HTML to yoopta object #264

Closed filipholec closed 1 month ago

filipholec commented 2 months ago

Has this bug been raised before?

Description

When transforming HTML to yoopta editor, there are several problems with the transformed text:

Steps to Reproduce

Transform the following HTML using @yoopta/export or on https://yoopta.dev/examples/withExports/html

<p>To learn any <strong>programming language</strong>, you need to master the knowledge of the so-called <em>three theoretical pillars</em>. Almost all programming languages are built on these pillars:</p>

<ol>
<li><strong>Syntax</strong> (functions, conditions, loops, etc.)</li>
<li><strong>Data types</strong> (numbers, sequences, etc.)</li>
<li><strong>Libraries</strong> (decimal, etc.)</li>
</ol>

<p>First, you&#39;ll look at the second pillar, which is the basics of data types.<br><strong>Data types</strong>, also known as <strong>data structures</strong>. Python is natively equipped with two numeric data types:</p>
<ol>
<li><code>int</code>, whole numbers (from English <em>integer</em>)</li>
<li><code>float</code>, decimal numbers (from English <em>float</em>)</li>
</ol>

<h3>Hierarchy of Operators</h3>
<table>
<thead>
<tr>
<th align="center"><strong>Order</strong></th>
<th align="center"><strong>Operator</strong></th>
<th align="left"><strong>Process</strong></th>
</tr>
</thead>
<tbody><tr>
<td align="center">1.</td>
<td align="center"><code>()</code></td>
<td align="left">Parentheses</td>
</tr>
<tr>
<td align="center">2.</td>
<td align="center"><code>**</code></td>
<td align="left">Exponentiation</td>
</tr>
<tr>
<td align="center">3.</td>
<td align="center"><code>*</code></td>
<td align="left">Multiplication</td>
</tr>
<tr>
<td align="center">4.</td>
<td align="center"><code>/</code></td>
<td align="left">Division</td>
</tr>
<tr>
<td align="center">5.</td>
<td align="center"><code>+</code></td>
<td align="left">Addition</td>
</tr>
<tr>
<td align="center">6.</td>
<td align="center"><code>-</code></td>
<td align="left">Subtraction</td>
</tr>
</tbody></table>

Environment

Screenshots

image

Do you want to work on this issue?

No

If "yes" to above, please explain how you would technically implement this

No response

Darginec05 commented 2 months ago

related https://github.com/Darginec05/Yoopta-Editor/issues/201, https://github.com/Darginec05/Yoopta-Editor/issues/157

Darginec05 commented 2 months ago

Hi @filipholec 👋 Yeap, Table exports does not work because the plugin is under active development right now. I have plans to publish -rc version for Table in two days :)

palwashakmalik commented 1 month ago

is this bug fixed? because I am facing the same issue while deserializing the content from html to editor

Darginec05 commented 1 month ago

I have published -rc version and prepared demo. Check it here: https://yoopta-editor-ffxdyxq73-dargos-projects.vercel.app/examples/withExports/html

Darginec05 commented 1 month ago

Done in v4.8.0 Check it in examples https://yoopta.dev/examples/withExports/html