Results 1 to 4 of 4

Thread: Looking for some easy tutorials on creating custom buttons for Visual Editor

  1. #1
    PaulCunningham's Avatar
    PaulCunningham is offline Hello World
    Join Date
    Jan 2009
    Location
    Brisbane, Australia
    Posts
    70

    Default Looking for some easy tutorials on creating custom buttons for Visual Editor

    Hopefully someone can help me here. I've been searching around trying to find some good tutorials or examples on creating custom buttons for the Visual Editor.

    I want to create a couple of buttons to wrap selected text in certain code.

    Eg, like the blockquote button adds < blockquote >< /blockquote > to selected text, I've got a few classes I'd like to be able to add to bits of blog posts in certain themes.

    I've cracked open various core files that seemed relevant but just can't find a good example in the existing code, nor can I find a good tutorial on the web.

    Any tips?

  2. #2
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    It's run by TinyMCE and the relevant files are all minimized in the core. :) Any of the TinyMCE plugins I've found just let you add exisiting options - even though they are a lot. I have no idea how you'd add a custom button tho.

  3. #3
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    595

    Default

    Havent seen any tutorialas. Learnt all from the TinyMCE wiki: http://wiki.moxiecode.com/index.php/TinyMCE:Index
    Its somewhat convoluted but I've made some. Can copy what I did in my plugin: http://wordpress.org/extend/plugins/gwo4wp/
    It has custom buttons with linkinsertion and wrapping. Also utilizes toggle.
    Also check out http://wordpress.org/extend/plugins/tinymce-advanced/

  4. #4
    PaulCunningham's Avatar
    PaulCunningham is offline Hello World
    Join Date
    Jan 2009
    Location
    Brisbane, Australia
    Posts
    70

    Default

    Thanks guys I'll check those out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •