Skip to content

update: ✨ Editor File API documentation with detailed parameters, properties, methods, and examples #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

UnschooledGamer
Copy link
Collaborator

Updates acode.md to add newEditorFile method to the docs.

newEditorFile method in acode.md is shown required versionCode as 958 (v1.11.2) Cause it got stable/final around that version.

…perties, methods, and examples

Also updates acode.md to add newEditorFile method to the docs
@UnschooledGamer UnschooledGamer self-assigned this May 29, 2025
@UnschooledGamer UnschooledGamer added documentation Improvements or additions to documentation enhancement New feature or request labels May 29, 2025
@bajrangCoder bajrangCoder requested a review from Copilot May 29, 2025 16:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EditorFile reference: 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-editorfile matches 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.

@bajrangCoder bajrangCoder merged commit d73c2dd into Acode-Foundation:main May 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants