How Do I Read or Write the Contents of CKEditor from JavaScript?

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

If you want to read CKEditor contents, use the getData() method.

If you want to write some content into CKEditor, use the setData(data, callback) method.

An example of how to use these functions can be found in the Basic usage of the API sample (api.html) located in the _samples directory of CKEditor installation package.

This page was last edited on 7 March 2011, at 14:10.