1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop,Mobile: Plugins: Simplify getting the ID of the note open in an editor (#11841)

This commit is contained in:
Henry Heino
2025-02-17 04:08:48 -08:00
committed by GitHub
parent b870f8344c
commit 316ef9d960
16 changed files with 182 additions and 12 deletions

View File

@@ -41,6 +41,7 @@ const logger = Logger.create('NoteEditor');
interface Props {
themeId: number;
initialText: string;
noteId: string;
initialSelection?: SelectionRange;
style: ViewStyle;
toolbarEnabled: boolean;
@@ -383,7 +384,12 @@ function NoteEditor(props: Props, ref: any) {
const initialText = ${JSON.stringify(props.initialText)};
const settings = ${JSON.stringify(editorSettings)};
window.cm = codeMirrorBundle.initCodeMirror(parentElement, initialText, settings);
window.cm = codeMirrorBundle.initCodeMirror(
parentElement,
initialText,
${JSON.stringify(props.noteId)},
settings
);
${setInitialSelectionJS}