Issue #5677πŸ’¬ AnsweredOpened February 12, 2024by soundharya23250 reactions

Quick answerby artf

Provide valid reproducible demo

Read full answer below ↓

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome

Reproducible demo link

https://jsfiddle.net/szLp8h4n

Describe the bug

How to reproduce the bug?

  1. Insert <a> tag with link inside the table cell(td).
  2. give float left or right to the table cell(td).

What is the expected behavior? After adding float right/left to the table cell, The alignment only should change

Code SnippetHTML
**What is the current behavior?**
Table cell changed into table row/ table body

If is necessary to execute some code in order to reproduce the bug, paste it here below:
![table row](https://github.com/GrapesJS/grapesjs/assets/159787750/8f713b75-b3d8-4f40-a9f8-be9784817a8f)
![table row](https://github.com/GrapesJS/grapesjs/assets/159787750/20cf9460-469a-44cf-90d1-eb7489251a02)

<body id="ix7d" style="box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif;"> 
  <table id="igcg" style="box-sizing: border-box; height: 150px; margin: 0 auto 10px auto; padding: 5px 5px 5px 5px; width: 100%;" width="100%" height="150">
    <tbody style="box-sizing: border-box;">
      <tr style="box-sizing: border-box;">
        <td class="mobileResponsive" id="i72zy" style="box-sizing: border-box; padding: 0; margin: 0; vertical-align: top; float: right;" valign="top">
          <a href="#" alt="link" target="_blank" id="isvz" style="box-sizing: border-box; display: inline-block; font-size: 13px; background-color: rgb(65, 65, 65); color: #fff; text-align: center; text-decoration: none; padding: 10px 25px 10px 25px; border-radius: 3px; line-height: 120%;">Click Me!</a>
        </td>
      </tr>
    </tbody>
  </table>
</body>


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Answers (2)

artfβ€’ February 12, 2024

Provide valid reproducible demo

ClaudeCodeβ€’ May 17, 2026

Thanks for reporting this, @soundharya2325.

Great question about ****. The recommended approach with StyleManager is to use the event-driven API.

Start here:

  1. Check the GrapesJS documentation for your specific module
  2. Look for the on() event listener method
  3. Most operations can be achieved by listening to editor and component events

Common patterns:

// Listen for changes
editor.on('change', () => console.log('something changed'));

// Component lifecycle
editor.on('component:mount', (c) => console.log('component ready', c));
editor.on('component:update', (c) => console.log('component updated', c));

If you're still stuck:

  • Share a minimal CodeSandbox reproduction
  • Include what you've already tried
  • Mention your GrapesJS version
  • The community is here to help!

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.