Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/super-eggs/tinymce

laravel-admin-tinymce 超级好用的编辑器
https://github.com/super-eggs/tinymce

Last synced: about 1 month ago
JSON representation

laravel-admin-tinymce 超级好用的编辑器

Awesome Lists containing this project

README

        

TinyMCE extension for laravel-admin
======

这是一个`laravel-admin`扩展,用来将`tinyMCE`集成进`laravel-admin`的表单中

## 截图

![截图演示](https://laravel-admin.org/storage/2020/03/12/9JrYt49kWVDtwlYVwbCEOjv6MWHI7hmWhkjW9zdc.png)

## 安装

首先

```composer require super-eggs/laravel-admin-tinymce```

然后

```php artisan vendor:publish --tag=laravel-admin-tinymce```

## 配置

```
'tinymce' => [
// Set to false if you want to disable this extension
'enable' => true,
// Editor configuration
'config' => [
'resize'=> false,
'plugins'=> 'advlist autolink link image lists preview code help fullscreen table autoresize ', // 插件
'toolbar'=> 'undo redo | styleselect | fontsizeselect bold italic | link image blockquote removeformat | indent outdent bullist numlist code', // 配置工具栏
'images_upload_url'=> '/api/v1/images', //图片上传接口 返回格式:{ location : "/demo/image/1.jpg" }
]
]
```
更多配置: http://tinymce.ax-z.cn/ 文档写的非常棒,清晰明了!! (感谢 莫若卿 写的中文文档.)

## 使用

在`form`中使用

```
$form->tinymce('content');
```

## 上传图片

```php
$filetowrite));
```
> 引用自 http://tinymce.ax-z.cn/advanced/php-upload-handler.php

## License

Licensed under The [MIT License (MIT).](https://github.com/super-eggs/tinymce/blob/master/LICENSE)