An easy way to implement tooltip element in the WordPress Block Editor
- This lightweight plugin adds button "Tooltip" to the RichText toolbar.
- Use it to paste popover tooltips over the words and phrases in your articles.
- You can style tooltips with the admin settings page.
- You can also style tooltips with CSS and using filters:
add_filter('izbet_style_text_color', function() { return '#247DE0'; });
add_filter('izbet_style_border_color', function() { return '#247DE0'; });
add_filter('izbet_style_tooltip_text_color', function() { return '#fff'; });
add_filter('izbet_style_tooltip_background_color', function() { return 'rgba(0, 010, 030, .85)'; });
add_filter('izbet_style_tooltip_font_size', function() { return '.8rem'; });
add_filter('izbet_style_tooltip_padding', function() { return '.6rem'; });
add_filter('izbet_style_tooltip_border_radius', function() { return '.3rem'; });- Install PHP dependencies:
composer install - Install JS dependencies:
yarn installornpm install - Compile styles:
yarn run build-stylesornpm run build-styles - Compile JS scripts:
yarn run build-scriptsornpm run build-scripts
- Run ESLint:
yarn run eslintornpm run eslint - Run PHP CodeSniffer:
composer run-script phpcsoryarn run phpcsornpm run phpcs
- Upload
iz-block-editor-tooltipsfolder to the/wp-content/plugins/directory. - Activate the plugin through the "Plugins" menu in WordPress.
- Visit
"Settings" -> "IZ BET Setting"in the admin menu to set up tooltip colors.
For the plugin’s changelog, please see the Releases page on GitHub.
