Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Table Type #26

Closed
ricardotbfreitas opened this issue Dec 5, 2013 · 12 comments
Closed

Table Type #26

ricardotbfreitas opened this issue Dec 5, 2013 · 12 comments
Assignees

Comments

@ricardotbfreitas
Copy link

Hi,

How can i remove the tablet type? If i write the shortcode like this (without type parameter):

[table cols="..." data="...."]

It will return:

<table class="table table-type table-bordered">

But i just need:

<table class="table">

How can i do it?

Thanks a lot.

@MWDelaney
Copy link
Owner

Thanks for reporting this. I've updated the table shortcode and documentation to function better and more consistently with the rest of our shortcodes. Please give it a try.

Note: the version in this repo is updated, but the archive on our website is not yet. Please download from this repo to test.

@ricardotbfreitas
Copy link
Author

Hi,

I think is something wrong with the shortcode output, even if you put bordered="false" its outputing:

<table class="table-bordered">

Other issue is the width, its no longer working as should:

screen shot 2013-12-06 at 3 13 44 pm

Thanks again.

@MWDelaney
Copy link
Owner

That's what I get trying to fix this quickly while at work.

f808d50 should fix it correctly.

@ricardotbfreitas
Copy link
Author

Hi,

Yes its working, however the issue with width remains, check:

screen shot 2013-12-06 at 4 30 16 pm

screen shot 2013-12-06 at 4 30 34 pm

For some reason is putting "td" inside the same "tr" of "td".

Thanks.

@ricardotbfreitas
Copy link
Author

Hi,

Any suggestions?

Thanks.

@MWDelaney
Copy link
Owner

Hi, yes. I plan to make some changes to the way we're handling tables to better match the goals of this plugin. I hope to have these completed soon (maybe even today) and I'll update the documentation and this issue. Sorry for the delay and the for the issues you're experiencing.

@MWDelaney
Copy link
Owner

Hey, @rtbfreitas, thanks for your patience. I've changed the way tables are handled by this plugin to be more in line with our goals. See this commit: 1d9970d

The practical upshot is that the new [table-wrap] shortcode doesn't try to write your table HTML for you, it simply modifies a contained set of table HTML (see the documentation here: https://github.com/filipstefansson/bootstrap-3-shortcodes#tables).

Let me know if you have any other questions or concerns.

@ghost ghost assigned MWDelaney Dec 9, 2013
@ricardotbfreitas
Copy link
Author

Thanks @Foolsrun , i prefer the old way, i think its more simple for end-user, but now its working as should.

Thanks a lot.

@MWDelaney MWDelaney reopened this May 21, 2014
@MWDelaney
Copy link
Owner

@filipstefansson and @simonyeldon
We got some feedback over on WordPress.org about tables, and how the current approach isn't really all that useful.

Despite being the author of the current method, I tend to agree with the feedback. So we have a few options that I see: we could...

Remove table support entirely
Since HTML tables aren't really a feature of Bootstrap, and they require a heck of a non-Bootstrap markup, supporting them doesn't really make sense. There are better table plugins out there that can be used to add the Bootstrap classes to a table.

Support tables fully
By adding shortcodes for [table], [td], [tr], [th], [thead], [tbody], etc. This would be arduous and ultimately isn't the goal of this plugin. We don't have shortcodes for forms; should we have them for tables?

Leave things how they are
Self explanatory.

Any thoughts?

@MWDelaney
Copy link
Owner

@filipstefansson and @simonyeldon, any thoughts here?

@benfreke
Copy link
Contributor

Just thought I'd chime in, as I'm about to start using this plugin ahead of some custom shortcodes I wrote.

With tables, all the shortcodes needs is to add a wrapper div around the table with "table-responsive". And then your existing code works as is with all the existing functionality. I then use the mce-table-buttons plugin to give me all the table controls I need. If I need to colour rows, I can add that in the future using the styleselect feature of tinymce.

Since bootstrap requires a wrapper div to make the table responsive, I honestly believe this shortcode should be left in the plugin, as long as we get that extra div.

@MWDelaney
Copy link
Owner

I just committed support for responsive tables in [table-wrap] here: 50033ef

This will make its way into the next release of the plugin, which should be soon!

Thanks for your thoughts! We're glad you like this plugin! Don't forget to leave a review over at WordPress.org!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants