tinymce

TinyMCE using jQuery
58 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

#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?

#6997 report it
johonunu at 2012/02/17 01:32pm
Try using this parameters

@yureshwar

Try using this parameters:

<?php 
 
$this->widget('application.extensions.tinymce.ETinyMce',
                array(
                    'name'=>'model_attribute',
                    'useSwitch' => false,
                    'editorTemplate'=>'full'
                    )
                ); 
?>
#6819 report it
Yureshwar Ravuri at 2012/02/07 08:25am
Is this way the editor loads through this widget.

Hi,

I am trying in my localmachine and it is not rendering properly i guess. Could anyone tell me is it this way it will render the editor.

Screenshot

Can anyone help me if this is wrong.

Thanks

#5966 report it
Gordon Cowtan at 2011/12/01 07:14am
More usage

Really glad this extension exists. I'd used tiny elsewhere before so was keen to be able to use it with yii.

The only criticism I would have is that some more usage info would have been good, particularly about the options that are specific to the extension implementation (rather than tiny options which are already well documented on the tiny site). I'm still finding my way round yii so I'm easily thrown and in the end I had to work my way through the ETinyMCE.php file to find what I was looking for (how to suppress the text mode button - 'useSwitch'=>false for anyone else who's wondering). Maybe this is how you're supposed to work things out in yii but a few lines more in the usage would certainly have helped me a lot.

Sorry if this comes across as a big moan it was just very frustrating that I couldn't find out what I thought would be straightforward.

#5753 report it
Alex Adams at 2011/11/09 01:27pm
Localhost to shared host breaks tinymce -- resolved for the current set of features.

Resolved for the current selection of features.

I compared the raw source from the rendered page on a working development site and the new hosted site. I had been comparing using Firebug, but with the raw code, it was much easier to see the differences.

I was able to get everything I need to work by turning tinymce compression off. If I ever need to use that feature I will need to look further at this, but I don't actually expect to use that, so I'm great.

Thanks,

Alex

Leave a comment

Please to leave your comment.

Create extension