Yii 1.1: tinymce

TinyMCE using jQuery
57 followers

This extension draws a TinyMCE HTML editor using a jQuery plugin.

Current version is 2.0.

File MD5 checksums

  • c9955b5fa8e7bc288c211e753521c2f0 tinymce-2.0.tar.bz2

Resources

Documentation

Requirements

  • Yii 1.1 or above

Installation

  • Extract the release file under protected/extensions

Usage

See the following code example:

<?php $this->widget('application.extensions.tinymce.ETinyMce', array('name'=>'html')); ?>

Notice: some problems have been reported when loading in WIE8. If you experiment such a problem, try deleting the "temporary internet files" (without any page loaded) and restart WIE. My guess is that this is a problem between TinyMCE and WIE, but we haven't found the cause.

The extension is documented using PHPDoc. If you are not comfortable reading the source code for documentation, you can generate your own set of documentation pages by using tools like phpDocumentor

Change Log

20110708 2.0

  • Updated to TinyMCE 3.4.3.2
  • Bug fixing.

20090817 1.1

  • Fixed bug reported by xzhang.
  • Updated to TinyMCE 3.2.5
  • Directories were reorganized.

20090621

  • Initial release.

Total 20 comments

#17824 report it
Yatin Mistry at 2014/07/25 10:26am
Check the link

Check the link here..

#16185 report it
samilo at 2014/01/27 03:24am
Use multiple textbox ?

how to use with multiple textsboxs ?

#16032 report it
sangprabo at 2014/01/12 11:35pm
Non-static method CActiveForm::textArea()

On Yii 1.1.14, the function is no longer a static method. Instead, I use CHtml in editor.php

<?php echo CHtml::activeTextArea($this->model, $this->name, $this->htmlOptions) ?>
#14047 report it
lukasFigueiredo at 2013/07/15 09:49am
problems with Ajax

when i use the widget of tinyMCE in a page loaded through ajax it don't work

#12700 report it
Jales Monteiro at 2013/04/06 08:26am
Correction

I use pt_br language, so I make change in TinyMce.php file: before:

if ($this->language === false)
    $this->settings['language'] = Yii::app()->language;

after:

if ($this->language === false) {
    $lang = explode('_', Yii::app()->language);
    $this->settings['language'] = $lang[0];
}

now there is no problem with plugins translations :D

#11794 report it
Brian Nettles at 2013/02/04 08:21am
Tutorial

I could not find a link to a tutorial on how to use this extension on this page, and I had to really dig in Google to find it. This page told me everything I needed to know to use and customize it.

http://www.iobe.net/yii_tinymce.htm

#10964 report it
Alexander Palamarchuk at 2012/12/06 06:50pm
More simple using TinyMCE

It's pity that the extension is being neglected. I've had to renounce using this extensions within the AutoAdmin CMS framework extension. The presented version of TinyMCE causes serious errors in jQuery (example).

Moreover copying megabytes of TinyMCE code (including plenty of language files) to the assets directory causes serious performance lags.

Within the AutoAdmin I have migrated to native TinyMCE. There are no problems. You may spot my trick in this source.

#10954 report it
h1stp at 2012/12/06 05:46am
perfect

the extension is cool.

and tutorial by jsladek: http://www.iobe.net/yii_tinymce.htm make it perfect

#10838 report it
KonApaz at 2012/11/27 04:31am
images uploader

Have the TinyMCE extension an option for images uploader? Thanks

#10258 report it
KonApaz at 2012/10/15 10:37am
utf-8 problem

Good extension but converts utf-8 character to ansi

for example my greek text

Κώστας (kostas) converted to & Kappa; ώ & sigma; & tau; & alpha; & sigmaf therefore stored in database in this format.

I have a problem with that because the other views - index etc shows them like that... & Kappa; ώ & sigma; & tau; & alpha; & sigmaf

Any suggestions?

#10257 report it
KonApaz at 2012/10/15 05:10am
corrupted file

the file tinymce-2.0.tar inside tinymce-2.0.tar.bz2 is corrupted!

I have windows, and I tried with winrar and 7-zip

Pleas give me instructions

#9966 report it
gunnit at 2012/09/25 02:52pm
Problem on db input

Why is it inserting the data in html format, and when i look at the list it displays the same html format eg below

<p>asdadsad</p> <p>adasdasdas</p>
#9870 report it
seniorboss at 2012/09/17 01:24pm
Jquery Conflict

I've tried to use the extension, that show correctly, but if use this on a page with other widget (or not), this go in conflict with jquery and the clientside validation or ajax validation doesn't work.

In javascript console i got this errors:

Uncaught TypeError: Object [object Object] has no method 'toUpperCase'
ErrorLine: jquery.js:7621         
 
jQuery.extend.ajax
ErrorLine: jquery.js:7621
 
$.fn.yiiactiveform.validate        
ErrorLine: jquery.yiiactiveform.js:346
 
(anonymous function)                                            
ErrorLine: jquery.yiiactiveform.js:96

When i deleted the extension from the page, all works fine

#9856 report it
yasen at 2012/09/16 07:57am
Usage Example
ext.tinymce.ETinyMce

works as well as

application.extensions.tinymce.ETinyMce
#9547 report it
toph at 2012/08/22 07:54am
Custom button error "r not defined" solution

For all those trying to add custom buttons and you keep on getting an "r not defined" error add a "js:" before the function as follows

'setup'=> 'js:function(ed){
    ed.addButton("mybutton", {
    title : "My button",
    image : "img/example.gif",
    onclick : function() {
        // Add you own code to execute something on click
        ed.focus();
        ed.selection.setContent("<strong>Hello world!</strong>");
        }
    });
}'

The error is due to the CJavascript::encode function which doesn't recognize javascript functions unless preceded by "js:".

#8624 report it
vpk369 at 2012/06/14 11:32am
client validation issue

How to make tinymce to validate at the client side?

Required field validator on this field is only working on server side but not on client side when i leave the field empty.

#7993 report it
sonnb at 2012/05/02 05:17am
Cannot set default value using model instant

You are only able to set default value if you are using 'name' attribute. You cannot use 'value' attribute if you are using 'model' and 'attribute' attributes.

#7990 report it
jsladek at 2012/05/01 08:57pm
Tutorial

Hello,

I made this in hopes that it might help someone.

http://www.iobe.net/yii_tinymce.htm

Let me know if I made any typos in this.

-John

#7773 report it
tom@cu at 2012/04/17 04:01pm
Nice extension

Nice Extension, but minimal documentation. Yes the code is documented but the lack of any documentation still makes it difficult to use.

#7238 report it
WebDevPT at 2012/03/06 06:39am
I'm having some problems rendering this

Hi, i'm also experiencing some problems rendering the extension.

when running the code example

$this->widget('application.extensions.tinymce.ETinyMce', array('name'=>'html'));

I can see the same image posted by yureshwar at 2012/02.

When changing my code to this:

$this->widget('application.extensions.tinymce.ETinyMce', array( 'name'=>'model_attribute', 'useSwitch' => false, 'editorTemplate'=>'full' ) );

everything runs as expected and rendered properly but if i change the "model_attribute" to my actual mode_attribute it breaks all my webpage and other form controls and the rendered extension engulfs all form components, and i only need this extension on one input type.

What am I doing wrong?

Leave a comment

Please to leave your comment.

Create extension