mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Desktop: Configure RTE to handle the first table row as header (#10059)
This commit is contained in:
parent
3c10282848
commit
be2f4d3d79
@ -593,7 +593,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
'h1', 'h2', 'h3', '|',
|
||||
'hr', '|',
|
||||
'blockquote', '|',
|
||||
'table', '|',
|
||||
'tableWithHeader', '|',
|
||||
`joplinInsertDateTime${toolbarPluginButtons}`,
|
||||
];
|
||||
|
||||
@ -683,6 +683,22 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
},
|
||||
});
|
||||
|
||||
editor.ui.registry.addMenuButton('tableWithHeader', {
|
||||
icon: 'table',
|
||||
tooltip: 'Table',
|
||||
fetch: (callback) => {
|
||||
callback([
|
||||
{
|
||||
type: 'fancymenuitem',
|
||||
fancytype: 'inserttable',
|
||||
onAction: (data) => {
|
||||
editor.execCommand('mceInsertTable', false, { rows: data.numRows, columns: data.numColumns, options: { headerRows: 1 } });
|
||||
},
|
||||
},
|
||||
]);
|
||||
},
|
||||
});
|
||||
|
||||
editor.ui.registry.addButton('joplinInsertDateTime', {
|
||||
tooltip: _('Insert time'),
|
||||
icon: 'insert-time',
|
||||
|
Loading…
Reference in New Issue
Block a user