Difference between #154 and #155 of
Yii v2 snippet guide

Revision #155 has been created by rackycz on Oct 13, 2019, 11:45:35 AM with the memo:

richtext
« previous (#154) next (#156) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
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: 
7 0
4 followers
Viewed: 274 973 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: a year ago
Update Article

Revisions

View all history