Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML elements removed / classes removed after editing WYSIWYG #1246

Closed
cardalda opened this issue May 28, 2023 · 4 comments
Closed

HTML elements removed / classes removed after editing WYSIWYG #1246

cardalda opened this issue May 28, 2023 · 4 comments
Milestone

Comments

@cardalda
Copy link

after pasting html code below; the editor renders the table in the right colors in WYSIWYG. After typing one character and switching to the Code editor, you can see one DIV has been removed and all class names are removed.
This is tested on v 2.44.12 and used to work in older versions...

<h3>DIV Demo</h3>

<div style="display: flex;justify-content: space-evenly;">
    <div style="background-color:tan;display: flex;flex-direction: column;">
        <table class="db">
            <tbody>
                <tr class="title">
                    <td colspan="2">
                        <div>flow</div>
                    </td>
                </tr>
                <tr class="header">
                    <td>
                        <div>name</div>
                    </td>
                    <td>
                        <div>type</div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div>id</div>
                    </td>
                    <td>
                        <div>number</div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

for example, change Demo to Demo2 in WYSIWYG mode and switch to code...

<h3>DIV Demo2</h3>

<div>
    <table>
        <tbody>
            <tr>
                <td colspan="2">
                    <div>flow</div>
   ...
@JiHong88 JiHong88 added this to the 2.45.0 milestone May 28, 2023
@JiHong88
Copy link
Owner

JiHong88 commented May 28, 2023

Classes must start with se- or __se__.
In the next version, the 'allowedClassNames' option will be added.

JiHong88 added a commit that referenced this issue May 28, 2023
@cardalda
Copy link
Author

Hi mr JiHong,

did you close this for only the class names?
That's only part of the problem ;-)

The inline styles are also gone (I can solve this by adding more "se-" classes"
, and one DIV level has been removed, breaking my custom style; This cannot be solved with classes...

@JiHong88
Copy link
Owner

Add the "__se__tag" class to the topmost "div".
Then that element will not be checked for consistency.

@JiHong88
Copy link
Owner

The 2.45.0 version has been updated.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants