Revision #155 was created by rackycz on Oct 13, 2019, 11:45:35 AM.
richtext
Content
[...]
If you want to allow user to enter html-formatted text, you need to use some HTML wysiwyg editor, because ordinary TextArea can only work with plain text. It seems to me that [Summernote](https://summernote.org/getting-started/#simple-example) is the simplest addon available:
```javascript
// Add following code to file layouts/main.php ..
// But make sure jquery is already loaded !!
// - Read aboveut this topic in chapter "Adding a google-like calendar"
<!-- include summernote css/js -->
[...]
```
iOn this tutorialpage I showed how to save Contacts inqueries into database. If you want to use thise richtechxt editor in this section, open view contasct/\_form.php and just add this JS code:
```javascript
[...]
'attributes' => [
// ...
'body:html', // html
],
])
```
... to discover all possible formatters, check all asXXX() functions on [this](https://www.yiiframework.com/doc/api/2.0/yii-i18n-formatter) page: