To the author of Yii, would you consider adding this editor ( http://code.google.com/p/xheditor/ ) to the zii lirary or Yii js bundle and make it easily pluggable in view files? It’s based on Jquery and i think it’s pretty light weight and good overall and i also think it would prove very useful. please check it out and let me know what you think http://code.google.com/p/xheditor/
What do you mean by easily pluggable? Most wysiwyg editors (and there are many to choose from) are easy to use. Usually its one or two lines of js code to swap textareas with editor and another one or two lines to customize toolbar and output html.
There already are some extensions for different editors. If you take one of them as template i think it’s not that hard to create a widget for xheditor. Not to mention that it’s a nice exercise to get used to building extensions for Yii
I don’t see it loaded in a PHP framework. It’s getting ridiculous for people more on the prototype/motools side. Why not an extension? I think jquery and jquery ui is just enough to be bundled in a PHP framework
It may be. That doesn’t mean that you have to force people using what they don’t want to use. It’s like distributing Zend Framework with Yii just because it has more libraries. It should be a choice.
Considering that I use mootools, extjs, dojo, scriptaculous, prototype or anything else besides jquery this adds unusable code to my framework. The more unusable code you add, the bigger you make it and you will end up thinking how much you use to make Yii your tool of choice. Even worst, I may like fckeditor so why not add it, tinymce?
I think Yii should stick to PHP and provide the basics of loading javascript and css as it does now.
I stick to my opinion, as an extension is ok but not in the core of Yii.
I have a problem when I try to display the editor as a BBCode editor.
My widget config is the following :
$this->widget('application.components.widgets.XHeditor',array(
'model'=>$model,
'modelAttribute'=>'content',
'showModelAttributeValue'=>false, // defaults to true, displays the value of $modelInstance->attribute in the textarea
'config'=>array(
// 'id'=>'xh1',
// 'name'=>'xh',
// 'tools'=>'fill', // mini, simple, fill or from XHeditor::$_tools
// 'width'=>'200',
'beforeSetSource'=>'ubb2html',
'beforeGetSource'=>'html2ubb',
//see XHeditor::$_configurableAttributes for more
),
'htmlOptions'=>...
I also added the following line into XHeditor.php :
xhEditor is quite sleek but can never get it to work when the inside or after JUI tabs. More so over, if it is ajax content. I have spent 5 hrs to no avail.
hi guyz i’m kinda new at yii, before i was using ckeditor and I really liked it, however i’m workin on a new project and i want to try yii and xheditor. I have tried the demo, and i figured out that xheditor has a built in uploader.
i’ve have the upload.php file on “extensions/xheditor/upload.php”
$this->widget('application.extensions.XHeditor',array(
'language'=>'en', //options are en, zh-cn, zh-tw
'config'=>array(
'id'=>'xh1',
'name'=>'xh',
'tools'=>'full', // mini, simple, fill or from XHeditor::$_tools
'width'=>'100%',
'upLinkUrl'=>'{editorRoot}upload.php',
'upLinkExt'=>"zip,rar,txt",
'upImgUrl'=>'{editorRoot}upload.php',
'upImgExt'=>"jpg,jpeg,gif,png"
),
'contentValue'=>'Enter your text here',
'htmlOptions'=>array('rows'=>5, 'cols'=>10)
));
this shows me the editor, but on then image button it does not display the upload option
any suggestions?
NOte: im using the latest version of xheditor1.1.3