Skip to content
This repository was archived by the owner on Aug 22, 2021. It is now read-only.

Commit 2161b39

Browse files
committed
Update README.
1 parent 023a7cc commit 2161b39

File tree

2 files changed

+30
-27
lines changed

2 files changed

+30
-27
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
/vendor
33
/coverage
44
sftp-config.json
5-
composer.lock
65
.subsplit
76
.php_cs.cache

README.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,52 @@ UEditor integration for Laravel 5.
77
## 安装
88

99
```shell
10-
composer require "overtrue\laravel-ueditor"
10+
$ composer require "overtrue/laravel-ueditor:~1.0"
1111
```
1212

1313
## 配置
1414

15-
1. 添加下面一行到 `config/app.php``providers` 部分:
15+
1. 添加下面一行到 `config/app.php` 中 `providers` 部分:
1616

17-
```php
18-
Overtrue\LaravelUEditor\UEditorServiceProvider::class,
19-
```
17+
```php
18+
Overtrue\LaravelUEditor\UEditorServiceProvider::class,
19+
```
2020

21-
2. 发布配置文件与资源
21+
2. 发布配置文件与资源
2222

23-
```php
24-
php artisan vendor:publish
25-
```
23+
```php
24+
php artisan vendor:publish
25+
```
2626

27-
3. 模板引入编辑器
27+
3. 模板引入编辑器
2828

29-
```php
30-
@include('vendor.ueditor.assets')
31-
```
29+
> 这行的作用是引入编辑器需要的 css,js 等文件,所以你不需要再手动去引入它们。
3230

33-
4. 编辑器的初始化
31+
```php
32+
@include('vendor.ueditor.assets')
33+
```
3434

35-
```html
36-
<!-- 实例化编辑器 -->
37-
<script type="text/javascript">
38-
var ue = UE.getEditor('container');
39-
ue.ready(function() {
40-
ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
41-
});
42-
</script>
35+
4. 编辑器的初始化
4336

37+
```html
38+
<!-- 实例化编辑器 -->
39+
<script type="text/javascript">
40+
var ue = UE.getEditor('container');
41+
ue.ready(function() {
42+
ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
43+
});
44+
</script>
45+
@stop
4446

45-
<!-- 编辑器容器 -->
46-
<script id="container" name="content" type="text/plain"></script>
47-
```
47+
<!-- 编辑器容器 -->
48+
<script id="container" name="content" type="text/plain"></script>
49+
```
4850

4951
# 说明
5052

51-
TODO
53+
上传路径在:`public/uploads/` 下,确认该目录存在并可写。
54+
55+
如果要修改上传路径,请在 `config/ueditor.php` 里各种类型的上传路径,但是都在 public 下。
5256

5357
# License
5458

0 commit comments

Comments
 (0)