Skip to content

Commit

Permalink
Docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek committed Apr 5, 2022
1 parent 8afd898 commit dfade08
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ckeditor.jsx
Expand Up @@ -268,7 +268,7 @@ class EditorWatchdogAdapter {
/**
* Adds an editor configuration to the context watchdog registry. Creates an instance of it.
*
* @param {HTMLElement | string} sourceElementOrData A source element or data for the new editor.
* @param {HTMLElement|string} sourceElementOrData A source element or data for the new editor.
* @param {Object} config CKEditor 5 editor config.
* @returns {Promise}
*/
Expand Down Expand Up @@ -345,6 +345,17 @@ CKEditor.defaultProps = {
// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.
CKEditor._EditorWatchdog = EditorWatchdog;

/**
* Starting from v34.0.0, CKEditor 5 introduces a lock mechanism for enabling/disabling the read-only mode.
*
* To avoid unnecessary breaking changes, the integration supports both ways of switching the editor's state.
*
* (1.) Use the lock mechanism for version `v34+`
* (2.) Use the `Editor#isReadOnly` setter for lower versions (<v34).
*
* @param {Object} editor
* @param {Boolean} value
*/
function setReadOnly( editor, value ) {
const { CKEDITOR_VERSION } = window;

Expand Down

0 comments on commit dfade08

Please sign in to comment.