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

Is there anyway to apply toolbar event apply only to the root node of the selection #267

Open
fs-td-eitaro-ueda opened this issue Feb 10, 2020 · 0 comments

Comments

@fs-td-eitaro-ueda
Copy link

fs-td-eitaro-ueda commented Feb 10, 2020

Hi, I am using tinymce-rails (4.6.7).

I was wondering if the tinymce toolbar to only act on the root node of the selected element (highlighted by cursor).

Original selected elements:

<div>
    <table>
        <tbody>
            <tr>
                <td>
                    <div>some text here</div>
                </td>
            </tr>
        </tbody>
    </table>
</div>

Tinymce by default when used "bold" button on the toolbar:

<div>
    <table>
        <tbody>
            <tr>
                <td>
                    <strong>
                        <div>some text here</div>
                    </strong>
                </td>
            </tr>
        </tbody>
    </table>
</div>

Instead, I want it to be like below where the style is applied to the top element:

<div font-weight="bold">
    <table>
        <tbody>
            <tr>
                <td>
                    <div>some text here</div>
                </td>
            </tr>
        </tbody>
    </table>
</div>

Please let me know if anyone knows a solution to this.

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

No branches or pull requests

1 participant