WordPress.org

Ready to get started?Download WordPress

Forums

Does anyone have a properly formatted quicktag.js? (5 posts)

  1. vurtomatic
    Member
    Posted 5 years ago #

    Hi, I'm trying to edit my quicktags.js but the file I have on my server, and the file that came with wordpress-2.8.4.zip, has all the code on one line.

    And I can't tell where something ends and begins.

    Any help?

    Thanks.

  2. Mark / t31os
    Moderator
    Posted 5 years ago #

    Regex search and replace for the win!.. :)

    http://wordpress.pastebin.com/f5316f334

    Hope that helps..

  3. vurtomatic
    Member
    Posted 5 years ago #

    Hey t31os_, I am not familiar with pastebin. How does this work?

    Did you paste the code for 2.84's quicktags.js onto the webpage and it formatted it for you?

    Or is this a different version of quicktags.js that is work in progress since the site is a debugging tool?

    Thanks, really appreciate it, so much easier to work out which bits I need to edit.

  4. vurtomatic
    Member
    Posted 5 years ago #

    I am trying to add these buttons to the html editor:

    edButtons[edButtons.length]=new edButton("ed_span_image","image","<span class="image">","</span>","");
    edButtons[edButtons.length]=new edButton("ed_span_full-image","full-image","<span class="full-image">","</span>","");

    But everytime I save the quicktags.js file and reload my new post page, the row of quicktags disappear completely.

  5. Mark / t31os
    Moderator
    Posted 5 years ago #

    All i did was take the quicktags.js (wp-includes/js/quicktags.js), reformat the code onto several lines using a regex search and replace then place the code into a pastebin.. (nothing has changed code wise in that file).

    Which as far as i can tell is what you asked for...

    Anything beyond that (editting) you'll have to ask additional questions. I can't help you with JS, i have very little experience with anything more then very basic JS.

    Using the code from the pastebin, be sure to use the code further down the page, to avoid copying the line numbers...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags