solved Table Tag Removed After Saving

sekeri
sekeri
@ilker
10 years ago
334 posts
When I add a table into the editor and save it the table tag is removed. I tried it with my custom module and also with page module the results are the same.

Just try to create a page containing a small html table and save it you will see the problem.

Thanks.
html_table.jpg
html_table.jpg  •  60KB


updated by @ilker: 08/14/14 10:13:21PM
michael
@michael
10 years ago
7,714 posts
why'd you delete the last post. Now I have to type my response over again. :(

Check that you have table in the "allowed HTML tags" for that users quota.

Your-Site.com/core/admin/quota
michael
@michael
10 years ago
7,714 posts
add:
,table,tr,td
to the quotas and your table will be allowed in the page.
sekeri
sekeri
@ilker
10 years ago
334 posts
I needed to delete the first entry in order to update the image, sorry. (I know I can only update the image but when I updated the image it was unreachable anymore, anyway)

Yes, it works. I added table, tbody, tr, td into allowed html tags.

I only have a one minor problem left; When I set the align as center for the table it works unless I save it. But as soon as I save align property is gone

Do you have an idea ?

Thanks
michael
@michael
10 years ago
7,714 posts
If i add:
style="text-align:center;"
to the TD then it remains centered.
sekeri
sekeri
@ilker
10 years ago
334 posts
Please right click the table and select insert/edit table and then set alignment as center(it is not text-align but table align property). After saving you will see it disappearing.
brian
@brian
10 years ago
10,148 posts
sekeri:
Please right click the table and select insert/edit table and then set alignment as center(it is not text-align but table align property). After saving you will see it disappearing.

I will check this out - most likely the attribute for table centering needs to be specifically added in the HTMLPurifier code.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
10 years ago
10,148 posts
I have this fixed for the next core release - it's the one table attribute that was not added, sorry about that.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
sekeri
sekeri
@ilker
10 years ago
334 posts
That was a minor issue. Thanks for all your support!
brian
@brian
10 years ago
10,148 posts
sekeri:
That was a minor issue. Thanks for all your support!

No problem!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags