File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,13 @@ public function init()
2121 {
2222 $ postfix = YII_DEBUG ? '' : '.min ' ;
2323
24- if (isset (Yii::$ app ->params ['bsVersion ' ]) && Yii::$ app ->params ['bsVersion ' ] == 4 ) {
24+ if (isset (Yii::$ app ->params ['bsVersion ' ]) && substr (Yii::$ app ->params ['bsVersion ' ], 0 , 1 ) == '5 ' ) {
25+ $ this ->depends = ['yii\bootstrap5\BootstrapPluginAsset ' ];
26+ $ this ->css [] = 'summernote-bs5 ' . $ postfix . '.css ' ;
27+ $ this ->js [] = 'summernote-bs5 ' . $ postfix . '.js ' ;
28+ } elseif (isset (Yii::$ app ->params ['bsVersion ' ]) && substr (Yii::$ app ->params ['bsVersion ' ], 0 , 1 ) == '4 ' ) {
2529 $ this ->depends = ['yii\bootstrap4\BootstrapPluginAsset ' ];
26- $ this ->css [] = 'summernote-bs4.css ' ;
30+ $ this ->css [] = 'summernote-bs4 ' . $ postfix . ' .css ' ;
2731 $ this ->js [] = 'summernote-bs4 ' . $ postfix . '.js ' ;
2832 } else {
2933 $ this ->depends = ['yii\bootstrap\BootstrapPluginAsset ' ];
You can’t perform that action at this time.
0 commit comments