I won't be able to update this extension for a while. If any contributor want to help me, please send me a inbox message on forum. Thanks.
I already found this extension here but I made one more simple.
Yii 1.1 or above.
en-US
Unpack the contents under the desired folder.
For beginners probably it will be '/protected/extensions'.
pt-BR
Descompacte o conteúdo do arquivo na pasta desejada.
Para iniciantes provavelmente será 'protected/extensions'.
Simple usage $this->widget('application.extensions.cleditor.ECLEditor', array( 'name'=>'field', )); With models $this->widget('application.extensions.cleditor.ECLEditor', array( 'model'=>$model, 'attribute'=>'fieldName', //Model attribute name. Nome do atributo do modelo. 'options'=>array( 'width'=>'600', 'height'=>250, 'useCSS'=>true, ), 'value'=>$model->fieldName, //If you want pass a value for the widget. I think you will. Se você precisar passar um valor para o gadget. Eu acho irá. ));
en-US
* CLEditor resource page. Plese follow to see available options.
* Try out a demo, from author plugin.
* Discussion & Bug report.
pt-BR
* CLEditor. Siga este link para ver as opções disponives.
* Demonstração, página do plugin do autor com exemplo.
* Discussão e Relato de Erros.
Total 20 comments
Each time one is normal and other editors changes back to text area.
@jiaming:
I was looking around for this and found that you can use: 'output_attribute:html' // to display 'output_attribute' field in html
..if you are using CDetailed view for outputting
thanks for the help but i think the problem is the following:
Have you guys tried to render multiple textareas point to the SAME attributes in the SAME model? (even different model->id)
Your example shows 2 CLEditor for 2 attributes. Try for one, then you will find that the second one is not working....
Again,thanks so much for your help! I already post this problem in the forum of the link you gave to me.
Hey go to forum insted and place your view code there so I can try help you out.
http://www.yiiframework.com/forum/index.php/topic/13121-ecleditor-extension/
@huanito, Thanks for your help. But unfortunately, my case is different and your code is not working for me.
I am using kinda like a "fast reply system". Like yii's blog demo. But i have the same form.php rendered multiple times in the same page. (to fast reply different posts).
In this case, if i simply change my form.php 's textarea into Cleditor, only the first "fast reply textarea" is cleditor, others still are textareas...
I believe it's because of javascript conflicts, but i tried to only register them once in the layout, still not work.
@jiaming works for me, two cleditors on same page, here is my view relevant parts
Looks like it not support multiple editors at the same page. Each time i did this, one is normal and other editors changes back to text area.
Any solutions? Thanks
Hi this extension is great and work fine for most of things but I want to add some parameter as something like
in the section where the is drop down list of
So that my content get my layout with out any difficulties.
If any one done before than please help me out.
Thank you.
If you're like me and got a problem that displays the HTML tags when using this editor make sure you don't use the CHTML::encode designed for yii. instead just use
Not sure what it is (security?) but the CHTML::encode with CKEDITOR displays tags as text.
Excellent extension... But i do have a question about the output.
I always get things like this (SPAN)..........(/SPAN) (sorry i can't put html here)
So it HTML.
How can I change the output so I can directly see my input?(instead the code above)
Took me longer to think about what I wanted than to implement this thing. Thanks for this extension and the excellent code snippet.
Congratulations, this works and it's very easy to use.
This is a great extension for Yii and i use in all my projects.
Don't forget to add something like
to your model validation rules. This will keep all legal formatting, but remove any malicious code.
More details.
Extensão fantástica. Parabéns pelo trabalho.
Thank you. I liked it very much :)
piece of code :)
thanks!
thanks a lot, i'm going to use this thing a lot!
I've noticed some bugs using this extension in Internet Explorer. HTML tags added for formatting are upper-case (which make them not compatibile with XHTML) and in some situations a strange behaviour appears. For example - paragraphs (p) are inserted instead of line breaks (br) which makes the very same text entered to the same editor under IE and FF look differently on page, because, when entered using IE it is encoded differently than when entering under FF.
I'm pretty sure that this is caused by JavaScript code, not by Yii Extension itself. But just wanted to ask if others has the same experience using this extension / editor under Internet Explorer?
Hi again,
Is there any way to add shortcuts catching to this editor, so for example Ctrl+B would turn on bold mode, Ctrl+I - italics, and so on, just as it is done in forum editor, when switched to rich-editor in configuration.
Leave a comment
Please login to leave your comment.