Sign up (with export icon)

MergeFieldsDataSetDefinition

Api-typedef icon typedef

Properties

  • Chevron-right icon

    id : string

    A unique identifier of the data set. It cannot start with $, as it is reserved for internal use.

  • Chevron-right icon

    label : string | undefined

    A human-readable label of the data set.

  • Chevron-right icon

    values : Record<string, MergeFieldDataSetValue>

    The data to be displayed in the editor in place of merge fields when the data set is previewed.

    The keys of this object are merge field IDs, while values are the merge field values, which can be strings or functions. If the value is specified as a function, it should return a string. The function will be evaluated each time the data set values are retrieved.

    const mergeFieldsConfig = {
    	dataSets: [
    		id: 'customDataSet',
    		values: {
    			companyName: 'CKSource',
    			productName: 'CKEditor 5'
    		}
    	]
    };
    
    Copy code