zencoreitservices/laravel-editor-js
最新稳定版本:v1.0.9
Composer 安装命令:
composer require zencoreitservices/laravel-editor-js
包简介
Package converts editorjs blocks into html.
README 文档
README
Install
- Install package
composer require zencoreitservices/laravel-editor-js
- Add provider in
config/app.php
LaravelEditorJs\LaravelEditorJsProvider::class
Configuration
Publish config
artisan vendor:publish --tag=laravel-editor-js-config
Publish views
artisan vendor:publish --tag=laravel-editor-js-views
Publish translation
artisan vendor:publish --tag=laravel-editor-js-lang
Add routes
Route::get('/fetch-url', function(\Illuminate\Http\Request $request){ return response()->json(LaravelEditorJs\Misc\UrlFetcher::fetch($request)); }); Route::post('/upload-file', function(\Illuminate\Http\Request $request){ return response()->json(LaravelEditorJs\Misc\FileUpload::upload($request)); }); Route::post('/fetch-url-image', function(\Illuminate\Http\Request $request){ return response()->json(LaravelEditorJs\Misc\FileUpload::fetchImage($request)); });
Usage
Convert blocks into HTML
$blocksManager = new \LaravelEditorJs\BlocksManager($data); $html = $blocksManager->renderHtml();
统计信息
- 总下载量: 4.54k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-16