Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

CKEditor 4 offers a separate plugin called Full Page Mode that allows with its help to edit entire HTML pages (from <html> to </html>), including the page metadata like DOCTYPE, character set encoding, meta tags, text and background color, or margins.

If WProofreader is added on the page, it will be enabled in this full page mode as well. As a result you might notice additional scrips/files such wsc.css and other are visible in the source mode. In certain cases, such injections might be a problem and the right solution will be to disable WProofreader when switching to the source mode from the WYSIWYG mode and strip our all the entries of the WProofreader resources. There is cross-browser workaround proposed to overcome the above described issue (see below).

1. Define

In certain cases you may face an issue when wsc.css styles file of WProofreader is inserted into the source mode of a CKEditor 4 document.

Code Block
languagexml
themeEmacs
<link href="https://svc.webspellchecker.net/spellcheck31/wscbundle/css/wsc.css" rel="stylesheet" type="text/css" />

 If your preference is to remove such insertions, there is a workaround that you can consider implementing:

Define the config script as on the example below:

Code Block
languagejs
themeEmacs
window.WEBSPELLCHECKER_CONFIG = {
    ...
    onLoad: function(instance) {
        var container = instance.getContainerNode(), // Link to the editable container
            isCkeditor4 = container.classList.contains('cke_editable'); // Dirty check for CKEditor 4.

        if (isCkeditor4) {
            container.savedWscInstance = instance; // Save link on the WebSpellChecker instance to the editable DOM element.
        }
    },
    ...
};

2. Once config is defined, please do the following: 

...