alejandro Posted October 12, 2013 Posted October 12, 2013 Hello, I´ve created a textarea field, type TinyMCE. When inserting a table and then saving the page, it disappears and it´s converted to a simple paragraph: Before saving: After saving: This happens with CKeditor as well, so maybe I´m missing something about the configuration of the field itself? Thanks.
Martijn Geerts Posted October 15, 2013 Posted October 15, 2013 Can't help you with the WYSIWYG editors. ( I think inserting tables with WYSIWYG is even more evil then inserting images ) A way to go for tables could be a repeater. ( if there are not to many rows ) Take a look at this page, there's a module that convert a repeater to a table.
alejandro Posted October 15, 2013 Author Posted October 15, 2013 Well, about the problematic field, finally I deleted it and created a new one and the problem is gone. Don´t know what was the fault with it, maybe some misconfiguration in the database ¿? Agree with you about tables + editor. I don´t like/trust the user to have too much control about the layout/format of the content. I found your module when searching for a different approach and think is quite a better solution, but the info I need to output has many combinations. A list of prices for products, but sometimes there is a price for several products (pages), promotions for 1 product or several... for example: The info comes from different product pages. So in the end i thought it would be easier to just let the user input a table. Mmm, still undecided. Thank you for your help.
Martijn Geerts Posted October 15, 2013 Posted October 15, 2013 I think it's do-able with my module. With a few changes to the <thead> and a little modification in the loop. if($this->thead) { $out .= "<thead><tr>"; $out .= "<th colspan='{$columns}'>".wire('pages')->get($pid)->fields->get($fid)->label."</th>"; $out .= "</tr></thead>"; } ps, the module is intended as starting point. That's why I never added it to the module directory.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now