You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-20 23:30:05 +02:00
Mobile: Rich Text Editor: Add button for creating tables (#13645)
This commit is contained in:
@@ -9,6 +9,12 @@ const markdownEditorOnlyCommands = [
|
||||
EditorCommandType.SwapLineDown,
|
||||
].map(command => `editor.${command}`);
|
||||
|
||||
|
||||
|
||||
const richTextEditorOnlyCommands = [
|
||||
EditorCommandType.InsertTable,
|
||||
].map(command => `editor.${command}`);
|
||||
|
||||
export const visibleCondition = (commandName: string) => {
|
||||
const output = [];
|
||||
|
||||
@@ -16,6 +22,10 @@ export const visibleCondition = (commandName: string) => {
|
||||
output.push('!richTextEditorVisible');
|
||||
}
|
||||
|
||||
if (richTextEditorOnlyCommands.includes(commandName)) {
|
||||
output.push('!markdownEditorPaneVisible');
|
||||
}
|
||||
|
||||
return output.join(' && ');
|
||||
};
|
||||
|
||||
@@ -102,6 +112,11 @@ const declarations: CommandDeclaration[] = [
|
||||
label: () => _('Task list'),
|
||||
iconName: 'material format-list-checks',
|
||||
},
|
||||
{
|
||||
name: `editor.${EditorCommandType.InsertTable}`,
|
||||
label: () => _('Table'),
|
||||
iconName: 'material table',
|
||||
},
|
||||
{
|
||||
name: EditorCommandType.IndentLess,
|
||||
label: () => _('Decrease indent level'),
|
||||
|
||||
Reference in New Issue
Block a user