AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Yii redactor9/21/2023 ![]() 'class' => 'yii\redactor\RedactorModule', Then, we need to modify the module definition for Redactor in /config/web.php: 'modules' => [ To add support for uploading images, we need to create a /web/uploads directory in our tree. So, when you submit the form, you'll see the HTML generated by what we typed and formatted: Adding Image Support to Redactor When we change the standard textarea to use the Yii2 Redactor widget in views/status/_form.php: įield($model, 'message')->textarea() ?>įield($model, 'message')->widget(\yii\redactor\widgets\Redactor::className()) ?> ![]() Let's replace the standard text input field with Redactor. 'redactor' => 'yii\redactor\RedactorModule', In our web/config.php file, we'll add the module definition for Redactor. Installing yiidoc/yii2-redactor (2.0.0) Updating dependencies (including require-dev) Loading composer repositories with package information We'll begin by installing a Yii2 extension for Redactor ( yii2-redactor) using composer: Admins-MBP:hello Jeff$ composer require -prefer-dist yiidoc/yii2-redactor "*" You might also take a look at the tutorial I've written on Squire, an alternative, more lightweight rich text editor, which can also be integrated with Yii. With Yii2, you can install Redactor and integrate rich text editing into your forms in just a few minutes. It has an extremely clean and fast user interface, while also providing a platform for powerful extensions. It offers a JQuery API and has a wide set of plugins such as for image management, table formatting, and fullscreen editing.įortunately, the Yii community purchased an unlimited license to Redactor for any application built on the framework. Redactor is a powerful rich text editor created by Imperavi. I'm especially interested if you have different approaches or additional ideas, or if you want to suggest topics for future tutorials. Just a reminder, I do participate in the comment threads below. ![]() In this tutorial, I'm going to introduce you to using the rich text editor Redactor within the Yii Framework.įor these examples, we'll continue to imagine we're building a framework for posting simple status updates, e.g. In this Programming With Yii2 series, I'm guiding readers in use of the newly upgraded Yii2 Framework for PHP. ![]() ![]() It seems that we have a little bit of mess with Redactor (or am I the only one that sees things like that?) and it would be nice to clean things out.If you're asking, "What's Yii?" check out my earlier tutorial: Introduction to the Yii Framework, which reviews the benefits of Yii and includes an overview of what's new in Yii 2.0, released in October 2014. It would be nice, if other extensions authors would decide / inform users on their extension’s websites, whether they’re going to continue their work on their own versions of extensions or stop development, use their time to further develop “official” extension and place some info on extension’s website. Which one is official, which one will be supported and further developed in the future and therfore – which one new projects should use?Īre other (than official?) extensions also covered by OEM license purchased by the community? It seems that we have THREE Redactor extensions: Many thanks to all, who donated to buying this license!Ĭan someone explain, which version of Redactor extension is official one, supported by community after buying OEM license? Now we have OEM license and here’s an extension: ![]()
0 Comments
Read More
Leave a Reply. |