Jump to content

Inputfieldtextarea: saved html table loses data attributes


Cybermano
 Share

Recommended Posts

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

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 by Cybermano
Typos
Link to comment
Share on other sites

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 by Cybermano
Add ckeditor extra allowed content verification
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...