How to dynamically change the content in the Fckeditor with JavaScript


=============Function For Get Content

function getEditorValue( instanceName )
{
    // Get the editor instance that we want to interact with.
    var oEditor = FCKeditorAPI.GetInstance( instanceName ) ;

    // Get the editor contents as XHTML.
    return oEditor.GetXHTML( true ) ; // "true" means you want it formatted.
}
=============Function For Set Content
function setEditorValue( instanceName, text ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance( instanceName ) ; // Set the editor contents. oEditor.SetHTML( text ) ; }

Comments

Popular posts from this blog

GROUP BY, CUBE, ROLLUP and SQL SERVER 2005

How to get content of Ckeditor & Fckeditor using Javascript

How to Fix Error- Sys.WebForms.PageRequestManagerTimeoutException - The server request timed out