MediaWiki: Editor.js: Unterschied zwischen den Versionen

Aus Joachim Camerarius (1500-1574)
Wechseln zu: Navigation, Suche
(Inital Commit)
 
Keine Bearbeitungszusammenfassung
Markierung: Manuelle Zurücksetzung
 
(54 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
//Camerarius Wikieditor Customization
let customizeToolbar = function () {
//Check if Page gets edited
$('#wpTextbox1').wikiEditor('addToToolbar', {
    //Create new toolbar section Camerarius which is itself a toolbar             
    sections: {
        camerarius: {
            type: 'toolbar',
            label: 'Camerarius-Attribute',
            //Create dropdown part of the toolbar
            'groups': {
                'format': {
                    'tools': {
                        'Attribute': {
                            'label': 'Attribute-Allgemein',
                            'type': 'select',
                            'list': {
                                'Auftraggeber': {
                                    'label': 'Auftraggeber',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Auftraggeber::',
                                            'periMsg': 'Auftragsgeber',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Beeinflusser': {
                                    'label': 'Beeinflusser',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Beeinflusser::',
                                            'periMsg': 'Beeinflusser',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Briefpartner': {
                                    'label': 'Briefpartner',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Briefpartner::',
                                            'periMsg': 'Briefpartner',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähnte Körperschaft': {
                                    'label': 'Erwähnte Körperschaft',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähnte Körperschaft::',
                                            'periMsg': 'Körperschaft',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähnte Person': {
                                    'label': 'Erwähnte Person',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähnte Person::',
                                            'periMsg': 'Adressat',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähnter Ort': {
                                    'label': 'Erwähnter Ort',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähnter Ort::',
                                            'periMsg': 'Ort',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähntes Werk': {
                                    'label': 'Erwähntes Werk',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähntes Werk::',
                                            'periMsg': 'Erwähntes Werk',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Forschungsliteratur': {
                                    'label': 'Forschungsliteratur',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Forschungsliteratur::',
                                            'periMsg': 'Forschungsliteratur',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Gesprächspartner': {
                                    'label': 'Gesprächspartner',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Gesprächspartner::',
                                            'periMsg': 'Gesprächspartner',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Initiator': {
                                    'label': 'Initiator',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Initiator::',
                                            'periMsg': 'Initiator',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Lehrer': {
                                    'label': 'Lehrer',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Lehrer::',
                                            'periMsg': 'Lehrer',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Schüler': {
                                    'label': 'Schüler',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Schüler::',
                                            'periMsg': 'Schüler',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Student': {
                                    'label': 'Student',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Student::',
                                            'periMsg': 'Student',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Unterstützer': {
                                    'label': 'Unterstützer',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Unterstützer::',
                                            'periMsg': 'Unterstützer',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Werkadressat': {
                                    'label': 'Werkadressat',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Werkadressat::',
                                            'periMsg': 'Adressat',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Widmender': {
                                    'label': 'Widmender',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Widmender::',
                                            'periMsg': 'Widmender',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Widmungsempfänger': {
                                    'label': 'Widmungsempfänger',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Widmungsempfänger::',
                                            'periMsg': 'Widmungsempfänger',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Nachrufempfänger': {
                                    'label': 'Nachrufempfänger',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Nachruf auf::',
                                            'periMsg': 'Nachruf auf',
                                            'post': ']]'
                                        }
                                    }
                                },
                            }
                        },
                        //Create the button parts
                        'Beschreibungen': {
                            'label': 'Beschreibungen',
                            'type': 'button',
                            'icon': {
                                'default': '/images/a/a2/Custom-toolbar-beschreibung.png',
                                'en': '/images/a/a2/Custom-toolbar-beschreibung.png',
                                'de': '/images/a/a2/Custom-toolbar-beschreibung.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': "{{Beschreibungen|",
                                    'periMsg': 'Seitenname',
                                    'post': "}}"
                                }
                            }
                        },
                        'MBW': {
                            'label': 'MBW',
                            'type': 'button',
                            'icon': {
                                'default': 'https://upload.wikimedia.org/wikipedia/commons/5/54/Mbutton.png',
                                'en': 'https://upload.wikimedia.org/wikipedia/commons/5/54/Mbutton.png',
                                'de': 'https://upload.wikimedia.org/wikipedia/commons/5/54/Mbutton.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': "[https://melanchthon.hadw-bw.de/regesten.html MBW - Regesten online], Nr. ",
                                    'periMsg': 'Regestnr.'
                                }
                            }
                        },
                        'Link': {
                            'label': 'Verlinkung',
                            'type': 'button',
                            'icon': {
                                'default': '/images/e/e0/Custom-toolbar-link.png',
                                'en': '/images/e/e0/Custom-toolbar-link.png',
                                'de': '/images/e/e0/Custom-toolbar-link.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': "[[",
                                    'periMsg': 'Text',
                                    'post': "]]"
                                }
                            }
                        },
                        'Binnenverweis': {
                            'label': 'Binnenverweis auf Lexikonseiten',
                            'type': 'button',
                            'icon': {
                                'default': 'https://upload.wikimedia.org/wikipedia/commons/1/13/Vector_toolbar_redirect_button.png',
                                'en': 'https://upload.wikimedia.org/wikipedia/commons/1/13/Vector_toolbar_redirect_button.png',
                                'de': 'https://upload.wikimedia.org/wikipedia/commons/1/13/Vector_toolbar_redirect_button.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': '[[',
                                    'periMsg': 'Lexikonseite#Kapitelname unformatiert|Kapitelname',
                                    'post': "]]"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
});
};
 
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
// Add a hook handler.
// Add a hook handler.
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
            $textarea.wikiEditor( 'addToToolbar', {
customizeToolbar();
//Create new toolbar section Camerarius which is itself a toolbar             
} );
                sections:{
                    camerarius:{
                        type: 'toolbar',
                        label: 'Camerarius-Attribute',
//Create dropdown part of the toolbar
                        'groups': {
'format': {
'tools': {
'Attribute': {
'label': 'Attribute-Allgemein',
'type': 'select',
'list': {
'Auftraggeber' : {
'label': 'Auftraggeber',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Auftraggeber::',
'periMsg': 'Auftragsgeber',
'post': ']]'
}
}
},
'Beeinflusser' : {
'label': 'Beeinflusser',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Beeinflusser::',
'periMsg': 'Beeinflusser',
'post': ']]'
}
}
},
'Briefpartner' : {
'label': 'Briefpartner',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Briefpartner::',
'periMsg': 'Briefpartner',
'post': ']]'
}
}
},
'Erwähnte Körperschaft' : {
'label': 'Erwähnte Körperschaft',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Erwähnte Körperschaft::',
'periMsg': 'Körperschaft',
'post': ']]'
}
}
},
'Erwähnte Person' : {
'label': 'Erwähnte Person',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Erwähnte Person::',
'periMsg': 'Adressat',
'post': ']]'
}
}
},
'Erwähnter Ort' : {
'label': 'Erwähnter Ort',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Erwähnter Ort::',
'periMsg': 'Ort',
'post': ']]'
}
}
},
'Erwähntes Werk' : {
'label': 'Erwähntes Werk',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Erwähntes Werk::',
'periMsg': 'Erwähntes Werkt',
'post': ']]'
}
}
},
'Forschungsliteratur' : {
'label': 'Forschungsliteratur',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Forschungsliteratur::',
'periMsg': 'Forschungsliteratur',
'post': ']]'
}
}
},
'Gesprächspartner' : {
'label': 'Gesprächspartner',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Gesprächspartner::',
'periMsg': 'Gesprächspartner',
'post': ']]'
}
}
},
'Initiator' : {
'label': 'Initiator',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Initiator::',
'periMsg': 'Initiator',
'post': ']]'
}
}
},
'Lehrer' : {
'label': 'Lehrer',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Lehrer::',
'periMsg': 'Lehrer',
'post': ']]'
}
}
},
'Schüler' : {
'label': 'Schüler',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Schüler::',
'periMsg': 'Schüler',
'post': ']]'
}
}
},
'Student' : {
'label': 'Student',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Student::',
'periMsg': 'Student',
'post': ']]'
}
}
},
'Unterstützer' : {
'label': 'Unterstützer',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Unterstützer::',
'periMsg': 'Unterstützer',
'post': ']]'
}
}
},
'Werkadressat' : {
'label': 'Werkadressat',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Werkadressat::',
'periMsg': 'Adressat',
'post': ']]'
}
}
},
'Widmender' : {
'label': 'Widmender',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Widmender::',
'periMsg': 'Widmender',
'post': ']]'
}
}
},
'Widmungsempfänger' : {
'label': 'Widmungsempfänger',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Widmungsempfänger::',
'periMsg': 'Widmungsempfänger',
'post': ']]'
}
}
},
'Nachrufempfänger' : {
'label': 'Nachrufempfänger',
'action': {
'type': 'encapsulate',
'options': {
'pre': '[[Nachruf auf::',
'periMsg': 'Nachruf auf',
'post': ']]'
}
}
},
}
},
//----------------
// 'AttributePersonen': {
// 'labelMsg': 'wikieditor-toolbar-tool-camerarius-properties-person',
// 'type': 'select',
// 'list': {
// 'Beruf' : {
// 'labelMsg': 'wikieditor-toolbar-tool-camerarius-job',
// 'action': {
// 'type': 'encapsulate',
// 'options': {
// 'pre': '[[Beruf::',
// 'periMsg': 'Beruf',
// 'post': ']]'
// }
// }
// },
// 'Studienort' : {
// 'labelMsg': 'wikieditor-toolbar-tool-camerarius-studyplace',
// 'action': {
// 'type': 'encapsulate',
// 'options': {
// 'pre': '[[Studienort::',
// 'periMsg': 'Studienort',
// 'post': ']]'
// }
// }
// },
// }
// },
//----------------
//Create the button parts
'Beschreibungen': {
'label': 'Beschreibungen',
'type': 'button',
'icon': {
'default': 'format-bold-B.png',
'en': 'format-bold-B.png',
'de': 'format-bold-B.png'
},
'action': {
'type': 'encapsulate',
'options': {
'pre': "{{Beschreibungen|",
'periMsg': 'Seitenname',
'post': "}}"
}
}
},
'MBW': {
'label': 'MBW',
'type': 'button',
'icon': {
'default': 'Toolbaricon_bold_M.png',
'en': 'Toolbaricon_bold_M.png',
'de': 'Toolbaricon_bold_M.png'
},
'action': {
'type': 'encapsulate',
'options': {
'pre': "[http://www.haw.uni-heidelberg.de/forschung/forschungsstellen/melanchthon/mbw-online.de.html MBW], Nr. ",
'periMsg': 'Nr.'
}
}
},
'Link': {
'label': 'Verlinkung',
'type': 'button',
'icon': {
'default': 'insert-ilink.png',
'en': 'insert-ilink.png',
'de': 'insert-ilink.png'
},
'action': {
'type': 'encapsulate',
'options': {
'pre': "[[",
'periMsg': 'Text',
'post': "]]"
}
}
},
/*'varianz': {
'label': 'Varianz',
'type': 'button',
'icon': {
'default': 'Toolbaricon_bold_V.png',
'en': 'Toolbaricon_bold_V.png',
'de': 'Toolbaricon_bold_V.png'
},
'action': {
'type': 'encapsulate',
'options': {
'pre': "[[Varianz::Varianz:",
'periMsg': 'KÜRZEL-NUMMER',
'post': "|↗]]"
}
}
},
'notiz': {
'label': 'notiz',
'type': 'button',
'icon': {
'default': 'Toolbaricon_bold_N.png',
'en': 'Toolbaricon_bold_N.png',
'de': 'Toolbaricon_bold_N.png'
},
'action': {
'type': 'encapsulate',
'options': {
'pre': "[[Notiz::Notiz:",
'periMsg': 'LINK-ERGÄNZEN',
'post': "|⤇]]"
}
}
},
'marginale': {
'id': 'marginale',
'label': 'marginale',
'type': 'button',
'icon': {
'default': 'Toolbaricon_bold_M.png',
'en': 'Toolbaricon_bold_M.png',
'de': 'Toolbaricon_bold_M.png'
},
'action': {
'type': 'marginale',
'options': {
//'pre': "[[Elemente::"+myPagename+"/Marginale|",
'pre': "[[Elemente::Marginale",
'periMsg': 'Marginale',
'post': "]]"
}
}
},*/
}
}
}
                    }
                }
            } );
        } );
}
}
//Camerarius Wikieditor Customization End

