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

No styles for table? #17

Open
kimbuckley opened this issue Apr 5, 2017 · 3 comments
Open

No styles for table? #17

kimbuckley opened this issue Apr 5, 2017 · 3 comments

Comments

@kimbuckley
Copy link

kimbuckley commented Apr 5, 2017

I've installed this feature with no problem, and I'm able to use the editor within Wagtail. However, when I insert a table and save the page, no styles are applied to keep the table in a table format. It just spits the table data out in line with spaces in between each cell. It also doesn't insert the table markup within the HTML when I view the page source. Is there something I am missing?

@ercchy
Copy link

ercchy commented Apr 18, 2017

I also have this issue. Seems like the table is not really rendered, but rather converted into a string with spaces.
Right now I have no idea how to fix this, but I have no time to search for the solution.

@apenshin
Copy link

apenshin commented Apr 19, 2017

@hooks.register('construct_whitelister_element_rules')
def whitelister_element_rules():
    return {
        'table': allow_without_attributes,
        'td': attribute_rule({'colspan': True, 'rowspan': True}),
        'tr': allow_without_attributes,
        'th': attribute_rule({'colspan': True, 'rowspan': True}),
    }

@HristoZA
Copy link

Hey @apenshin, which file do you recommend we put this in? I've added it into wagtailtinymce/wagtail_hooks.py but it didn't fix the issue for me.

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

4 participants