Vote #63549
完了Toolbar button to insert a table
0%
説明
When you open the formatting help popup it lacks info about tables. AFAIK with textile markup it is possible to create tables using markup like that:
|cell|cell|cell| |another cell|merged cell||
Output:
|cell|cell|cell|
|another cell|another cell|another cell|
So as you see it is possible to create tables - too bad that help does not mention it - I needed to look after textile documentation to get that info. For me it is no problem but I manage Redmine for less technical people and they probably dont even look at help but strictly at the toolbar - when there is no table icon it means there is no tables. ;)
journals
I agree, but what would a "table" button insert ? Two '|' ? We would probably need something a bit more evolved for such a button, such as a pop-up window asking for
* number of rows
* number of columns
* use headers ? (checkbox)
Once the template syntax is inserted, it probably becomes more natural to fill the cells and tweak it by hand.
--------------------------------------------------------------------------------
Paul Rivier wrote:
> I agree, but what would a "table" button insert ?
It could work like in MS Word or OpenOffice.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Since markup help already has information about tables (#12734), I am changing the subject of this issue.
--------------------------------------------------------------------------------
The attached patch adds a button to insert a table into the wiki toolbar.
The button create a table with rows / columns according to the selected range.
!{width: 70%; border: 1px solid #ccc}use-table-generator.gif!
Markdown:
<pre>
|A |B |C |D |E |
|--|--|--|--|--|
| | | | | |
| | | | | |
| | | | | |
</pre>
Textile:
<pre>
|_.A|_.B|_.C|_.D|_.E|
| | | | | |
| | | | | |
| | | | | |
</pre>
Currently no icon image is set for the button. It is necessary to create a new appropriate icon image.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I made a new icon image.
--------------------------------------------------------------------------------
Hiroyuki ENDO wrote:
> I made a new icon image.
Thank you for making the icon.
The icon looks very nice!
Screenshot when attachment:image.png is applied:
!use-table-icon.png!
Updated the patch to use attachment:image.png as table button icon.
--------------------------------------------------------------------------------
Fixed a patch.
--------------------------------------------------------------------------------
Unfortunately the grid lines of the selection UI are not properly displayed in Firefox.
*Chrome:*
!https://www.redmine.org/attachments/download/24885/Screen%20Shot%202020-02-26%20at%209.32.36%20AM.png!
*Firefox:*
!https://www.redmine.org/attachments/download/24884/Screen%20Shot%202020-02-26%20at%209.27.58%20AM.png!
This seems to be a long running bug of Firefox though: https://bugzilla.mozilla.org/show_bug.cgi?id=688556
There seem to be workarounds, like using <pre>background-clip: padding-box;</pre> on the cells... But then it looks a little bit strange on Chrome on the other hand
--------------------------------------------------------------------------------
Kevin Fischer wrote:
> Unfortunately the grid lines of the selection UI are not properly displayed in Firefox.
Thanks for sharing the information!!
Operation verification on browsers other than Chrome was insufficient.
Since a problem was found not only in Firefox but also in IE11, a patch that solves the problem is attached.
attachment:0002-Firefox-support.patch resolves Firefox by removing *`td { position: relative; }`*.
attachment:0003-IE11-support.patch avoids using repeat function that did not work in IE11.
--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
I really like this patch. Great work!
For the icon, I think "famfamfam":http://www.famfamfam.com/lab/icons/silk/ should be used to stay consistent with the style of other icons in Redmine.
--------------------------------------------------------------------------------
Jan from Planio www.plan.io wrote:
> For the icon, I think "famfamfam":http://www.famfamfam.com/lab/icons/silk/ should be used to stay consistent with the style of other icons in Redmine.
Thank you for the feedback. I think the suggested table icon is better than famfamfam's table icon because famfamfam's table icon looks like a document.
*The suggested icon:*
!{border: 1px solid grey; width: 816px;}.table-icon-1.png!
*famfamfam's table icon:*
!{border: 1px solid grey; width: 816px;}.table-icon-2.png!
--------------------------------------------------------------------------------
I also prefer attachment:image.png.
The famfamfam's icon does not look like a table because each cell is too small to identify.
--------------------------------------------------------------------------------
Committed the patch. Thank you for improving Redmine.
--------------------------------------------------------------------------------
related_issues
relates,Closed,12734,Add table reference to textile help