Skip to main content
MindTouch Success Center

Optimize editor performance (TCS)

Written by James Calleja
Former MindTouch Employee at MindTouch
This page applies to:MindTouch TCS

Users can optimize the MindTouch TCS editor for editing pages with multiple widgets and a large amount of text (50,000+ characters).

The following configuration keys are only recommended for pages with a large amount of content.

 

Optimize editor performance for large pages


The editor configurations below trigger the optimization of the autosave and the spell check as you type (SCAYT) settings on larger pages. It is best used in conjunction with a minimum character threshold to ensure that your editing experience is optimal for the amount of page content in your article. These configurations are modifiable to suit your needs.

performanceTweaksEnabled_minLength
This configuration value activates the configuration keys (listed below) on pages that contain 50,000 characters. By default, this value is set to infinity and needs to be adjusted for use. The character count is based on the HTML-generated for that content.

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled_minLength = 50000;
}

View the character count by clicking View > Source within the editor.


Autosave settings

Implement these configuration keys alongside the character limit to trigger autosave optimizations. See the Examples section below for implementation details.
 

autosave_interval
The editor saves your content changes every 25 seconds. Increase this value to reduce the saving interval to your local storage.

CKEDITOR.editorConfig = function( config ) {
    config.autosave_interval = 50;
}


autosave_minLength
The editor saves to your local storage after a certain number of characters are changed. Use this configuration key to increase the minimum amount of character changes needed to trigger the save.

CKEDITOR.editorConfig = function( config ) {
    config.autosave_minLength = 120;
}


SCAYT (spell check as you type) settings

Implement these configuration keys alongside the character limit to trigger SCAYT optimizations. See the Examples section below for implementation details.
 

scayt_findWordDelay
The spell checker highlights every misspelled word, which may impact editor performance. Change this key value to increase the time between highlighting misspelled words.

CKEDITOR.editorConfig = function( config ){
    config.scayt_findWordDelay = 1500;
}


scayt_handleCheckDirty
For better performance on pages with larger amounts of preloaded text, set this configuration to false.

CKEDITOR.editorConfig = function( config ){
    config.scayt_handleCheckDirty = false;
}

Setting this configuration key to false may affect your autosave functionality.


scayt_handleUndoRedo
The editor uses the SCAYT plugin by default. Setting this configuration to false utilizes the native functionality of the editor, enhancing the text undo/redo actions.

CKEDITOR.editorConfig = function( config ){
    config.scayt_handleUndoRedo = false;
}


 

Examples


Here are some examples you can use to improve your editor experience. Each of these configuration keys are modifiable.
 

Triggering configurations by setting a character length:

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled_minLength = 50000;
};

 

Triggering configurations without setting a minimum character length:

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaks = {
        autosave_interval: 50,
        autosave_minLength: 120,
        scayt_findWordDelay: 1500,
        scayt_handleCheckDirty: false,
        scayt_handleUndoRedo: false
    };
};

 

Triggering the configuration and overriding one of the settings:
CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled_minLength = 50000;
    config.performanceTweaks.scayt_handleCheckDirty = true;
}
  • Was this article helpful?