1
0
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:
Henry Heino
2025-11-17 14:06:42 -08:00
committed by GitHub
parent ad4a8aa76d
commit bd569b9d8d
9 changed files with 93 additions and 15 deletions

View File

@@ -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'),