Hi All;
This isn't 2.4 specific, however, I am using 2.4. I have had this problem for a while now.
I develop mini cms's in ASP.NET 2.0, and have come to love FckEditor as my editor of choice. I do use the FckEditor.Net plugin control for me to easily manage my editors within my ASP.NET applications.
Sometimes for instance I have 2 editors on a page, for an article or whatever. The first editor may be initially visible, but the second editor is hidden in a table-row that has it's display style attribute set to 'none'. This table row then becomes visible if a user checks a specific checkbox.
It works fine to a point. After clicking the checkbox a javascript function sets the table-row to display, the editor then becomes visible. However, the user cannot click on the editor content and type in any text. :-/
This issue occurs in FF. Not sure about IE.
Does anybody out there have a clue on what is going on and how i can possibly get around it?
I thought perhaps having the editor immediately in a hidden row before it fully loads was having an effect, so I put the hide table-row command in the window.onload event. This had no effect however.
I will certainly praise the genius who helps me out on this one!!!! Eternally!!!!
Tue, 04/10/2007 - 20:33
#1
RE: Table-Row hide/show breaks the Editor (2.
I had the same problem, and looked over the API to try to solve it.
I have a solution, which is OK, although it requires extra java-script.
After you call the function that displays the div, call a new function which "enables" editing.
I basically have:
function focusEdit(instance) {
var editor = FCKeditorAPI.GetInstance(instance);
editor.Focus();
editor.MakeEditable();
}
function displayDiv(show, divid) {
if (show)
document.getElementById(divid).style.display = 'block';
else
document.getElementById(divid).style.display = 'none';
}
(I called it "focusEdit" because originally I hoped ".focus" would solve the problem; the real solution is in "MakeEditable()").
In the "onClick" of the checkboxes I use:
onClick="displayDiv(this.checked, 'NOR_editor'); ocusEdit('editNOR');"
---- All that said, I would really like to know if this is considered a bug or not, and if it is (which I hope), that it will be fixed sometime soon. I have "nested divs" of FCK editors to show, and therefore right now have to iterate among the different levels in order to get things fully working on FF.
Anyone else's feedback will be greatly appreciated.
Alvar