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

Paste html markup in Quill Editor #10

Open
tsharms opened this issue Sep 14, 2020 · 1 comment
Open

Paste html markup in Quill Editor #10

tsharms opened this issue Sep 14, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@tsharms
Copy link

tsharms commented Sep 14, 2020

Hi,

I've got a question about the conversion of pasted markup in the QuillJS Editor. I would like to give editors the option to paste existing markup inside the editor, but the editor doesn't seem to convert it to correct html. Can you tell me if this is supported within this plugin, and if so how I can enable this feature?

For example:

<table>
    <thead>
        <tr>
            <th colspan="2">The table header</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>The table body</td>
            <td>with two columns</td>
        </tr>
    </tbody>
</table>

Is converted to:

<div class="ql-editor" data-gramm="false" contenteditable="true">
    <p>&lt;table&gt;</p>
    <p>&nbsp;&nbsp;&lt;thead&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th colspan="2"&gt;The table header&lt;/th&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;</p>
    <p>&nbsp;&nbsp;&lt;/thead&gt;</p>
    <p>&nbsp;&nbsp;&lt;tbody&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;The table body&lt;/td&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;with two columns&lt;/td&gt;</p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;</p>
    <p>&nbsp;&nbsp;&lt;/tbody&gt;</p>
    <p>&lt;/table&gt;</p>
</div>
@ek0519 ek0519 added the enhancement New feature or request label Sep 15, 2020
@ek0519
Copy link
Owner

ek0519 commented Sep 15, 2020

At the beginning to avoid XSS, but I will add an option in Nova to offer choices, can paste HTML tags or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants