I am trying to add a css file dynamically to the ckeditor. The css file is uploaded using an uploader on the same page as the editor and oncomplete I want to add the css file to the ckeditor using the below code,
function addToEditor(editorName, fileUrl)
if(fileUrl != '')
    {
        var randomNumber = Math.random();
        alert(_gWebDocRoot + fileUrl + '?v='+ randomNumber);
        CKEDITOR.instances[editorName].config.contentsCss = _gWebDocRoot + fileUrl + '?v='+ randomNumber;
    }
}
But the above code does not work, please help me solve this issue. Regards,
Neha
 
    