From the next version, it will be possible to access the plugin settings from the renderer, using the provided options.settingValue() method (which only returns your own plugin settings).

For example:

export default () => { 
	return {
		plugin: (markdownIt, pluginOptions) => {	
			markdownIt.renderer.rules.fence = function(tokens, idx, options, env, self) {
				const mySettingValue = pluginOptions.settingValue('mySetting')
				// ...								
			};
		},
	}
}

Note that for now it's only supported by renderer content script (not CodeMirror ones).

1 Like