Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

Dynamically creating fck editors


Project:FCKEditor Plugin
Version:1.2.9
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I am having great difficulty in creating editors dynamically. I can get them created an populated but when I try to reference them again to get the data out I am unsure how to do it without it crashing :(

The code below creates it fine but bombs when I try and get the data. I think it may just be me using incorrectly but the only demo I can find is the one on the homepage!

    function FckEdit(item) {
        var inEdit = $(item).hasClass("fckedit");
        var fckid = 'fck_' + $(item).parents("div.ContentBlock:eq(0)").attr("name");
        if (inEdit) {
            $.fck.update();
            $(item).append($("#" + fckid).fck.content());
        }
        else {
            $.fck.path = '/Exec2/fckeditor/';
            var content = $(item).html();
            $(item).empty();
            $(item).append('<textarea id="' + fckid + '">' + content + '</textarea>")');
            $("#" + fckid).fck({});
            //$(item).fck.setHTML(content);
        }
        $(item).toggleClass("fckedit");
    }