WordPress.org

Ready to get started?Download WordPress

Forums

edited quicktags.js - nothing changes (4 posts)

  1. NeuroDoc
    Member
    Posted 6 years ago #

    When writing a post I do not use the visual editor, preferring to edit directly in the HTML editor (in fact I have turned the visual editor off in my user profile). I wanted to add a quicktag button and modify the blockquote button, so I made changes to quicktags.js. Alas, nothing changed. When I write a post the new button isn't present, and the modifications to blockquote don't work.

    I also noticed that there are a number of buttons in quicktags that don't appear on my bar when writing a post.

    So is it possible to change the quicktag buttons in the html editor? If so, how?

  2. syncbox
    Member
    Posted 5 years ago #

    I was just looking over the quicktags.js file and it appears to be much more difficult to modify... if you look down near the end of the file, it looks like you have to not only make your changes up at the top (in previous versions of WordPress) but you have to integrate them into the functions.

    Sigh. This was something that I really liked about the way it WAS.

  3. eTraxx
    Member
    Posted 5 years ago #

    Having had the same problem, I tried something simple. The Bold tag appears twice in quicktags.js

    First:

    edButtons[edButtons.length] =
    new edButton('ed_strong'
    ,'b'
    ,'<strong>'
    ,'</strong>'
    ,'b'
    );

    Second:

    t.Buttons[t.Buttons.length] = new edButton(name+'_strong','b','<strong>','</strong>','b');

    In both cases the label for the button is 'b'

    I changed that from the 'b' to 'bold' and uploaded the file. Nothing changes. I then noticed that in the Editor the 'b' label is BOLD. Look back at the code. It doesn't BOLD the 'b' .. while the next bit of code for the has the 'i' in italic in the Editor. Again .. no formatting is done.

    Tells me that the quicktags.js file is NOT being used to create the tags in the Editor.

  4. eTraxx
    Member
    Posted 5 years ago #

    Well. THAT is interesting. I have been using the Google Chrome browser. Guess what? I just tried IE, Firefox, Opera .. and they all show the b changed to 'Bold'. I went back to Chrome. Nadda. Tried refresh. Nadda.

    So.

Topic Closed

This topic has been closed to new replies.

About this Topic