ECLEditor extension Bug report & discussion
#1
Posted 10 November 2010 - 05:11 PM
Extension page
#2
Posted 11 November 2010 - 07:01 AM
Best
www.ramirezcobos.com
#3
Posted 12 November 2010 - 07:41 AM
Antonio Ramirez, on 11 November 2010 - 07:01 AM, said:
Best
Oh thanks. Have you developed the other one? I tried to correct to send to developer my version but it was taking to much time so I developed another one.
Buy the way I didn`t have time to see your swfupload review. I will try this weekend.
Best regards
thiagovidal
www.othys.com
#4
Posted 12 November 2010 - 09:44 AM
thiagovidal, on 12 November 2010 - 07:41 AM, said:
By the way I didn`t have time to see your swfupload review. I will try this weekend.
No problem man! I am really busy, having three projects at this time -and using my free time to go through the forum and learn more -very frekyii
You gave me a good hint and I have reviewed my autocomplete widget.cya
www.ramirezcobos.com
#5
Posted 21 March 2011 - 03:25 PM
have installed this extension and it was really easy to get it run.
But i have no idea how to get out the formatted HTML code and display it in the view.
Code of _form.php:
<?php echo $form->labelEx($model,'description'); ?>
<?php $this->widget('application.extensions.cleditor.ECLEditor', array(
'model'=>$model,
'attribute'=>'description', //Model attribute name. Nome do atributo do modelo.
'options'=>array(
'width'=>'500',
'height'=>250,
'useCSS'=>false,
'controls'=> // controls to add to the toolbar
"bold italic | removeformat | bullets numbering | outdent " .
"indent | alignleft center alignright justify | undo redo | " .
"rule image link unlink | cut copy paste pastetext | print source",
'colors'=> // colors in the color popup
"",
'fonts'=> // font names in the font popup
"Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," .
"Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
'sizes'=> // sizes in the font size popup
"1,2,3,4,5,6,7",
'styles'=> // styles in the style popup
array(
array("Paragraph", "<p>"),
array("Header 1", "<h1>"),
array("Header 2", "<h2>"),
array("Header 3", "<h3>"),
array("Header 4","<h4>"),
array("Header 5","<h5>"),
array("Header 6","<h6>")
),
'docType'=> // Document type contained within the editor
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'docCSSFile'=> // CSS file used to style the document contained within the editor
"",
'bodyStyle'=> // style to assign to document body contained within the editor
"margin:4px; font:10pt Arial,Verdana; cursor:text"
),
'value'=>$model->description, //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á.
)); ?>Code of _view.php:
<?php echo CHtml::encode($data->getAttributeLabel('description')); ?>:Could someone help me out?
THX
BJ
#6
Posted 03 August 2011 - 08:38 AM
What is it outputting? Im guessing its displaying the HTML? I think you just want to output the contents directly as its already in html
i.e.
<?php echo $data->attributeName; ?>
#7
Posted 03 August 2011 - 09:11 AM
in ECLEditor (or extended class if you wish as below)
Note: i had to change the ECLEditor->publishAssets() from being a static method to being an instance method. Not sure why it is static but there may be some reason im missing.
<?php
require_once('ECLEditor.php');
class ECLEditorExt extends ECLEditor {
public $useMin = true;
public $plugins = array();
protected function publishAssets()
{
$minId = $this->useMin ? '.min' : '';
$assets=dirname(__FILE__).'/assets';
$baseUrl=Yii::app()->assetManager->publish($assets);
if(is_dir($assets)){
Yii::app()->clientScript->registerCoreScript('jquery');
Yii::app()->clientScript->registerScriptFile($baseUrl."/jquery.cleditor$minId.js",CClientScript::POS_HEAD);
foreach ($this->plugins as $plugin) {
$pluginId = ".$plugin";
Yii::app()->clientScript->registerScriptFile($baseUrl."/jquery.cleditor$pluginId$minId.js",CClientScript::POS_HEAD);
}
Yii::app()->clientScript->registerCssFile($baseUrl.'/jquery.cleditor.css');
} else {
throw new Exception('EClEditor - Error: Couldn\'t find assets to publish.');
}
}
}
Then in your view
$this->widget('application.extensions.cleditor.ECLEditorExt', array(
'model'=>$model,
'attribute'=>'comment', //Model attribute name.
'useMin'=>true,
'plugins'=>array('xhtml', 'icon'),
'options'=>array(
....
),
'value'=>'',
));
Then just drop the available plugins into the extensions/cleditor/assets and as long as they maintain the naming conventions they currently have e.g. jquery.cleditor.<pluginname>.js or jquery.cleditor.<pluginname>.min.js it should work.
Hope this benefits someone somewhere!
Ta
Ross
#9
Posted 06 March 2012 - 08:02 AM
everything is working fine so far with me, but now I want users to be able to embed YouTube and Vimeo videos.
How would that be possible?
Thanks,
zastava
#10
Posted 09 March 2012 - 05:14 AM
zastava, on 06 March 2012 - 08:02 AM, said:
everything is working fine so far with me, but now I want users to be able to embed YouTube and Vimeo videos.
How would that be possible?
Thanks,
zastava
Hi i have the same question.
How can we use this extension to include youtube, vimeo, etc videos?
I know that Yii cleans the code for security reasons and iframe and objects are cleared out of the way, but how can we use videos without compromising security?
I know that yiitube works, but lets say i'm building a blog, and i want to include videos on my posts, i need this to be dynamic. Any ideas?
#11
Posted 17 April 2012 - 10:03 PM
Jgsaw, on 03 August 2011 - 08:38 AM, said:
What is it outputting? Im guessing its displaying the HTML? I think you just want to output the contents directly as its already in html
i.e.
<?php echo $data->attributeName; ?>
This one is still not working... still out put HTML like <xxx>..</xxx>, any ideas?
#12
Posted 13 May 2012 - 11:12 AM
i have a question? how to user choose a picture from their compute when user click 'Insert image' in ECLEditor? (not use img url)
thanks all!
#13
Posted 27 September 2012 - 11:40 AM
I am using Cleditor in a form and i rendered this same form as a fast reply in my other view(It's like multiple blogs in the same page and you can reply it without clicking and opening it).
However, i realized that if i use Cleditor for the same model multiple times at the same page, only the first field will change to CLeditor, others will still remain text area..
Any ideas would be appreciated.
My form.php view:
I am rendering the _form multiple times.
<?php $this->renderPartial('/reply/_form',array(
'model'=>$reply,
'answer'=>$answer,
)); ?>code in _form.php:
<div class="form" style="margin-bottom:-15px;">
<?php $form=$this->beginWidget('application.extensions.ActiveForm', array( 'id'=>'reply-form', 'enableAjaxValidation'=>false, 'disableAfterSubmit'=>true, 'disableText'=>'Processing…', 'disableCssClass'=>'btn btn-large btn-success', 'htmlOptions'=>array('enctype'=>'multipart/form-data'), )); ?>
<?php echo $form->errorSummary($model); ?>
<div class="row">
<?php echo $form->labelEx($model,'description',array('label'=>'Reply')); ?>
<?php $this->widget('ext.cleditor.ECLEditor', array(
'model'=>$model,
'attribute'=>'description',
'options'=>array(
'width'=>500,
'height'=>320,
'useCSS'=>true,
),
'value'=>$model->description,
));
?> </div>
......
.....
</div><!-- form -->
#14
Posted 24 October 2012 - 11:40 AM
just integrated the extension into my project but when I want to display the editor I only get a textarea without any controls. This happens when I use the method with a model explained at the extension site:
My code:
$this->widget('ext.cleditor.ECLEditor', array(
'model'=>$texts,
'attribute'=>'display_value', //Model attribute name.
'options'=>array(
'width'=>900,
'height'=>250,
'useCSS'=>true,
),
'value'=>$texts->display_value, //If you want pass a value for the widget. I think you will.
));
The "simple usage" does work allthough. Does anyone have an idea where the problem is?
Thx in advance
#15
Posted 24 October 2012 - 11:45 AM
rooney10, on 24 October 2012 - 11:40 AM, said:
just integrated the extension into my project but when I want to display the editor I only get a textarea without any controls. This happens when I use the method with a model explained at the extension site:
My code:
$this->widget('ext.cleditor.ECLEditor', array(
'model'=>$texts,
'attribute'=>'display_value', //Model attribute name.
'options'=>array(
'width'=>900,
'height'=>250,
'useCSS'=>true,
),
'value'=>$texts->display_value, //If you want pass a value for the widget. I think you will.
));
The "simple usage" does work allthough. Does anyone have an idea where the problem is?
Thx in advance

Help













