artisansplatform/laravel-app-documentation-editor

Inline-injected Vite-powered document editor package

dev-main 2025-09-10 12:59 UTC

This package is auto-updated.

Last update: 2025-09-10 13:01:08 UTC


README

Tired of switching between tools to update your docs? Our editor brings documentation management right into your Laravel app. Edit markdown files, preview changes instantly, and submit GitHub PRsβ€”all in one sleek interface.

✨ Features

  • πŸ“ Modern Markdown Editor - Rich editing with real-time preview
  • πŸ”„ GitHub Integration - Create pull requests without leaving your app
  • πŸ”’ Flexible Authorization - Control who can edit your documentation
  • πŸ“± Responsive Design - Works beautifully on all devices
  • πŸ—‚οΈ Document Browser - Navigate your project files with ease
  • πŸ‘οΈ Visual Diffs - Compare changes before submitting
  • 🧩 Event System - Hook into editor events from your JavaScript

πŸ“¦ Installation

composer require artisansplatform/laravel-app-documentation-editor

πŸ”— Access URL

https://your-app.com/laravel-app-documentation-editor/documentation

Note: The URL path can be customized in the configuration file using the url_name setting.

βš™οΈ Configuration (Optional)

Publish the configuration file to customize paths, GitHub integration, and access control:

php artisan vendor:publish --provider="Artisansplatform\LaravelAppDocumentationEditor\Providers\LaravelAppDocumentationEditorServiceProvider" --tag="laravel-app-documentation-editor-config"

This creates config/laravel-app-documentation-editor.php where you can set:

  • Document paths
  • GitHub repository details
  • Authorization methods
  • Custom URL name

πŸ”’ Authorization

Control who can edit your documentation using flexible authorization methods:

  • URL Parameters Method - Simple access control via URL parameters
  • Callback Method - Advanced control with custom logic

See detailed authorization documentation

πŸ”„ GitHub Integration

Enable GitHub integration to submit document changes as pull requests:

// In your .env file
LARAVEL_APP_DOCUMENTATION_EDITOR_GITHUB_TOKEN=your_token
LARAVEL_APP_DOCUMENTATION_EDITOR_GITHUB_OWNER=your_username
LARAVEL_APP_DOCUMENTATION_EDITOR_GITHUB_REPOSITORY=your_repo
LARAVEL_APP_DOCUMENTATION_EDITOR_GITHUB_BASE_BRANCH=main

For detailed instructions on creating a GitHub token, see the GitHub Token Creation Guide.

πŸ“‹ Requirements

  • PHP 8.2+
  • Laravel 11.x
  • Composer

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This package is open-sourced software licensed under the MIT license.

✨ Credits

Made with ❀️ by Artisans Platform