Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter pierre-schmitz

    (@pierre-schmitz)

    I don’t need this plugin anymore. I figured out how to define Quicktags directly over the Quicktags API. It’s not really difficult.

    https://codex.www.ads-software.com/Quicktags_API

    Simply add a function to your functions.php and define the path to the JavaScript file containing the buttons:

    
    function load_my_quicktags() {
        // Load the <code>my-quicktags.js</code> file with the <code>QTags.addButton()</code> functions.
        wp_enqueue_script( 'my-quicktags', '/wp-content/themes/theme-name/path/to/quicktags.js', array( 'quicktags' ) );
    }
    
    add_action( 'admin_enqueue_scripts', 'load_my_quicktags' );
    

    The Javascript file looks like this, I added several buttons for glyphs and self-defined embed-shortcodes, to be compliant with the cookie law in Europe:

    
    QTags.addButton( 'pswd_noteas', "noteaser", "<!--noteaser-->", "", "", "Inhalt überhalb more in Singleansicht nicht anzeigen", 121);
    QTags.addButton( 'pswd_h2', "h2", "<h2>", "</h2>", "", "Zwischenüberschrift einfügen", 200);
    QTags.addButton( 'pswd_h3', "h3", "<h3>", "</h3>", "", "überschrift 3. Ordnung einfügen", 210);
    QTags.addButton( 'pswd_clearfix', "Clearfix", "<div class=\"clear\"></div>", "", "", "Ab hier Float beenden", 220);
    QTags.addButton( 'pswd_azlu', "?", "?", "", "", "", 230);
    QTags.addButton( 'pswd_azro', "“", "“", "", "", "", 240);
    QTags.addButton( 'pswd_az2l', "?", "?", "", "", "", 250);
    QTags.addButton( 'pswd_az2r', "?", "?", "", "", "", 260);
    QTags.addButton( 'pswd_ndash', "–", "–", "", "", "", 270);
    QTags.addButton( 'pswd_mdash', "—", "—", "", "", "", 280);
    QTags.addButton( 'pswd_pdf', "PDF", "[pdfjs-viewer url= fullscreen=true fullscreen_text=PDF%20in%20neuem%Tab%anzeigen]", "", "", "PDF einbetten", 290);
    QTags.addButton( 'pswd_yt', "YouTube", "[youtube video=\"\" start=\"\" end=\"\"]", "", "", "YouTube-Video einbetten", 300);
    QTags.addButton( 'pswd_ytpl', "YouTube-Playlist", "[youtube-playlist list=\"\" thumbfrom=\"\"]", "", "", "YouTube-Playlist einbetten", 310);
    QTags.addButton( 'pswd_insta', "Instagram", "[instagram src=\"\"][/instagram]", "", "", "", 320);
    QTags.addButton( 'pswd_sc', "SoundCloud", "[soundcloud track=\"\"]", "", "", "", 330);
    QTags.addButton( 'pswd_spfy', "Spotify", "[spotify episode=\"\"]", "", "", "", 340);
    QTags.addButton( 'pswd_ard', "ARD Audiothek", "[ardaudiothek episode=\"\"]", "", "", "", 350);
    QTags.addButton( 'pswd_embed', "Cookiesafe Embed", "[cookie][embed]", "[/embed][/cookie]", "", "", 360);
    QTags.addButton( 'pswd_info', "Infobox", "[infobox color=\"primary|secondary|neutral\" title=\"Titel der Infobox\"]", "[/infobox]", "", "Innerhalb der Infobox mit HTML arbeiten (p nicht vergessen!)", 370);
    QTags.addButton( 'pswd_qauth', "quotheauthor", "<span class=\"quoteauthor\">— </span>", "", "", "Tag für Zitatautor in Blockquotes", 380);
    QTags.addButton( 'pswd_p', "p", "<p>", "</p>", "", "", 390);
    QTags.addButton( 'pswd_image', "image", "[image attachment-id=\"\" enlarge-button=\"yes|no\"]", "", "", "", 400);
    QTags.addButton( 'pswd_audio', "audio", "[audio attachment-id=\"\"]", "", "", "", 410);
    
Viewing 1 replies (of 1 total)