https://github.com/hongyukeji/laravel-simditor
laravel simditor editor
https://github.com/hongyukeji/laravel-simditor
Last synced: 5 months ago
JSON representation
laravel simditor editor
- Host: GitHub
- URL: https://github.com/hongyukeji/laravel-simditor
- Owner: hongyukeji
- Created: 2019-05-18T04:07:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-19T11:41:31.000Z (over 5 years ago)
- Last Synced: 2024-12-31T19:36:12.821Z (6 months ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
laravel-simditor
laravel simditor editor.
## Installing
```shell
$ composer require hongyukeji/laravel-simditor
``````shell
$ php artisan vendor:publish --provider="Hongyukeji\LaravelSimditor\SimditorServiceProvider"
```## Usage
- in your block just put
```
@include('Simditor::assets')
``````html
这里写你的初始化内容
$(document).ready(function() {
var editor = new Simditor({
textarea: $('#editor'),
upload: {
url: '上传图片地址',
params: {
_token: 'Csrf Token'
},
fileKey: 'upload_file',
connectionCount: 3,
leaveConfirm: '文件上传中,关闭此页面将取消上传。'
},
pasteImage: true,
});
});这里写你的初始化内容
$(document).ready(function() {
var editor = new Simditor({
textarea: $('#editor'),
});
});```
- Simditor官方文档: [https://simditor.tower.im/docs/doc-usage.html](https://simditor.tower.im/docs/doc-usage.html)
- 服务器后端返回json格式
```php
echo json_encode([
'success' => true,
'msg' => '图片上传错误信息',
'file_path' => '/upload/2018_10_11/1.jpg'
]);
```## Contributing
You can contribute in one of three ways:
1. File bug reports using the [issue tracker](https://github.com/hongyukeji/laravel-simditor/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/hongyukeji/laravel-simditor/issues).
3. Contribute new features or update the wiki._The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable._
## License
MIT