You've already forked joplin
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:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user