Aktuelle Version vom 6. Dezember 2024, 11:03 Uhr

let customizeToolbar = function () {
$('#wpTextbox1').wikiEditor('addToToolbar', {
    //Create new toolbar section Camerarius which is itself a toolbar               
    sections: {
        camerarius: {
            type: 'toolbar',
            label: 'Camerarius-Attribute',
            //Create dropdown part of the toolbar
            'groups': {
                'format': {
                    'tools': {
                        'Attribute': {
                            'label': 'Attribute-Allgemein',
                            'type': 'select',
                            'list': {
                                'Auftraggeber': {
                                    'label': 'Auftraggeber',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Auftraggeber::',
                                            'periMsg': 'Auftragsgeber',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Beeinflusser': {
                                    'label': 'Beeinflusser',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Beeinflusser::',
                                            'periMsg': 'Beeinflusser',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Briefpartner': {
                                    'label': 'Briefpartner',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Briefpartner::',
                                            'periMsg': 'Briefpartner',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähnte Körperschaft': {
                                    'label': 'Erwähnte Körperschaft',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähnte Körperschaft::',
                                            'periMsg': 'Körperschaft',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähnte Person': {
                                    'label': 'Erwähnte Person',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähnte Person::',
                                            'periMsg': 'Adressat',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähnter Ort': {
                                    'label': 'Erwähnter Ort',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähnter Ort::',
                                            'periMsg': 'Ort',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Erwähntes Werk': {
                                    'label': 'Erwähntes Werk',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Erwähntes Werk::',
                                            'periMsg': 'Erwähntes Werk',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Forschungsliteratur': {
                                    'label': 'Forschungsliteratur',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Forschungsliteratur::',
                                            'periMsg': 'Forschungsliteratur',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Gesprächspartner': {
                                    'label': 'Gesprächspartner',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Gesprächspartner::',
                                            'periMsg': 'Gesprächspartner',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Initiator': {
                                    'label': 'Initiator',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Initiator::',
                                            'periMsg': 'Initiator',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Lehrer': {
                                    'label': 'Lehrer',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Lehrer::',
                                            'periMsg': 'Lehrer',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Schüler': {
                                    'label': 'Schüler',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Schüler::',
                                            'periMsg': 'Schüler',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Student': {
                                    'label': 'Student',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Student::',
                                            'periMsg': 'Student',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Unterstützer': {
                                    'label': 'Unterstützer',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Unterstützer::',
                                            'periMsg': 'Unterstützer',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Werkadressat': {
                                    'label': 'Werkadressat',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Werkadressat::',
                                            'periMsg': 'Adressat',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Widmender': {
                                    'label': 'Widmender',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Widmender::',
                                            'periMsg': 'Widmender',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Widmungsempfänger': {
                                    'label': 'Widmungsempfänger',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Widmungsempfänger::',
                                            'periMsg': 'Widmungsempfänger',
                                            'post': ']]'
                                        }
                                    }
                                },
                                'Nachrufempfänger': {
                                    'label': 'Nachrufempfänger',
                                    'action': {
                                        'type': 'encapsulate',
                                        'options': {
                                            'pre': '[[Nachruf auf::',
                                            'periMsg': 'Nachruf auf',
                                            'post': ']]'
                                        }
                                    }
                                },
                            }
                        },
                        //Create the button parts
                        'Beschreibungen': {
                            'label': 'Beschreibungen',
                            'type': 'button',
                            'icon': {
                                'default': '/images/a/a2/Custom-toolbar-beschreibung.png',
                                'en': '/images/a/a2/Custom-toolbar-beschreibung.png',
                                'de': '/images/a/a2/Custom-toolbar-beschreibung.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': "{{Beschreibungen|",
                                    'periMsg': 'Seitenname',
                                    'post': "}}"
                                }
                            }
                        },
                        'MBW': {
                            'label': 'MBW',
                            'type': 'button',
                            'icon': {
                                'default': 'https://upload.wikimedia.org/wikipedia/commons/5/54/Mbutton.png',
                                'en': 'https://upload.wikimedia.org/wikipedia/commons/5/54/Mbutton.png',
                                'de': 'https://upload.wikimedia.org/wikipedia/commons/5/54/Mbutton.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': "[https://melanchthon.hadw-bw.de/regesten.html MBW - Regesten online], Nr. ",
                                    'periMsg': 'Regestnr.'
                                }
                            }
                        },
                        'Link': {
                            'label': 'Verlinkung',
                            'type': 'button',
                            'icon': {
                                'default': '/images/e/e0/Custom-toolbar-link.png',
                                'en': '/images/e/e0/Custom-toolbar-link.png',
                                'de': '/images/e/e0/Custom-toolbar-link.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': "[[",
                                    'periMsg': 'Text',
                                    'post': "]]"
                                }
                            }
                        },
                        'Binnenverweis': {
                            'label': 'Binnenverweis auf Lexikonseiten',
                            'type': 'button',
                            'icon': {
                                'default': 'https://upload.wikimedia.org/wikipedia/commons/1/13/Vector_toolbar_redirect_button.png',
                                'en': 'https://upload.wikimedia.org/wikipedia/commons/1/13/Vector_toolbar_redirect_button.png',
                                'de': 'https://upload.wikimedia.org/wikipedia/commons/1/13/Vector_toolbar_redirect_button.png'
                            },
                            'action': {
                                'type': 'encapsulate',
                                'options': {
                                    'pre': '[[',
                                    'periMsg': 'Lexikonseite#Kapitelname unformatiert|Kapitelname',
                                    'post': "]]"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
});
};

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
	// Add a hook handler.
	mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
		customizeToolbar();
	} );
}