treehouse : what would you like to learn today?
Web Design Web Development iOS Development

css-tricks text-area controls for wp

  • i can not find a way or plugin to add such buttons. like a "code" button. how can i add this ability?

  • Do you mean inside your admin section or front end for visitors to use?

    If it's visitors, for example, comments, I just made this that you could use;

    http://codepen.io/andyunleashed/pen/GdDzc

    Basically the JQuery takes the current value of the textarea, and then adds the required addition to it, in this case pre & code tags.

    Then they can type in to their hearts content. You'd have to edit the comments template of course to add in the link to add this code as well as adding the JQuery.