Hi, I'm writing a CMS system for a website which requires a page to have multiple languages, so I thought I'd pop an instance of FCKEditor in a div, and set the div to hidden and then show it when the user clicked on the button for that specific language.
Everything worked fine, until I got an Exception raised during the creation of the editor. I eventually narrowed this down to the fact the editor was in a hidden DIV, so I changed the div to absolute positioning & positioned it 1000px off the left of the page whilst loading, once loaded, it hides the div & positions it in the correct location on the page.
Now when I go to type into the editor, I can't - its as if its locked. I can insert images etc.. but I cant; type anything.
Removing the style defintion from the div causes the problem to go away, but then I have 7 editors all displayed down the page, one after the other - not exactly what I was after!
I was just wondering if anyone else had come up against this problem and how (& if) they sorted it?
TIA
Steve.
Everything worked fine, until I got an Exception raised during the creation of the editor. I eventually narrowed this down to the fact the editor was in a hidden DIV, so I changed the div to absolute positioning & positioned it 1000px off the left of the page whilst loading, once loaded, it hides the div & positions it in the correct location on the page.
Now when I go to type into the editor, I can't - its as if its locked. I can insert images etc.. but I cant; type anything.
Removing the style defintion from the div causes the problem to go away, but then I have 7 editors all displayed down the page, one after the other - not exactly what I was after!
I was just wondering if anyone else had come up against this problem and how (& if) they sorted it?
TIA
Steve.
RE: Multiple editor problems...
I've got a question, I've stated that I will pay the money stated by the author of the editor, but *only* if I can get an solution to my problem - if there is no solution, the editor is of no use to me.
Perhaps the author doesn't want my money, perhaps he's rich enough? Perhaps he doesn't care. Who knows. Eitherway, its not being very supportive towards his user base.
RE: Multiple editor problems...
I've emailed the author but got an automated reply back. I have 150 waiting to be paid, but I only want to pay for the editor if its going to be of use to me.. at the moment its not!
Surely, someone has come up against this problem before?
RE: Multiple editor problems...
You could probably acheive what you're trying to accomplish with a single editor in one of the following ways:
a) have the author select language value and then use that value on the server end to determine where the content should be inserted.
b) use the language value to change the underlying name of the editor control.
just a thought.
RE: Multiple editor problems...
@Tom: i noticed you're solution; i'm having the same problem with multiple instances in several hidden divs.
Your solution (which i thank you for) gives some problems when updating to future versions of FCKeditor.
That's the reason i hesitate to implement your solution.
RE: Multiple editor problems...
It's not that big a hassle. I keep a list of changes I make to the baseline code, so I can easily apply them to new versions.

My list is up to about 10 things now ... some are bug fixes that haven't been incorporated, and some are specific changes for our needs.
When a new version comes out it usually takes me no more than an hour to integrate.
And then ages to find out what's fixed and what else is broken, but that's another story
Cheers
Ben
RE: Multiple editor problems...
Perhaps noone has come up against this problem? Creating seven editors seems like an unusual way to handle multiple languages -- will a single user use several languages on the same page?
You first problem (the editor not working when created in a hidden div) is reported in this bug: http://sourceforge.net/tracker/index.ph ... tid=543653 , together with a workaround.
You don't say what browser(s) you are having this problem with, but there's a well known and often reported problem with Firefox not allowing you to type in text. If you search the bug database you'll see it. Perhaps that is your problem?
You should do your homework before asking a question (or at least before you get upset at a lack of answers), and you should give full information about your environment -- mentioning which browser or browsers you are using is fundamental to getting a reply!
RE: Multiple editor problems...
7 editors is because the client wants their site in 7 languages, so, yes, they would all get used.
i.e. One page needs 7 versions of it.
Anyway, I did search before I posted the question (I run a large forum myself and know how annoying it is when people ask common questions), but as with all searches on the net - if you don't know what to search for exactly, you won't find the answer.
Sorry about not mentioning the browser - I thought I had. It is indeed firefox.
RE: Multiple editor problems...
My problem is with Internet Explorer 6.0 on a PC (I'd use Firefox but I don't want to force my client to). In IE, the initial editor looks fine (happens to be the English one). When I click to view a different editor on the same page (by either the zIndex, div display or div visibility options), the toolbar collapses, and puts the down "arrow" on there, even though I've told the configuration to have it autoexpanded like it was when I first viewed the page. Then, after I expand the menu, none of the buttons work, even if I go back to the english editor. When I click one of the buttons, I get the javascript error: 'this.FCKtoolbarbutton' is null or not an object.
Any thoughts? I can give more details on the error or point you to the page if need be (currently password protected).
Thanks,
Jeremy
This should work.
<a href='javascript: void(0)' onClick='javascript: ...>
in my tabs that changed editors. Apparently javascript: void(0) messes with the javascript in the editors, so I simply made the a href a div instead:
<div style="display: block" onClick='javascript: ...">
So the complete package...use z-index instead of display or visibility to hide or show editors, and don't use href with javascript voids in them to use as the tabs.