Yii Framework Forum: How To Save Html Markup Generated By Editme Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Save Html Markup Generated By Editme Extension Rate Topic: -----

#1 User is offline   DanR 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-June 13

Posted 21 June 2013 - 08:51 AM

Hi,

I'm very new to Yii, and have just been experimenting a bit. So, this may be a rookie question.

I took an activeform that was generated by Gii and modified it a bit, changing one of my fields from a standard textArea box to attempt to use the editMe Wysiwyg extension. It works, as far as saving the content that I type into the editme editor, but it doesn't save the HTML markup. It merely saves the raw text. How do I tell it that I want the HTML markup included?

<div class="row">
<?php echo $form->labelEx($model,'contents'); ?>
<?php $this->widget('application.components.widgets.editMe.widgets.ExtEditMe', array(
'model'=>$model,
'name'=>'contents',
'attribute'=>'contents',
));
?>
<?php echo $form->error($model,'contents'); ?>
</div>

<div class="row buttons">
<?php echo CHtml::submitButton('Submit', array('onclick'=>'CKupdate();$("#article-form").ajaxSubmit();' )); ?>
</div>

I appreciate any info that someone can provide.

Thanks,
Dan
0

#2 User is offline   DanR 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-June 13

Posted 28 June 2013 - 02:24 PM

View PostDanR, on 21 June 2013 - 08:51 AM, said:

Hi,

I'm very new to Yii, and have just been experimenting a bit. So, this may be a rookie question.

I took an activeform that was generated by Gii and modified it a bit, changing one of my fields from a standard textArea box to attempt to use the editMe Wysiwyg extension. It works, as far as saving the content that I type into the editme editor, but it doesn't save the HTML markup. It merely saves the raw text. How do I tell it that I want the HTML markup included?

<div class="row">
<?php echo $form->labelEx($model,'contents'); ?>
<?php $this->widget('application.components.widgets.editMe.widgets.ExtEditMe', array(
'model'=>$model,
'name'=>'contents',
'attribute'=>'contents',
));
?>
<?php echo $form->error($model,'contents'); ?>
</div>

<div class="row buttons">
<?php echo CHtml::submitButton('Submit', array('onclick'=>'CKupdate();$("#article-form").ajaxSubmit();' )); ?>
</div>

I appreciate any info that someone can provide.

Thanks,
Dan


For anyone else that might have run into this problem, it was a rookie mistake. I inadvertently had a "strip tags" filter on the field that I was trying to enter with the Wysiwyg editor. Removing this filter makes it work as expected.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users