Cybermano Posted Friday at 12:07 AM Share Posted Friday at 12:07 AM Hi. I’m using an Inputfieldtextarea to store an html table in a page (admin side), populated by hook using custom markups (no AdminDataTables). This field is setted without textformatters, accepting html/markup content and with open and locked visibility (to render properly the html structure). In this table, all the data attributes of any tr/td (but also other tags such as a links or button, div etc.) are removed from the html and only classes remain in the code. Maybe I’m missing something, but I’m stuck with this behaviour. Anyone has any idea? I searched similar topics in the forum but with no luck… PS I would use data attributes to speed up js/ajax events and keep code cleaner. Link to comment Share on other sites More sharing options...
Gideon So Posted Friday at 06:44 AM Share Posted Friday at 06:44 AM Hi @Cybermano I think you need to set the textarea field to allow data attributes. Which RTE you are using? CKEditor or TinyMce? Gideon Link to comment Share on other sites More sharing options...
Cybermano Posted Friday at 12:02 PM Author Share Posted Friday at 12:02 PM (edited) Hi @Gideon So, thanks for your reply. Currently no RTE is setted: in past the same config didn’t broke the data attributes (but with AdminDataTableMarkup call, not simple html table tags). I will try to set almost one RTE and let you know. Many thanks in advance. Edited Friday at 12:52 PM by Cybermano Typos Link to comment Share on other sites More sharing options...
Cybermano Posted yesterday at 10:42 AM Author Share Posted yesterday at 10:42 AM (edited) Hi @Gideon So, I'm back. I've tryed the RTE type, but they didn't fits for my needs: CKeditor cuts the table in the inputfield layout (instead to display my table with 100% and responsive classes), while TinyMCE didn't display anything. Quote Post edited: P.S. CKeditor still doesn't show the attributes, even if I set extra allowed contents as table[*]{*}(*), tr[*]{*}(*) and td[*]{*}(*); one per line. Expand So I turned on the simply textarea. I'm still amazed by the different behavior for rendering the delayed output of the two kind of table in two inputfields of same kind and with same configuration: Case A I pass an AdminDataTableMarkup from a custom function by a variable ( $output .= ... ) and this table is rendered with right attributes (eg. the id) Reveal hidden contents Case B I pass a custom html table in the same way, but no id is stored... (i need to pass id or other attributes as classes, with much more effort to pass right data to ajax calls and response actions). Only "cellpadding" and "cellspacing" remains. Reveal hidden contents Edited 16 hours ago by Cybermano Add ckeditor extra allowed content verification Link to comment Share on other sites More sharing options...
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