Yii-RedactorJS-Widget
Yii Widget for the WYSIWYG RedactorJS editor
Requirements
Installation
Usage
$this->widget('application.widgets.redactorjs.Redactor', array( 'model' => $model, 'attribute' => 'some_attribute' ));
$this->widget('application.widgets.redactorjs.Redactor', array( 'lang' => 'de', 'toolbar' => 'mini', 'model' => $model, 'attribute' => 'some_attribute' ));
$this->widget('application.widgets.redactorjs.Redactor', array( 'editorOptions' => array('autoresize' => true, 'fixed' => true), 'model' => $model, 'attribute' => 'some_attribute' ));
$this->widget('application.widgets.redactorjs.Redactor', array( 'name' => 'some name', 'value' => 'some value' ));
Authors
Vincent Gabriel http://vadimg.com
Total 20 comments
This contains redactor v7.6.1. Should be updated because it contains some bugs.
Vince, will you update this extension?
Take a look at http://www.yiiframework.com/news/64/redactor-is-oem-licensed-for-yii/
Text from official form site FAQ:
Can I use Redactor in my project, which is published under GPL, MIT, BSD, or other open-source/copyleft license?
Yes, go ahead! You just need to purchase the OEM license. No additional fees will be applied and there are no special terms or conditions, until Redactor is properly "linked" in your software.
However, keep in mind that Redactor is not an open-source product. It is proprietary commercial copyrighted software and we do not allow it's distribution under any open-source licenses. Think about Redactor as if it was a paid proprietary extension for your project.
imperavi.com/redactor/faq/
Looks like we can't use it without puscashing licence.
This editor not works in Firefox.
It always gives me Ajax security alert like
Any ideas? Thanks so much for this great contribution
hi to all! How a can edit toolbar buttons? I want remove some buttons, but i can do it. How to use array 'editorOptions' for my problem? thx
Could somebody please provide example for Image Upload/Choose Script? Need ASAP. Thanks.
Its very cool and easy to integrate but the deal is with imageupload, file upload and all functionality. It would be great if you can provide an example with the code.
Hi Thanks for the great extension it works fine in a normal page load context but doesn't work if the widget sits in an ajax rendered view any idea what could be added to solve this ?
how to enter editorOptions imageUpload and fileUpload correctly?
'editorOptions' => array('imageUpload' => '/testscript/image_upload.php')
always give result prepended with backslash on path
$('#editor').redactor({"imageUpload":"\/testscript\/image_upload.php"
And here is an example for outputting the JSON used to show the image previews of already uploaded images. Again, simplified. It doesn't check whether a file really is an image, so you may wanna add checks so that it doesn't try to show an pdf file or something like that :)
Hope it helps a bit
I use something like that for image uploads. Image is a CFormModel where file is specified with a "file" validator only allowing image files to be accepted. This is a bit simplified. Maybe checking the filenames before using them would be more secure but you get the idea
Very cool extension. And easy to run.
An example on how we can use the upload feature would be awesome.
Thanks for your work. Didn't know about redactor but this is a beautiful editor. It would be really cool to enable image uploads via a CAction that could be plugged into the controller of choice to make image uploads as easy as possible. But this is just a suggestion.
Thanks again!
It's also not free for commercial use (not that it's anything wrong with that, just so you know beforehand)
That's not my website, I just created the extension for that editor.
It looks really good, but could you please add some internationalization on your website? A lot of your pages are in russian and I prefer not to use Chrome auto-translate. ;)
@yiqing95, apparently you can.. See: http://redactorjs.com/docs/toolbar/
To be honest i can't read russian either. But from their website in English i was able to check out their road map which states that the next thing is Plugin Support.
http://redactorjs.com/en/roadmap/
beautiful editor and can works well with the fancybox and jqueryUi dialog . but the doc is Russian ; so does it support custom toolbar button (add custom button and functionality ,some times these will named editor plugin)
Leave a comment
Please login to leave your comment.