Problem/Motivation


Hello, i read thats in drupal8 we have responsive tables too. Drupal8 is strong getting into Mobile. So we need to make sure thats in the core wysiwyg Editor we have the tables are responsive.
In my eyes it makes not sense to have a responsive layout/theme but if you use the wyiwyg Editor you don´t have responsive stuff here. In a End-User Eye Drupal has to do this.

Comments

swentel’s picture

Priority: Critical » Normal

This is really not a critical bug report.

Wim Leers’s picture

Title: wysiwyg tables are not responsive » User-created "content" tables are not responsive
Assigned: Unassigned » webchick

I don't see how we could make that work.

Drupal 8's tables are responsive, but only where using theme_table() and even then you have to manually specify the priorities for each column: RESPONSIVE_PRIORITY_LOW or RESPONSIVE_PRIORITY_MEDIUM — see https://api.drupal.org/api/drupal/core%21includes%21theme.inc/function/t....

The only way we can make "regular" tables (i.e. those not generated by code calling theme_table(), hence any "content, not code table" entered by a user via the WYSIWYG editor or otherwise) responsive, is by using a filter that adds the necessary JS and CSS to the page and allows the user to specify using data- attributes which tables have a higher or lower "responsive priority". You would then probably also want a way to specify that responsive priority through the WYSIWYG editor, without having to edit HTML code manually.

This will only benefit people who are embedding huge tables in their content. So I personally think this does not belong in core. It's perfectly plausible to implement this in Drupal 8 (or even 7) contrib, but it does not belong in Drupal core IMO.


Assigning to webchick for feedback, because I know she cares a lot about these kinds of things. I'll let her decide if this issue should be closed or implemented.


This also in no way belongs in the editor.module component — if in any component, it probably belongs in the filter.module component. But I'll leave it here for now.

webchick’s picture

Title: User-created "content" tables are not responsive » Allow for responsive user-created "content" tables
Component: editor.module » filter.module
Category: Bug report » Feature request
Issue tags: +mobile

Unlike #2061377: [drupalImage] Optionally apply image style to images uploaded in CKEditor 5, this feels more edge-casey to me, and something that while important for the entire penultimate mobile experience™ is also that likely comes up very rarely in day-to-day content editing. To make it work, you would need a filter that could read in a data- attribute like data-table-priority="low" and do whatever magic is needed on the JS side to make it react in a responsive way.
So I think this is a worthy feature request, and would love to see it in D8, but doesn't feel like a bug to me.

jessebeach’s picture

Ideally, any approach will produce the same output in terms of HTML structure and classes that theme_table() outputs. Then, #attaching the drupal.tableresponsive library will cause a content table to become responsive.

webchick’s picture

Assigned: webchick » Unassigned

I don't think I need to be assigned to this anymore.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

sandykadam’s picture

Hi there,

I'm also facing the similar issue, we are working for one of the telco site and WYSIWYG editor is used extensively, content team is creating lot of content and tables using editor but the tables which are generated are not at all responsive and all our rest of section is responsive. Site is build using D8.5

Please suggest how we can fix this issue, is there any additional library or modules to fix.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.