FCKeditor is not showing up for me initially.

I do have a custom theme, but it has the script and closure tags.

The toggle was not showing up even though it's set. When I looked at the source I saw it had a "display: none" style tag. The code behind this is:

    $wysiwyg_link .= "<a href=\"javascript:Toggle('{$js_id}','{$element['#id']}','".t("Switch to plain text editor")."','".t("Switch to rich text editor")."');\" id=\"switch_{$js_id}\" ".($fckeditorOn?"style=\"display:none\"":"").">";

Where it sets the display off if FCKeditor is on. Which I don't understand.

I went in and took that out so the toggle would show, and it shows up with "Switch to plain text". If I click this it loads the FCKeditor. It switches to the plain textarea, but if I click again I get FCKeditor. Does this make any sense why this would be happening and not loading initially.

My textareas are coming up with only 3 rows (I looked and couldn't remember where to change that setting), but I set Minimum Rows in FCKeditor to 1 to see if this was causing it. It still is not coming up.

This is the HTML generated when the page is displayed:

<div id="fck_oFCK_1">
<textarea id="oFCK_1"/>
</div>
<textarea id="edit-body" class="form-textarea required" name="body" rows="20" cols="60" style="display: none;"/>

Once I click the toggle button, it expands and adds all the additional HTML (iframes, etc.) of FCK in the fck_oFCK_1 div.

Any ideas what is causing this. I know it must be something with my theme or stylesheet, but I can't tell what is causing it.

Thanks

Comments

cardell’s picture

Added Info:

The smaller textarea (3 rows) is only showing when FCKeditor is enabled. If I disable FCKeditor it goes back to the default, larger textarea.

wwalc’s picture

Does this error appear when you switch back to Garland theme?

Does Firebug shows you any errors? The smaller textarea should be replaced by FCKeditor so I guess you are getting some javascript error while loading the page, take a look at Firebug and please write us what errors do you get.

salvatoreco’s picture

Category: support » bug

Hi, I've a similar problem with FCKeditor: just after a new installation, I installed FCKefitor module + FCKeditor 2.5b (but the problem there's even with FCKeditor stable version), following the README.txt file I did the right steps to install and configure it as well, but i can't view FCKeditor. It seems the script isn't loaded. Firebug doesn't show any errors, the only call to FCKeditor is in the stylesheet call in the header:
<style media="all" type="text/css">@import "/path_to_site/sites/all/modules/fckeditor/fckeditor.css";</style>
and the text-area markup is:
<textarea id="edit-comment" class="form-textarea resizable required processed" name="comment" rows="15" cols="60"/>.
Up to the 5.x.1 FCKeditor module version all worked fine, but I've to use the new version for better controlling the many toolbars I've associated to my roles.

Even if I change theme, the editor doesn't show up. I check my theme: the closure tag is at the end of page.tpl.php page.

Sorry for may bad English, I'll still hearing any solutions, thanks.

cardell’s picture

Okay, you never know where the answer will come.

I had checked the Firebug errors before, but the errors that came up had to do with another module, not FCKeditor, so I dismissed them. Based on wwalc's post, I went back and checked them again. This time I traced it down to the module that was giving the error (taxonomy_ticker's js file). It had an object it was referencing that wasn't being found. That must have thrown off the trigger for the FCKeditor script to initialize the textarea.

Anyway, I threw in an if statement to the taxonomy_ticker.js and...bing bam boom...FCKeditor comes up.

Thanks

anav’s picture

Well, I had the same exact problem with my theme, except that I did not have any javascript errors to fix. I figured out after digging that I had taken out the line:

<?php print $closure; ?>

from my theme's page template (page.tpl.php) just before the end body tag and that was the mistake that was causing the disappearing editor for me. FCKeditor puts in some necessary script into the $closure page variable and I didn't know it was a necessary one to have in the template.

Maybe this'll help someone else who is still having this problem.

sime’s picture

Title: FCKeditor not showing up » FCKeditor not showing up with no $closure
Category: bug » support
Status: Active » Fixed

Same symptom as cardell, and same solution as latentdabbler.

If you don't print $closure in your theme it won't work (it won't show errors either). Closing this, although it seems possible that some of the issues here are for different problems.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

lusse’s picture

I have the EXACT same problem. If I take away "display:none:" I can then swap to the editor. But otherwise it wont show at all. So the editor is working but not really showing by default.

Was it the Taxonomy module that was causing the problem? how did you alter the .js file?