Skip to content

Commit a9c753d

Browse files
author
Igor Chepurnoy
committed
added configuration example for froala widget to README
1 parent a89753f commit a9c753d

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,30 @@ public function actions()
9494

9595
## Features:
9696

97-
1. Markdown Editor support:
97+
1. By default this extension use the `froala editor` for manage cms pages, you can change editor configuration by the following code:
98+
99+
> List of options: https://www.froala.com/wysiwyg-editor/docs/options
100+
101+
> Configuration example: https://github.com/froala/yii2-froala-editor#usage
102+
103+
```php
104+
'modules' => [
105+
'cms' => [
106+
'class' => 'yii2mod\cms\Module',
107+
'froalaEditorOptions' => [
108+
// your custom configuration
109+
'clientPlugins' => [
110+
],
111+
'clientOptions' => [
112+
]
113+
'excludedPlugins' => [
114+
],
115+
],
116+
],
117+
],
118+
```
119+
120+
2. Markdown Editor support:
98121
```php
99122
'modules' => [
100123
'cms' => [
@@ -108,7 +131,7 @@ public function actions()
108131
],
109132
```
110133

111-
2. You can insert your own widget on the page by the following steps:
134+
3. You can insert your own widget on the page by the following steps:
112135

113136
- Create the widget, for example:
114137

@@ -147,7 +170,7 @@ class MyWidget extends Widget
147170
[[\app\widgets\MyWidget:show]]
148171
```
149172

150-
3. You can use parameters in your page content, for example: {siteName}, {homeUrl}. For parsing this parameters you can use the `baseTemplateParams` property:
173+
4. You can use parameters in your page content, for example: {siteName}, {homeUrl}. For parsing this parameters you can use the `baseTemplateParams` property:
151174

152175
```php
153176
public function actions()
@@ -164,7 +187,7 @@ public function actions()
164187
}
165188
```
166189

167-
4. You can change comments module settings by the following code:
190+
5. You can change comments module settings by the following code:
168191

169192
```php
170193
public function actions()

0 commit comments

Comments
 (0)