Skip to content

Add buttons with specified CSS classes to your WordPress TinyMCE editor

Notifications You must be signed in to change notification settings

codelight-eu/tinymce-button-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress TinyMCE Button Button

Add buttons to your TinyMCE editor. The "buttons" are actually just link tags with CSS classes you can define.

Screenshot

Installation

Via Composer:
composer require codelight/tinymce-button-button

Alternatively, download and install as a WordPress plugin.
Note that v2 of this plugin will only be released as a composer package.

Usage

Register different button styles using the following filter:

add_filter('tinyMCEButton', function ($buttons) {
    $buttons[] = [
        'text' => 'Intro Button', 
        'value' => 'button intro-button'
    ];
    return $buttons;
});

Every element in the $buttons array will create a new selectable button style.
The text parameter is displayed to the user when selecting button styles. The value parameter is used as the link class.

About

Add buttons with specified CSS classes to your WordPress TinyMCE editor

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •