mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Desktop: Change codemirror to user import syntax (#3375)
This commit is contained in:
parent
845ecfe742
commit
3a7a068196
@ -69,6 +69,7 @@ ElectronClient/gui/NoteEditor/NoteBody/AceEditor/Toolbar.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/utils/index.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/utils/types.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/utils/useListIdent.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/codemirror.d.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -59,6 +59,7 @@ ElectronClient/gui/NoteEditor/NoteBody/AceEditor/Toolbar.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/utils/index.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/utils/types.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/utils/useListIdent.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/codemirror.d.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/CodeMirror.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Editor.js
|
||||
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/styles/index.js
|
||||
|
@ -1,5 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import { useEffect, useImperativeHandle, useState, useRef, useCallback, forwardRef } from 'react';
|
||||
|
||||
import * as CodeMirror from 'codemirror';
|
||||
|
||||
import 'codemirror/addon/comment/comment';
|
||||
import 'codemirror/addon/dialog/dialog';
|
||||
import 'codemirror/addon/edit/closebrackets';
|
||||
@ -25,8 +28,6 @@ import 'codemirror/mode/clike/clike';
|
||||
import 'codemirror/mode/diff/diff';
|
||||
import 'codemirror/mode/sql/sql';
|
||||
|
||||
const CodeMirror = require('codemirror');
|
||||
|
||||
export interface CancelledKeys {
|
||||
mac: string[],
|
||||
default: string[],
|
||||
|
4
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/codemirror.d.ts
vendored
Normal file
4
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/codemirror.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// Declare codemirror module so that we can import it using the import syntax.
|
||||
// This also means it will implicitly have the any type, which is necessary because
|
||||
// of the flexible manner that codemirror is made https://discuss.codemirror.net/t/basic-codemirror-configuration-in-typescript-project/2047/2
|
||||
declare module 'codemirror';
|
Loading…
Reference in New Issue
Block a user