You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Chore: Mobile: Add additional logging to help debug toolbar issue (#13224)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,9 @@ import { toFileExtension } from '@joplin/lib/mime-utils';
|
||||
import { MarkupLanguage } from '@joplin/renderer';
|
||||
import WarningBanner from './WarningBanner';
|
||||
import useIsScreenReaderEnabled from '../../utils/hooks/useIsScreenReaderEnabled';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
|
||||
const logger = Logger.create('NoteEditor');
|
||||
|
||||
type ChangeEventHandler = (event: ChangeEvent)=> void;
|
||||
type UndoRedoDepthChangeHandler = (event: UndoRedoDepthChangeEvent)=> void;
|
||||
@@ -111,6 +114,7 @@ const useEditorControl = (
|
||||
},
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
execCommand(command, ...args: any[]) {
|
||||
logger.debug('execCommand', command);
|
||||
return editorRef.current.execCommand(command, ...args);
|
||||
},
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ import getSearchState from './utils/getSearchState';
|
||||
import { noteIdFacet, setNoteIdEffect } from './extensions/selectedNoteIdExtension';
|
||||
import jumpToHash from './editorCommands/jumpToHash';
|
||||
import { resetImageResourceEffect } from './extensions/rendering/renderBlockImages';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
|
||||
const logger = Logger.create('CodeMirrorControl');
|
||||
|
||||
interface Callbacks {
|
||||
onUndoRedo(): void;
|
||||
@@ -59,6 +62,8 @@ export default class CodeMirrorControl extends CodeMirror5Emulation implements E
|
||||
commandOutput = super.execCommand(name, ...args);
|
||||
} else if (super.supportsJoplinCommand(name)) {
|
||||
commandOutput = super.execJoplinCommand(name);
|
||||
} else {
|
||||
logger.warn('Unknown command', name);
|
||||
}
|
||||
|
||||
if (name === EditorCommandType.Undo || name === EditorCommandType.Redo) {
|
||||
|
||||
Reference in New Issue
Block a user