update: ✨ Editor File API documentation with detailed parameters, properties, methods, and examples#12
Merged
bajrangCoder merged 4 commits intoAcode-Foundation:mainfrom May 29, 2025
Conversation
…perties, methods, and examples Also updates acode.md to add newEditorFile method to the docs
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the Editor File API documentation by adding a new global helper method and expanding the detailed reference for the EditorFile class.
- Introduces
acode.newEditorFile(...)in the global APIs with parameters, version requirements, and example - Overhauls the
EditorFilereference: renames header, links to source, fleshes out parameters, methods, events, examples, and tips
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/global-apis/acode.md | Added newEditorFile docs including version warning, params, return type, example, and stability info |
| docs/editor-components/editor-file.md | Renamed header, added source code tip, fleshed out FileOptions table, methods, events, examples, and updated admonitions |
Comments suppressed due to low confidence (2)
docs/editor-components/editor-file.md:6
- [nitpick] Linking to a specific commit can become outdated. Consider linking to a branch or tagged release to reduce link rot.
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).
docs/editor-components/editor-file.md:22
- Verify that the generated markdown anchor
#neweditorfilefilename-string-options-fileoptions-editorfilematches the heading in the global API file—GitHub’s auto-generated anchors may differ.
You can also use [`acode.newEditorFile(filename, options)`](../global-apis/acode.md#neweditorfilefilename-string-options-fileoptions-editorfile) as an alternative.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates acode.md to add newEditorFile method to the docs.
newEditorFilemethod in acode.md is shown required versionCode as 958 (v1.11.2) Cause it got stable/final around that version.