PluginProbe
Code Snippets / 3.2.1
Code Snippets v3.2.1
3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 3.0.1 All 64 releases
code-snippets / js / types / editor.ts

editor.ts in Code Snippets 3.2.1, at js/types/editor.ts

31 lines 758 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { Editor, EditorConfiguration } from 'codemirror'
2
3 export interface EditorOption {
4 name: string
5 type: 'checkbox' | 'number' | 'select'
6 codemirror: keyof EditorConfiguration
7 }
8
9 export interface CodeEditorInstance {
10 codemirror: Editor
11 settings: CodeEditorSettings
12 }
13
14 export interface CodeEditorSettings {
15 codemirror: EditorConfiguration
16 csslint: Record<string, unknown>
17 htmlhint: Record<string, unknown>
18 jshint: Record<string, unknown>
19 onTabNext: () => void
20 onTabPrevious: () => void
21 onChangeLintingErrors: () => void
22 onUpdateErrorNotice: () => void
23 }
24
25 export interface WordPressUtils {
26 codeEditor: {
27 initialize: (textarea: Element, options?: Partial<CodeEditorSettings>) => CodeEditorInstance
28 defaultSettings: CodeEditorSettings
29 }
30 }
31