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

Issue with a Redactor field in a column, Redactor formatting buttons not working #3

Closed
radarseven opened this issue May 14, 2015 · 3 comments

Comments

@radarseven
Copy link

Hey Guys,

First off, really great work on this plugin, it really adds a lot of flexibility to Matrix fields.

Running into an odd issue using a rich text field as a column in a Super Table field. The Super Table field has 2 columns: Headline and Content. Headline is a plain text field and Content is a rich text field.

The issue I'm running into when entering content into the rich text field is when I try to use some of the formatting buttons, in this case the unordered list button. There seems to be a JS error occurring, but not seeing anything in console. I'm attaching a before and after entry save screenshot for reference. When I try to use the unordered list button, you'll notice in the screenshot that the unordered list tooltip remains visible, but none of the redactor buttons work after that point. Then, after saving the entry, you'll notice that the unordered list content doesn't get saved with the entry.

Let me know if you have any questions or if you think you might know what's going on.

Thanks!
Michael
entry-after-save
entry-before-save

@engram-design
Copy link
Member

@radarseven Thanks for the detailed description and screenshot - much appreciated.

I'd never noticed this before but your absolutely right. I've only really played around with the standard bold/italic/image/link options. From my testing, all but the source, ul and ol buttons works as expected.

I'll investigate further and let you know.

@engram-design
Copy link
Member

@radarseven Just an update on this, it seems to come down to the way Redactor's code works for inserting lists. It basically looks for the closest td or th, and empties the html for that element - which doesn't end well for our field. Until now, this hasn't been an issue in Craft, as Rich Text inside a Matrix doesn't have any table markup.

It's not a permanent solution by any means - but I'm afraid anything more would require a full re-write of the templating, not to mention having to remove it from a table element.

If you're interested, you can comment out a single line 5620 in craft\app\resources\js\lib\redactor\redactor.js which will fix the issue.

@engram-design
Copy link
Member

@radarseven Great news! This was fixed in Redactor 10.1 Lists don’t work properly when Redactor is located inside of a table. As the latest Craft (2.4.2675) has Redactor 10.2, you should be good to go with the latest version. I've tested that this works for both Row and Table layout.

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

2 participants