forked from xbzbing/Yii2-UEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UEditorAsset.php
executable file
·63 lines (54 loc) · 1.23 KB
/
UEditorAsset.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* UEditor Widget扩展
*
* @author xbzbing<xbzbing@gmail.com>
* @link www.crazydb.com
*
* UEditor版本v1.4.3.1
* Yii版本2.0+
*/
namespace crazydb\ueditor;
use yii;
use yii\web\AssetBundle;
/**
* Class UEditorAsset
* 负责UEditor的资源文件引入。
* 由于bower上的源码是纯源码,需要用grunt打包后才能使用,因此扩展自带了1.4.3版本的UEditor核心文件。
*
* @package crazydb\ueditor
*/
class UEditorAsset extends AssetBundle {
/**
* UEditor路径
* @var
*/
public $sourcePath;
/**
* UEditor加载需要的JS文件。
* ueditor.config.js中是默认配置项,不建议直接引入。
* @var array
*/
public $js = [
'ueditor.all.min.js',
];
/**
* UEditor加载需要的CSS文件。
* UEditor 会自动加载默认皮肤,CSS这里不必指定
*
* @var array
*/
public $css = [];
public $publishOptions = [
'except' => [
'php/',
'index.html',
'.gitignore'
]
];
public function init() {
parent::init();
if($this->sourcePath == null)
$this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'assets';
}
}