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

Jump to content

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#21 User is offline   Ismael 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 163
  • Joined: 02-June 09
  • Location:Brazil

Posted 12 July 2009 - 06:25 PM

Isn't cache problem? Try to clean.
0

#22 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 12 July 2009 - 10:08 PM

Yes, Javascript in IE sucks big time, there're problems with cache, with compression, with DOM... dissapointing both for developers and for final users (who will blame your app, not IE). TinyMCE is particularly prone to this kind of problems, which, in my experience, are solved most of the time by cleaning the cache.
0

#23 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 15 July 2009 - 11:42 AM

Got the same problem myself (in the middle of a demo :( ), however, updating to the latest TinyMCE seems to solve the issue. But, I'm not so sure, because someone else tried before updating the tinymce and the problem persisted. Could you please confirm if  tinymce 3.2.5 works or not in IE?
0

#24 User is offline   rpaulpen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 01-December 08

Posted 15 July 2009 - 12:53 PM

No, still having the same problem with 3.2.5 in IE.  Now mind you, I've only tried it on on Windows running under VMware.  So, I haven't tried it on other pc's running native Windows and IE... just don't currently have access to one.
0

#25 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 15 July 2009 - 02:17 PM

rpaulpen> it's the same if you run it on vmware or standalone, it's still the same javascript engine and the same rendering engine (just the PC is virtual). Which HTTP server do you use? Apache? lighttpd?

That's so weird, because I'd tested and retested with an even older version than the one currently bundled with the extension, and it worked on IE 7 and IE 8, but now it stopped working. The workaround it used to work (deleting the cache) didn't work this time, and the worst part is that IE didn't render the page, but a blank page appeared instead, with a "page ready but with errors" in the status bar (I've seen this happening with javascript errors since last June, because before the pages were rendereded even with js errors). I must point out that this happened with a Prado widget in a Prado app without the jQuery plugin, so it's something to do with TinyMCE+IE. In my case updating to 3.2.5 and then deleting the cache seems to have solved the issue, but now I'm not so confident, since this issue didn't happen before ???

Anyone else having this problem?

P.S. open question to the IE team: is it so hard to fix the mess called IE?  >:(
P.P.S. oh, and in my today's problem, sometimes it worked and sometimes it didn't, sometimes it just failed on postback, but on a GET request the editor loaded fine. It's driving me mad.

0

#26 User is offline   rpaulpen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 01-December 08

Posted 15 July 2009 - 02:34 PM

i'm using apache 2. I have the exact same problem with the blank screen.
0

#27 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 15 July 2009 - 06:27 PM

It seems that MSIE loads the plugins before the main script (wonder why, if I guess the main script is the one that loads everything).
0

#28 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 05 August 2009 - 09:51 AM

Quote

when call $this->widget with params like 'plugins'=>array('spellchecker','safari'),..
it throws out php error on implode


Could you post your complete widget call?
Ah! on-off, simplement!
0

#29 User is offline   xzhang 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 09-July 09

Posted 08 August 2009 - 02:30 PM

<?php $this->widget('application.extensions.tinymce.ETinyMce',
array(
'width'=>'100%',
'name'=>'Post[content]',
'options'=>array('theme'=>'advanced'),
'value'=>$post->content));
?>
now I have to use this way to change the tinymce layout. and I found out that in the wrap, you might have used explode instead of implode for $this->plugins


another thing is that this extension doesn't work anymore in IE8, same problem as lots of people mentioned above, is there a way to solve it?

Thanks
0

#30 User is offline   xzhang 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 09-July 09

Posted 10 August 2009 - 11:08 AM

anybody has a way to let this extension work on IE?
0

#31 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 18 August 2009 - 12:20 AM

Version 1.1 released: fixed bug reported by xzhang, updated to TinyMCE 3.5.2. Sorry for the delay of this bug fix.
Ah! on-off, simplement!
0

#32 User is offline   xzhang 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 09-July 09

Posted 18 August 2009 - 01:00 PM

what is nice job , thaaaaaaaaaaaaaaaaanks
0

#33 User is offline   jmQ 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 28-July 09

Posted 20 August 2009 - 05:26 AM

I'm having some trouble with this extension. While I seem to be able to set most options without any problem, I can't get tinymce's cleanup functions to work. Things jut get saved as I entered them in the field, and even if I put the cleanup option in a menubar, it still ignores my valid elements declrations. The declarations are present in the resulting html and javascript code in the browser, so I don't quite understand why tinymce is ignoring them. explicit calls to $options['cleanup: true'] = true have not helped either.

any ideas?

jq
0

#34 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 568
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 24 August 2009 - 07:00 AM

Hi,

I got this error:

PHP Error
Description
Undefined variable: tinymce

Source File
PATH/pii/extensions/tinymce/ETinyMce.php(812)


I wonder why nobody else submitted this, please have a look at the code, where is $tinymce defined?
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');

(812)      $tinyOptions = $this->makeOptions($tinymce);


What should $tinymce refer to?

Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#35 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 24 August 2009 - 07:02 AM

View Postschmunk, on 24 August 2009 - 07:00 AM, said:

I wonder why nobody else submitted this, please have a look at the code, where is $tinymce defined?


Undefined variables are only reported in error mode STRICT which might be off by default in most installations.
0

#36 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 568
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 24 August 2009 - 08:48 AM

Hi Mike,

View PostMike, on 24 August 2009 - 07:02 AM, said:

Undefined variables are only reported in error mode STRICT which might be off by default in most installations.

OK, I thought this would be E_NOTICE, while E_STRICT checks, i.e. also extended classes and their definitions.


Anyway, I have some other problems, i.e. when using this component within an ajax request.

If compression is on I get this error in Firebug (404 - page not found):
/localhost/NetBeans/pii/www/undefined/tiny_mce_gzip.php?js=true&diskcache=true&core=true&suffix=&themes=simple&plugins=&languages=en

if set to 'false':
The ajax request loads and I get a white page without source, looks like tinymce is loading the iframe into the current window.

Tested like this ...
first view
<?php

$text = "update";
$url = "site/tinyMce";
$ajaxOptions = array("update"=>"#Update");
echo CHtml::ajaxLink($text, $url, $ajaxOptions);

?>

<div id="Update"></div>


controller
public function actionTinyMce()
{
	$this->renderPartial('testTinyMce',null,false,true);
}


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


If I place the file 'tiny_mce_gzip.php' manually under www/undefined, the errors continue:

tinymce is not defined
anonymous(Object mode=exact elements=htmlxxx language=en, "html", true)index.ph...val/seq/1 (Zeile -109)
[Break on this error] <td>trace</td>\n


How to use the ajax widget, btw: I've read: Ajax controls and render partial not being bound

Help?!


Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#37 User is offline   Jaime 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 15-August 09

Posted 28 August 2009 - 10:04 PM

Hello... I had the same problem with undefined variable and I solved by adding
error_reporting(E_ALL ^ E_NOTICE);

but.. I don't think this is the correct solution. It seems like a patch.

The line that causes the error is:

$tinyOptions = $this->makeOptions($tinymce);


That line calls

protected function makeOptions($url='')


so, $tinymce variable is a url. But, which URL is it?

Thanks
Jaime
0

#38 User is offline   pestaa 

  • past Yii dev member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 705
  • Joined: 07-May 09
  • Location:Hungary

Posted 29 August 2009 - 05:41 AM

I emptied $tinymce, and it seems that the functionality isn't affected.
0

#39 User is offline   Vadim 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 02-October 09

Posted 02 October 2009 - 03:23 PM

Hi,

I have a problem running jQuery plugin functinality e.g. getting and setting content of textarea.
I use extension like this:

<?php $this->widget('application.extensions.tinymce.ETinyMce', 
array('model'=> $form, 'attribute' => 'htmlContent', 
'useSwitch'=>false, 'editorTemplate'=>'full', 'htmlOptions' => array('id'=>'htmlContent'))); ?>
</div>


And then after that running
alert($('#htmlContent').tinymce().getContent());

returns that tinymce is not a function.

Do I have to specify something to get it working?
0

#40 User is offline   alaevka 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 15-September 09

Posted 24 November 2009 - 05:05 AM

Hi to all and thanks for extension. Its great, but when i add some plugins as Image manager it`s not work :unsure:

My code is:
<?php $this->widget('application.extensions.tinymce.ETinyMce',
                array(
                    'name'=>'Text1[data]',
                    'id'=>'Text1_text1_data',
                    'plugins' => array('filemanager','imagemanager','safari','pagebreak','style','layer','table','save','advhr','advimage','advlink','emotions','iespell','inlinepopups','insertdatetime','preview','media','searchreplace','print','contextmenu','paste','directionality','fullscreen','noneditable','visualchars','nonbreaking','xhtmlxtras','template'),
                    'options' => array(
                        'theme' => 'advanced',
                        'skin' => 'o2k7',
                        'theme_advanced_buttons1' => 'preview,bold,italic,underline,fontselect,fontsizeselect,link,justifyfull,justifyleft,justifycenter,justifyright,pasteword,pastetext,table,image,|,bullist,numlist,|,undo,redo,|,code,fullscreen',
                        'theme_advanced_buttons2' => '',
                        'theme_advanced_buttons3' => '',
                    ),
                    'value' => $model->data, 
                 ));
             ?>

0

Share this topic:


  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • 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