Yii Framework Forum: Jodit Editor in Yii2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Jodit Editor in Yii2 Use WYSIWYG Editor in Yii2 with perfect FileBrowser Rate Topic: ***** 1 Votes

#1 User is offline   xdan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 16-February 18

Posted 13 March 2018 - 11:37 AM

Hello. I've been writing an editor for two years now and finally a stable version appeared.
Attached File  Clip2net_180313213741.jpg (88.62K)
Number of downloads: 2
The editor is easy to set up and very functional. There is even an image editor built-in. Plus a convenient file browser.

It's time to add integration and first of all made the integration with Yii2

This module and 2 widgets: the editor itself and the image peeker.

composer require --prefer-dist jodit/yii2-jodit


Then add the module to the config
'modules' => [
'jodit' => 'yii2jodit\JoditModule',
],


And in the templates you can connect widgets
echo $form->field($model, 'content')->widget(\yii2jodit\JoditWidget::className(), [
    'settings' => [
        'buttons'=>[
            'bold', 'italic', 'underline', '|', 'ul', 'ol', '|', 'image', '|', 'hr',
        ],
    ],
]);;



IconPicker
echo $form->field($model, 'icon')->widget(\yii2jodit\JoditIconPickerWidget::className(), [
    "path" => 'wp-content/plugins/exchangers-monitor/images/systemlogo'
]);


looks like that
Attached File  iconpicker.jpg (33.05K)
Number of downloads: 2

The editor himself is an npm package and is being updated almost every day.

yii2-jodit is distributed under the MIT license and is absolutely free, as the Jodit license allows you to use the editor for free in Open Source projects.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users