Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ghost-die/ckeditor
CKEditor 5 集成laravel-admin
https://github.com/Ghost-die/ckeditor
Last synced: 6 days ago
JSON representation
CKEditor 5 集成laravel-admin
- Host: GitHub
- URL: https://github.com/Ghost-die/ckeditor
- Owner: ghost-die
- License: mit
- Created: 2020-01-06T12:06:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T15:58:29.000Z (over 4 years ago)
- Last Synced: 2024-09-25T23:28:54.022Z (about 1 month ago)
- Language: CSS
- Size: 1.21 MB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-laravel-admin - CKEditor5 - 具有模块化结构体系的 JavaScript 编辑器 (扩展包 / 字段类扩展包)
README
CKEditor 5 集成laravel-admin
======## Installation
```bash
composer require ghost/ckeditor
```Then
```bash
php artisan vendor:publish --tag=ghost-ckeditor
```## Configuration
In the `extensions` section of the `config/admin.php` file, add some configuration that belongs to this extension.
```php'ckeditor' => [
//Set to false if you want to disable this extension
'enable' => true,
// Editor configuration
'config' => [
"simpleUpload"=>[
"uploadUrl"=>'/admin/uploads'
],
"fontSize" => [
"options" =>[
9,
11,
13,
'default',
17,
19,
21
]
],
"toolbar"=>[
"items"=>[
'heading',
'fontFamily',
'fontSize',
'fontColor',
'fontBackgroundColor',
'bold',
'italic',
'link',
'bulletedList',
'numberedList',
'|',
'indent',
'outdent',
'|',
'imageUpload',
'blockQuote',
'insertTable',
'mediaEmbed',
'undo',
'redo'
]
],
'image'=>[
'toolbar'=>['imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight'],
'resizeUnit'=>'px',
'styles'=>[
// This option is equal to a situation where no style is applied.
'full',
'side',
// This represents an image aligned to the left.
'alignLeft',
'alignCenter',
// This represents an image aligned to the right.
'alignRight'
]
],
"table" =>[
'contentToolbar'=>[
'tableColumn',
'tableRow',
'mergeTableCells'
]
],
'language'=>'zh-cn',
]
]```
## Usage
```php
Form::extend('editor', \ghost\CKEditor\Editor::class);
```