CLEditor Multiple Instances resize with 100% width

1.5k Views Asked by At

I've successfully implemented the CLEditor with 100% width but I can't seem to get around the the resize firing off endlessly.

    //Initialize WYSIWYG
    var editorTextarea1 = $('#registration-confirmation'),
    editorWrapper1 = editorTextarea1.parent(),
    editor1 = editorTextarea1.cleditor({
        width:  '100%',
        height: 350
    })[0];

    // Update size when resizing
    editorWrapper1.sizechange(function()
    {
        editor1.refresh();
    });

    var editorTextarea2 = $('#thank-you-message'),
    editorWrapper2 = editorTextarea2.parent(),
    editor2 = editorTextarea2.cleditor({
        width:  '100%',
        height: 350
    })[0];

    // Update size when resizing
    editorWrapper2.sizechange(function()
    {
        editor2.refresh();
    });
0

There are 0 best solutions below