You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4f4366e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/editor-components/editor-file.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,11 @@ Both methods are equivalent and accept & return the same parameters.
52
52
| content | string \|[HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement)| Custom content element or HTML string. Strings are sanitized using DOMPurify | - |
53
53
| stylesheets |`string\|string[]`| Custom stylesheets for tab. Can be URL, or CSS string | - |
54
54
| hideQuickTools |`boolean`| Whether to hide quicktools for this tab |`false`|
55
+
| pinned |`boolean`| Pin the tab to prevent accidental closing |`false`|
56
+
| readOnly |`boolean`| Open the file as read-only |`false`|
Copy file name to clipboardExpand all lines: docs/global-apis/ace.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ This page exists for plugin migration from Ace-era APIs.
10
10
- Use `acode.require("commands")` for command registration/removal.
11
11
- Use `acode.require("editorLanguages")` to register or remove language modes.
12
12
- Use `acode.require("editorThemes")` to register or apply editor themes.
13
+
- Use `acode.require("codemirror")` (or `@codemirror/*` / `@lezer/*`) for the same CodeMirror packages the app uses — see [CodeMirror packages](../utilities/codemirror.md).
13
14
- Use `editorManager.isCodeMirror` to check whether current acode uses codemirror or ace, if its true then its codemirror and if it is null or undefined then its ace.
The `editorManager` allows to interact with the Editor Instance and listen to various events of Acode app with the help of various methods and Properties. Basically for interacting with the opened files and tabs.
5
+
The `editorManager` allows you to interact with the editor instance and listen to app-level editor events. Use it for open files/tabs, multi-pane layout, and the active CodeMirror view.
6
6
7
-
## Methods and Properties
7
+
## Core properties
8
8
9
9
### `editor`
10
-
This is the active **CodeMirror `EditorView`** instance.
10
+
11
+
Active **CodeMirror `EditorView`** for the focused pane.
Copy file name to clipboardExpand all lines: docs/ui-components/dialogs/color-picker.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,28 @@ In this example, the color picker dialog box will open with the default color se
28
28
29
29
## Returns
30
30
31
-
The `colorPicker` component returns a promise that resolves to a string representing the `selected color`. This color can then be used in your plugin based on user input.
31
+
The `colorPicker` component returns a promise that:
32
+
33
+
-**resolves** to a string representing the selected color (hex / rgb / hsl, including alpha when used)
34
+
-**rejects** with `Error("cancelled")` when the user taps Cancel, the mask, or otherwise dismisses the dialog
35
+
36
+
The dialog also includes a format toggle (HEX / RGB / HSL).
In this example, the `colorPicker` component is used to open a color picker dialog box with the default color set to red. The selected color is then logged to the console, demonstrating how to retrieve and utilize the user's color selection.
55
+
In this example, the `colorPicker` component opens with red as the default. The selected color is logged, or cancellation is handled explicitly.
0 commit comments