Yii Framework Forum: [EXTENSION] TinyMCE using jQuery - Yii Framework Forum

Jump to content

  • (5 Pages)
  • +
  • « First
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] TinyMCE using jQuery Rate Topic: -----

#81 User is offline   nguyen nam 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 28-May 12
  • Location:Hanoi, Vietnam

Posted 28 May 2012 - 11:11 PM

Dear everyone,
I and my team are working to develop our own CMS base on Yii framework.
But I meet a problem with pagebreak in TinyMCE, how to use it to pager the long article.

When I used "pagebreak" in TinyMCE editor, it only added <!-- Page break --> comment to content!

Please help me!
Thank you so much!
Yii team from Vietnam
An IT company with all product built on Yii Framework.
ihbvietnam.com
0

#82 User is offline   logos010 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 12-November 10
  • Location:VietNam

Posted 15 June 2012 - 10:42 PM

View PostMetaYii, on 21 June 2009 - 11:27 AM, said:

This is my version of a TinyMCE widget, using jQuery for initialization.

<a href='http://www.yiiframework.com/extension/tinymce/' class='bbc_url' title='External link' rel='nofollow'>http://www.yiiframew...ension/tinymce/</a>


Hi,
Can I add styleselect into editor, cause I've tried to add, but it seem not work as tinymcw.com demo?

Thanks.
0

#83 User is offline   Jitendra Kolte 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 24-July 12

Posted 24 July 2012 - 04:54 AM

Hello All,
I have same problem with tinymce.
when made a print_r of the POST array and the mentioned 'news_description' is correct (for both the name and the value) but it is outside the Model array.

This is what i have used.
$this->widget('application.extensions.tinymce.ETinyMce',
array(
'model'=>$model,
'attribute'=>'news_description',
'name'=>'news_description',
'id'=>'news_description',
'useSwitch' => false,
'editorTemplate'=>'full',
'value' => $model->news_description
)
);

can anybody help me.
Thanks,
0

#84 User is offline   vpk369 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 08-August 11
  • Location:NYC

Posted 09 August 2012 - 02:42 PM

I am having an issue with saving data while editing text in text mode. When i edit the text in text mode and switch the mode to html before saving the data, it is working fine. When i edit the text in text mode and save it while i am in text mode, all the typed in text in text while i am in text mode was lost after hitting save button.
0

#85 User is offline   gallyamow 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 12-August 12

Posted 28 September 2012 - 06:34 AM

I had problem with using TinyMCE and twitter bootstrap. But no-JQuery based version of tinymce work with twitter bootstrap.
0

#86 User is offline   nguyen nam 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 28-May 12
  • Location:Hanoi, Vietnam

Posted 14 August 2013 - 05:33 AM

Hello all,

I see that the latest version of Tinymce is 4.0.3 with nice modern theme.
But in Yii tinymce extension It's not upgraded yet.

So how to upgrade Yii tinymce extension to latest version of Tinymce???
I have already tried but get a lot of bugs.
Yii team from Vietnam
An IT company with all product built on Yii Framework.
ihbvietnam.com
0

#87 User is offline   sfer23 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-October 13

Posted 28 October 2013 - 08:01 PM

View Postaqge, on 28 October 2011 - 11:46 AM, said:

i ve found it, i dont know how to make it beutiful, i just hack it that way,
hopefully hte creator of this extention read this and find better way to do it,


toogleModeTinyMCE are no longger exist, but in the EtinyMCE.php there is still these link,

and snip to tinyMCE example and do little change on EtinyMCE.php


//these code wrote in the end of the file , make it some thing like this
$label = $this->switchLabels[($this->mode=='html'?0:1)];
         $css = ($this->labelClass !== '') ? array('class'=>$this->labelClass) : array('style'=>$this->labelStyle);
         $switchOptions = array_merge(array('id'=>$id.self::SWITCH_SUFFIX,
             'onclick'=>"tinymce.execCommand('mceToggleEditor',false,'$id')"), $css);
         //$uri = rawurlencode('$("#'.$id.'").toggleModeTinyMCE('.$jsToggleLabels.')');
         $uri=";"; 
         $link = CHtml::link($label, 'javascript:'.$uri, $switchOptions);
         $switch = CHtml::tag('div', array(), CHtml::tag('span', array(), $link));
         $html = CHtml::tag('div', array(), $textarea.$switch);




to support the $id variable, you need to pass it on the widget wrote becamoe somethin glike this
 <?php $this->widget('application.extensions.tinymce.ETinyMce',
                            array(  'name'=>'NotesModel[note_desc]',
                                    'id'=>'NotesModel_note_desc',  //see right here, the toggle mode need this textatrea id
                                    'value' => $model->note_desc,
                                    'options'=> array(  'mode' =>"textareas",
                                                        'theme' => 'advanced',
                                                        'height' => '500',                                                
                                                                  



hope fully it jhelp, and dear extention writer may this give aclue,

regard..


To fix this you need only replace
//these code wrote in the end of the file , make it some thing like this
$uri = rawurlencode('$("#'.$id.'").toggleModeTinyMCE('.$jsToggleLabels.')');

by
$uri = rawurlencode('tinymce.execCommand("mceToggleEditor",false,"'.$id.'")');

0

#88 User is offline   fgpsmith 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 20-October 11

Posted 07 January 2014 - 07:27 PM

Is the developer still around? I was wondering how difficult this was to update to a newer version of TinyMCE. The version in the plugin doesn't seem to work in IE11. The editor window is blank and setting compatibility to IE10 brings it back again
0

Share this topic:


  • (5 Pages)
  • +
  • « First
  • 3
  • 4
  • 5
  • 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