dev

ImprovedProseMirror is a script that adds the following functionality to the ProseMirror editor, which is used in article comments and message walls:

Installation

Configuration

The following configuration is optional, and there is no limit to the number of presets.

// Create configuration, hook is used to avoid loading order issues
mw.hook('dev.IPM').fire([
	{
        // Name of preset, shown in the dropdown
		button: 'Warn - CIR',
        
        // Preset content
		insert: 'You are a receiving a warning for continuing to edit disruptively with no sign of improvement after being informed of issues in your previous edits. We appreciate your enthusiasm, but [[WP:CIR|competence is required]] to make our wiki the best it can be.',

        // Set to true to overwrite existing content in the editor with this preset
		replaceAll: true
	},
	{
		button: 'Signature',
		insert: 'Yours truly,\n[[Special:MyPage|UserName]] ([[Special:MyTalk|talk]]).'
	},
	{
        // Nested dropdown buttons cannot have "insert"
		button: 'Salutations',
		nested: [                                         
			{
				button: 'Hello',
				insert: 'Nice to meet you, anon!'
			},
			{
				button: 'Bye',
				insert: 'Nice talking to you, anon. See you around!'
			},
    	]
	},
	{
		button: 'Introduction',
        
        // Preset with defined variables "username" and "interest"
		insert: 'My name is %username%, and I like %interest%.',

        // Definition of variable "username" that automatically retrieves the poster's username
        username: mw.config.values.wgUserName,

        // Definition of variable "interest" with value "fixing typos"
        interest: 'fixing typos'
	},
	{
		button: 'Warn - Custom',
        
        // Preset with undefined variable "reason", user will be prompted for its value each time the "Warn - Custom" preset is selected
		insert: 'You are receiving a warning for %reason%.'
	},
]);
Text above can be found here (edit)