User-Defined Styles

By registering frequently used paragraph and run styles using user-defined styles, you can edit more quickly and conveniently.

User-Defined Paragraph Style

To use user-defined paragraph styles, configure as follows.

// synapeditor.config.js
'editor.customStyle': {
    'paragraph': [{
        'name': 'Dark Gray 2',
        'style': {
            'color': { 'r': 98, 'g': 98, 'b': 98 }
        },
    },{
        'name': 'Light Gray',
        'style': {
            'color': { 'r': 220, 'g': 220, 'b': 220 }
        }
    }]
}

User-defined paragraph style applied result

Custom paragraph styles applied

User-Defined Run Style

Configure user-defined run styles as follows.

// synapeditor.config.js
'editor.customStyle': {
    'textRun': [{
        'name': 'Mint 32 Bold',
        'style': {
            'bold': true,
            'fontSize': {
                'value': 32,
                'unit': 'pt'
            },
            'color': { 'r': 57, 'g': 182, 'b': 184 }
        }
    }, {
        'name': 'Orange 24 Bold',
        'style': {
            'bold': true,
            'fontSize': {
                'value': 24,
                'unit': 'pt'
            },
            'color': { 'r': 243, 'g': 151, 'b': 0 }
        }
    }]
}

User-defined run style applied result

Custom run (text) styles applied