Sean Yeomans
Total Posts: 29
Joined: 2008-04-02
Winnipeg
the method you describe works just as well as when I put the code in the footer.phtml. The textarea is replaced (hidden) in the source, and the content is there, but is not being picked up by Tiny :(
I’ve implemented TinyMCE in the past on my own, and it’s usually always just worked by pointing it at the right element. This is le strange behavior indeed.
Signature
Sean Yeomans | visit my site
winzippy
Total Posts: 101
Joined: 2008-02-08
Rochester, NY, USA
Can you post a screenshot of what’s going on?
Signature
Blue Fluid
Sean Yeomans
Total Posts: 29
Joined: 2008-04-02
Winnipeg
Page 2 of the thread here, at the bottom, I posted a screen shot of the CMS Page page, which shows a text area with the TinyMCE wrapper.
it is not rendering, inside itself, the contents of the textarea it is targetting.
I can’t for some reason get my Firebug screen to ‘PrtScn’, so I’ll have to drum up some screen grabber utility to snap what I’m seeing, but essentially the page draws, and FireBug tells me there’s an error:
this . getDoc () has no properties tiny_mce . js ( line 1 )
and this is what firebug tells me when I right-click / Inspect Elemnt
(i cut away some of the superfluous tr’s and td’s
< textarea id = "page_content" class= "required-entry textarea" type = "textarea" style = "width: 98%; height: 600px; display: none;" title = "Content" name = "content" >< h1 > Welcome to WestCare Health Supplies online !</ h1 ></ textarea > < span id = "mce_editor_0_parent" class= "mceEditorContainer" > < table class= "mceEditor" width = "98%" height = "600" cellspacing = "0" cellpadding = "0" border = "0" style = "width: 100%;" > < tbody > < tr > </ tr > < tr > < td align = "center" > < iframe id = "mce_editor_0" class= "mceEditorIframe" width = "100%" height = "508" frameborder = "0" name = "mce_editor_0" border = "0" marginwidth = "0" marginheight = "0" leftmargin = "0" topmargin = "0" allowtransparency = "true" style = "width: 100%; height: 508px;" > < html > </ html > </ iframe > </ td > </ tr > < tr > </ tr > </ tbody > </ table > < span id = "mce_editor_0_resize_box" class= "mceResizeBox" /> </ span >
I was sure I’d seen someone else complaining of the same error last week but I can’t find the thread in the forums now…
maybe it would work better if I could expose my dev site publicly and have someone log into the back end and see for themselves…
Signature
Sean Yeomans | visit my site
senders
Total Posts: 47
Joined: 2008-02-26
Germany, Mannheim
Hi Sean, hi winzippy,
I have got the same problem as shawn has.
It doesn’t work at the product editing site.
I am getting a clear tinymce also. But also the “help ?” button doesn’t work either.
Any Ideas?
Hints?
winzippy
Total Posts: 101
Joined: 2008-02-08
Rochester, NY, USA
Weird. I wish I had this problem so I could help. You could always try FCKEditor. It’s a better editor anyway.
Signature
Blue Fluid
senders
Total Posts: 47
Joined: 2008-02-26
Germany, Mannheim
yes i like fckeditor too. But tinymce is shipped with magento, so it should be better to use the one which comes along the product.
I found a lot of comments in the tinymce forum about that problem. This error offen appears in combination of tinymce and ajax.
winzippy
Total Posts: 101
Joined: 2008-02-08
Rochester, NY, USA
Senders,
What version of Magento are you using?
Signature
Blue Fluid
senders
Total Posts: 47
Joined: 2008-02-26
Germany, Mannheim
1.0
Sean Yeomans
Total Posts: 29
Joined: 2008-04-02
Winnipeg
Yeah I still have the problem too.
I’m wondering if there are some paths within tiny_mce that need updating. We have to jigger the ‘src’ of the tiny_mce.js call, so maybe it breaks paths inside...? i haven’t taken the time to look, and really it shouldn’t require such a change since other people seem to not have the problem…
i hope this can be resolved. Maybe I’m missing one simple step… meanwhile, I feel like this guy:
EDIT: Ok I installed FCKeditor instead and I’m happy.
PLUS I can upload files through it wonderfully after setting up the fckeditor config file
Image Attachments
Click thumbnail to see full-size image
Signature
Sean Yeomans | visit my site
jjafuller
Total Posts: 17
Joined: 2008-03-24
Note, you only need to do step 4 if you want to use the file manager in fckeditor
1. Download It: http://www.fckeditor.net/download
2. Unzip in “js” (you dont need all the files, just fckconfig.js, fckeditor.js, and editor dir)
3. Edit: lib/Varien/Data/Form/Element/Editor.php
Above the commented out tiny mce script (replace the entire “$html = line” with:
$secure = ( $_SERVER[ 'SERVER_PORT' ] == '443' ) ? true : false ; $html = ' <textarea name="' . $this -> getName (). '" title="' . $this -> getTitle (). '" id="' . $this -> getHtmlId (). '" class="textarea ' . $this -> getClass (). '" ' . $this -> serialize ( $this -> getHtmlAttributes ()). ' >' . $this -> getEscapedValue (). '</textarea> <script language="javascript" type="text/javascript" src="' . Mage :: getBaseUrl ( Mage_Core_Model_Store :: URL_TYPE_LINK , $secure ). '../js/fckeditor/fckeditor.js"></script> <script language="javascript" type="text/javascript"> Event.observe(window, "load", function(){ var fcke = new FCKeditor("' . $element . '") ; fcke.BasePath = "' . Mage :: getBaseUrl ( Mage_Core_Model_Store :: URL_TYPE_LINK , $secure ). '../js/fckeditor/" ; fcke.Height = "600"; fcke.Width = "450"; fcke.ReplaceTextarea() ; }); </script>' ;
4. Edit js/fckeditor/editor/filemanager/connectors/php/config.php
$Config[’Enabled’] = true ;
$Config[’UserFilesPath’] = the path you want to use for files, either absolute or relative. (i.e. /images/whatever/ or http://www.example.com/ )
$Config[’UserFilesAbsolutePath’] = ‘/home/whatever/html/htdocs/whatever/nice/long/path/’ ;
[bTroubleshooting:]
1. Don’t forget trailing slashes in the config file
2. Make sure you fix any line breaks if you are copy/pasting
Known Problem
1. If making a new entry, you need to click the save in the fck controls, not the magento save
winzippy
Total Posts: 101
Joined: 2008-02-08
Rochester, NY, USA
@Sean: I’m glad you like fck. The you can upload just about any file with it; like pdf’s, doc’s and the like (Under Add a Link, no less).
Signature
Blue Fluid
bkimura
Total Posts: 6
Joined: 2008-04-07
Hi Sean,
I tried to follow your directions provided. Im pretty sure i did all 4 steps however i still get the same html box that showed up previously. By any chance did you also do this?
< script type = "text/javascript" src = "path/to/fckeditor/fckeditor.js" > </script> < script type = "text/javascript" > window . onload = function() { var oFCKeditor = new FCKeditor ( 'id_of_element_where_you_want_to_attach_fckeditor' ) ; oFCKeditor . BasePath = "path/to/fckeditor/" ; oFCKeditor . ReplaceTextarea () ; } </script>
Not quite sure why my instance is not working?
Here is the snippit of my code i added to the editor.php file:
if( $this -> getWysiwyg () === true ) { $element = ( $this -> getState () == 'html' ) ? '' : $this -> getHtmlId (); $html = ' <textarea name="' . $this -> getName (). '" title="' . $this -> getTitle (). '" id="' . $this -> getHtmlId (). '" class="textarea ' . $this -> getClass (). '" ' . $this -> serialize ( $this -> getHtmlAttributes ()). ' >' . $this -> getEscapedValue (). '</textarea> <script language="javascript" type="text/javascript" src="' . Mage :: getBaseUrl ( Mage_Core_Model_Store :: URL_TYPE_LINK , $secure ). 'home/httpd/vhosts/revacomm.net/subdomains/magento/httpdocs/magento/js/fckeditor/fckeditor.js"></script> <script language="javascript" type="text/javascript"> Event.observe(window, "load", function(){ var fcke = new FCKeditor("' . $element . '") ; fcke.BasePath = "' . Mage :: getBaseUrl ( Mage_Core_Model_Store :: URL_TYPE_LINK , $secure ). 'home/httpd/vhosts/revacomm.net/subdomains/magento/httpdocs/magento/js/fckeditor/" ; fcke.Height = "600"; fcke.Width = "450"; fcke.ReplaceTextarea() ; }); </script>' ;
Do i Also need to enable the wysiwyg feature in that one file in the first page of the post?
Mahalo For your help!
Brett
winzippy
Total Posts: 101
Joined: 2008-02-08
Rochester, NY, USA
@bkimura: try changing these lines
< script language = "javascript" type = "text/javascript" src = "'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK,$secure).'home/httpd/vhosts/revacomm.net/subdomains/magento/httpdocs/magento/js/fckeditor/fckeditor.js" > </script>
fcke . BasePath = "'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK,$secure).'home/httpd/vhosts/revacomm.net/subdomains/magento/httpdocs/magento/js/fckeditor/" ;
to these:
< script language = "javascript" type = "text/javascript" src = "'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK,$secure).'js/fckeditor/fckeditor.js" > </script>
fcke . BasePath = "'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK,$secure).'js/fckeditor/" ;
If all else fails just use the absolute path to the *.js file you need. That should definitely fix the problem.
Signature
Blue Fluid