Hi all,
Just noticed that Moodle's tinyMCE HTML editor is missing an important feature in its table formatting options: table headers.
See http://www.tinymce.com/develop/bugtracker_view.php?id=4962
Joseph
Hi all,
Just noticed that Moodle's tinyMCE HTML editor is missing an important feature in its table formatting options: table headers.
See http://www.tinymce.com/develop/bugtracker_view.php?id=4962
Joseph
Isn't it tinyMCE in general rather than Moodle's tinyMCE?
A quick albeit partial remedy is to include in the toolbar the 'tablecontrols' (instead of 'table') which adds the most useful table control buttons, one of which is 'cell properties'. Cell properties opens a dialogue in which you can set cell type to 'header', set 'update all cells in row' and update to get a header row. Not quite like one click header row but better than current state.
Hi Itamar, and thanks for your prompt reply.
1.- "Isn't it tinyMCE in general rather than Moodle's tinyMCE?" Yes!
2.- "A ... remedy is to include in the toolbar the 'tablecontrols' (instead of 'table')"
Yes, but... how does one do that? Do I have to hack the tinyMCE files? I do not see a setting for that in Moodle's admin->HTML editor page...
Joseph
Hi Joseph,
in current core moodle 2 tablecontrols are not available in toolbar (they can be added to lib/editor/tinymce/lib.php)
but you can use mouse right click - Table properties over table to change various elements of table or click the Insert table button again and
check (tick) Table caption
It inserts caption tags instead of th tags but they are both valid table elements - see http://www.w3schools.com/tags/tag_caption.asp
AAAAAAAAA | BBBBBBBB |
CCCCCCCC | DDDDDDD |
Edit: I agree that it might be good to have an option to add th tags too - I suppose most users can copy and paste tables with th tags (made elsewhere) or edit html of table or edit the first row of table to make it look like header row (titles for columns) but with core moodle and core tinymce we just need to live with core settings
Mauno "... you can use mouse right click - Table properties over table to change various elements of table..."
I had no idea you could do that! I ought to read the Wiki documentation more carefully at http://docs.moodle.org/22/en/Text_editor.
Thanks a lot, Mauno!
Joseph
EDIT.- I meant the wiki docs at http://docs.moodle.org/22/en/Text_editor
Joseph
If you work with tables in the editor (I use them extensively for question definition) the right click method is just bad.
Try to add or delete a row/column. Right click, move to row option, move to pop up menu, move back to row because you slided out of the row row and the popup menu switched to column's, try again to get to the row's popup menu ...
Alternately, in lib/editor/tinymce/lib.php, around line 143
'theme_advanced_buttons3_add' => "table,|,code,spellchecker",
change to
'theme_advanced_buttons3_add' => "table,tablecontrols,|,code,spellchecker",
This adds a few buttons so if you want it on a separate line you should add something like:
'theme_advanced_buttons4' => "table,tablecontrols",
@Itamar,
Should the change you suggest (adding tablecontrols) not be configurable in Site administration ► Plugins ► Text editors ► TinyMCE HTML editor?
At the moment the only setting you get there is about the Spell checker.
Joseph
Absolutely, like many other things all over moodle that should be configurable in various levels.
Adding buttons to the toolbar, however, requires some consideration. If you add the buttons to an existing bar, the toolbar may be wide and since currently it can't fit itself into narrow containers it will be truncated. If you add more bars, well, you may end up with more toolbar than content box.
Another approach could be a variation on external toolbar. The editor opens with or without a toolbar and you can show/hide the toolbar by a click and the toolbar state persists per session.
"Another approach could be a variation on external toolbar. The editor opens with or without a toolbar and you can show/hide the toolbar by a click and the toolbar state persists per session."
+1