Quicktags Guide – úprava HTML editoru
WordPress Quicktags Guide - Usnadněte si práci v HTML editoru WordPressu, přidejte si vlastní definované Quicktagy, není to nějak složité.
WordPress Quicktags Guide - Make editing your WordPress Weblog even easier. Quicktags are those useful one-click buttons that insert code for you, now the good news is that you can add to this quicktags list should you use a lot of tags that are not already there, and here is how.
Od verze 2.0 najdete soubor quicktags.js v adresáři /wp-includes/js/. Pravým tlačítkem otevřete tento soubor v Notepadu, PcPadu.
Hned na začátku souboru vidíte:
-
function edButton(id, display, tagStart, tagEnd, access, open) {
-
this.id = id; // used to name the toolbar button
-
this.display = display; // label on button
-
this.tagStart = tagStart; // open tag
-
this.tagEnd = tagEnd; // close tag
-
this.access = access; // access key
-
this.open = open; // set to -1 if tag does not need to be closed
-
}
Všechno co potřebujeme k vytvoření dalšího tlačítka vydíme v následující definici postupně vyplňte název tlačítka, otvírací a zavírací značku (pokud se jedná o párovou značku), zadejte klávesu jež v použití s klávesou Alt bude platit jako klávesová zkratka.
-
edButtons[edButtons.length] = new edButton('ed_strong'
-
,'strong'
-
,'<strong>'
-
,'</strong>'
-
,'b'
-
);









