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
Copy file name to clipboardExpand all lines: docs/editor-components/editor-file.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
The Editor File API provides functionality to create, manage, interact with files/tabs in the Acode editor. It handles file operations, state management, editor session control, custom editor tab, etc.
4
4
5
5
::: tip
6
-
This API is defined in the [Acode source code (src/lib/editorFile.js)](https://github.com/Acode-Foundation/Acode/blob/52bf3a59c4aebe422d8cfdecf5c85191ed6f6004/src/lib/editorFile.js).
6
+
This API is defined in the [Acode source code (src/lib/editorFile.js)](https://github.com/Acode-Foundation/Acode/blob/228a339296a3869fff7ff84e0898378a438931b8/src/lib/editorFile.js).
7
7
:::
8
8
9
9
## Import
@@ -68,6 +68,7 @@ Both methods are equivalent and accept & return the same parameters.
68
68
| uri |`string`| File location on the device |
69
69
| eol |`'windows' \| 'unix'`| End of line character |
70
70
| editable |`boolean`| Whether file can be edited |
71
+
| pinned |`boolean`| Whether the file is pinned |
71
72
| isUnsaved |`boolean`| Whether file has unsaved changes |
72
73
| name |`string`| File name (for plugin compatibility) |
73
74
| cacheFile |`string`| Cache file URL |
@@ -90,6 +91,7 @@ Both methods are equivalent and accept & return the same parameters.
90
91
| uri |`string`| Set file location |
91
92
| eol |`'windows' \| 'unix'`| Set end of line character |
92
93
| editable |`boolean`| Set file editability |
94
+
| pinned |`boolean`| Set file pinned state |
93
95
| readOnly |`boolean`| Set file readonly state |
94
96
95
97
## Methods
@@ -110,11 +112,18 @@ Saves the file to a new location.
Updates Pinned State for the file, triggers reorder (if true), emits Events (editorManager `update` event with `pin-tab` as the first argument and affected File - second argument )
0 commit comments