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.
thanks
for saving me some time!
Thanks
Extensions allows to integrate tinymce very easy. In my case tinymce was embeded into popup jQuery/UI dialog and there were some issues with tinymce itself (I added my explanation to forum discussion thread).
MetaYii, thanks for this and your other great extensions.
tinymce fullscree in a new window
Switch the tinymce editor to fullscreen mode,and the fullscreen is opened in a new window, but the offictial site of jquery tinymce is not like this.
ref:
http://tinymce.moxiecode.com/examples/example_23.php
widget is very simple and efficient
much practical, i liked very
Report bugs and questions on the forum
Please use the forum system for bugs and questions (the links are in the description tab). Use this space for reviews only. Thanks.
plugins doesn't work
when call $this->widget with params like
'plugins'=>array('spellchecker','safari'),..
it throws out php error on implode
Tutorial
Could you give me some tutorial that you have?
Nice widget
very easy to use
how can i use the validation color?
thanks =)
Very nice widget! An update to the current version and the integration of the commercial imagemanager is no problem.
no
revo110> no, it is a widget. Feel free to ask anything or report bugs in the forum. Thanks for your rating :)
Does this extension needs to be loaded in the main.php ?
Does this extension needs to be loaded in the main.php ?
Thanks!
$tinymce undefined variable
Hi there, great plugin works well.
However i get an undefined variable $tinymce on line 812, looked at the source and it doesn't seem to be doing anything.
Wrong version number in changelog
The used version is 3.2.5 not 3.5.2. The current version is 3.4.1.
Thanks for this plugin.
Undefined $tinymce in line 812
I've solved it adding before:
if(!isset($tinymce)) $tinymce = null;
Update?
Any updates for this extension? Last change was here two years ago as I can see...
Thanks.
Updates
Updates coming soon ;-)
ETinyMce::init();
In this method, the var $tinimce is not setted:
public function init() { list($name, $id) = $this->resolveNameID(); if ($this->useCookies) { if (isset($_COOKIE[$id.self::COOKIE_SUFFIX]) && in_array($_COOKIE[$id.self::COOKIE_SUFFIX], array('text', 'html'))) { $this->setMode($_COOKIE[$id.self::COOKIE_SUFFIX]); } } $baseDir = dirname(__FILE__); $assets = Yii::app()->getAssetManager()->publish($baseDir.DIRECTORY_SEPARATOR.'assets'); $tinyOptions = @$this->makeOptions($tinymce); ... ...
I got an error so, ... as you can see I have added a silent (@) and all work fine. Without silent i cant use this extension.
bug confirmed
I can confirm that bug, offended line should say:
$tinyOptions = (array)@$this->makeOptions($tinymce);
need to change folder assets permission to 755
http://www.yiiframework.com/forum/index.php?/topic/20358-php-scripts-in-assets/
i got the same problem as the topic above.
tinymce doesn't work if folder assets/xxxxx/tinymce is not set to 755 permission
or perhaps I'm missing something....
Localhost to shared host breaks tinymce
I've been publishing a 99% finished app from in-house servers (MAMP on OS X and XAMPP on OS X) to a new shared web hosting account. This is my first experience with shared hosting. Always before I've had dedicated servers, either physical or virtual.
Here's my last issue that I can't seem to figure out on my own. I'm using TinyMce for a couple of form fields in a couple of content types. On the Mac servers, it works great. On the Arvixe shared hosting account, no go. I don't get an error message. Firebug shows that it's just not there except for the little button on the bottom that says Text Mode.
I'm imagining this has nothing to do with TinyMce itself, but is something different in regards to the shared hosting?
Any ideas?
Alex
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
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.
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.
Can anyone help me if this is wrong.
Thanks
Try using this parameters
@yureshwar
Try using this parameters:
<?php $this->widget('application.extensions.tinymce.ETinyMce', array( 'name'=>'model_attribute', 'useSwitch' => false, 'editorTemplate'=>'full' ) ); ?>
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?
Nice extension
Nice Extension, but minimal documentation. Yes the code is documented but the lack of any documentation still makes it difficult to use.
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
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.
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.
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:".
Usage Example
works as well as
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
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
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
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?
images uploader
Have the TinyMCE extension an option for images uploader?
Thanks
perfect
the extension is cool.
and tutorial by jsladek: http://www.iobe.net/yii_tinymce.htm make it perfect
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.
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
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
problems with Ajax
when i use the widget of tinyMCE in a page loaded through ajax it don't work
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) ?>
Use multiple textbox ?
how to use with multiple textsboxs ?
Check the link
Check the link here..
any idea?!
please can someone help me to fix this problem. I am developping with yii framework and I want to add an text editor tinymce to my form . in localhost all is fine. but when I work inline I din't get the editor.
@moholh
Don't use this anymore. It's for Yii 1, for new projects use Yii 2!
@Cozumel
advice me to use another I don't know what should I do
-----074-desktop:~$ sudo php composer.phar require "2amigos/yii2-tinymce-widget" "*"
[sudo] password for -------:
Could not open input file: composer.phar
------074-desktop:~$ ^C
------074-desktop:~$
plz clear this error
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.