PHP code example of zencoreitservices / laravel-editor-js

1. Go to this page and download the library: Download zencoreitservices/laravel-editor-js library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zencoreitservices / laravel-editor-js example snippets


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));
});

$blocksManager = new \LaravelEditorJs\BlocksManager($data);
$html = $blocksManager->renderHtml();