2023-06-14 15:56:14 +02:00
|
|
|
export interface TinyMceCommand {
|
|
|
|
name: string;
|
2024-04-05 13:16:49 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
2023-06-14 15:56:14 +02:00
|
|
|
value?: any;
|
|
|
|
ui?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface JoplinCommandToTinyMceCommands {
|
|
|
|
[key: string]: TinyMceCommand | boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If the mapping is simply `true` it means that the command is supported via
|
|
|
|
// useWindowCommandHandlers.ts. We still add it here to have the complete list
|
|
|
|
// of supported commands.
|
|
|
|
export const joplinCommandToTinyMceCommands: JoplinCommandToTinyMceCommands = {
|
|
|
|
'textBold': { name: 'mceToggleFormat', value: 'bold' },
|
|
|
|
'textItalic': { name: 'mceToggleFormat', value: 'italic' },
|
|
|
|
'textCode': { name: 'mceToggleFormat', value: 'code' },
|
|
|
|
'textLink': { name: 'mceLink' },
|
2024-06-10 23:26:14 +02:00
|
|
|
'textBulletedList': { name: 'InsertUnorderedList' },
|
|
|
|
'textNumberedList': { name: 'InsertOrderedList' },
|
2023-06-14 15:56:14 +02:00
|
|
|
'search': { name: 'SearchReplace' },
|
|
|
|
'attachFile': { name: 'joplinAttach' },
|
|
|
|
'insertDateTime': true,
|
|
|
|
};
|