• Jodit
  • PRO
  • Builder
  • Getting Started
  • Playground
  • Examples
  • Documentation
  • Download
  • Overview
  • Issue tracker
  • Docs
  • Plugins
  • Demo
  • Pricing
  • File Browser Pro
  • Sign in
Get connected wth us on social networks!

Footer

Jodit Core

  • Jodit Home page
  • Documentation
  • Playground
  • Examples
  • Github
  • Issues

Integration

  • Jodit React
  • Jodit Angular
  • Jodit Vue
  • Jodit Yii2
  • Jodit Joomla

PRO/OEM plugins

  • AutoComplete
  • Backup Plugin
  • Button Generator
  • Change case
  • Custom Color Picker
  • Emoji
  • Finder
  • Google Search
  • Paste code
  • Show Blocks
  • Virtual Keyboard
  • Tune block
  • Highlight signature
  • Google Maps Editor
  • Export in PDF
  • Page Break
  • Iframe Editor
  • Paste from Word PRO
  • Mobile View
  • ToDo List
  • Translate

Links

  • Demo PRO/OEM
  • Demo FileBrowser PRO
  • Price
  • License
  • Support
  • For resellers

Versions

  • site v.0.1.823
  • Jodit PRO v.4.6.9
  • Jodit v.4.6.2
  • All versions
2025 © Copyright: XDSoft.net <support@xdsoft.net>
  • Getting started

    • Installation
    • Usage
    • Support
    • FAQs
    • Cloud
    • Examples
  • How to

    • Create plugin
    • Add custom button
    • Add custom font in the font list
    • How to create module
    • How to generate license key
    • How to make a backend finder
    • How to set up document view
  • Modes

    • Source mode
  • Customisation

    • Theme
    • Keyboard
  • API

    • License Rest API
    • JS API
  • Changelog

  • Plugins

    • AutoComplete
    • Backup Plugin
    • Button Generator
    • Change case
    • Custom Color Picker
    • Emoji
    • Finder
    • Google Search
    • Paste code
    • Show Blocks
    • Virtual Keyboard
    • Tune block
    • Highlight signature
    • Google Maps Editor
    • Export in PDF
    • Page Break
    • Iframe Editor
    • Paste from Word PRO
    • Mobile View
    • ToDo List
    • Translate

Tune Block Plugin

This plugin adds a popup menu for block-level elements, allowing users to quickly modify, move, align, or change the tag of selected blocks. The popup appears when a user clicks on a block element, providing contextual options for that specific element type.

Features

  • Adds a popup menu for block-level elements
  • Allows moving blocks up and down
  • Provides options to change block types (e.g., convert paragraph to heading)
  • Supports custom buttons and actions
  • Can be configured differently for each HTML tag

Installation

If you are using a fat build of the editor, then the plugin is already included in it. If you are using the slim build, then you need to enable it manually:

Jodit.make('#editor', { extraPlugins: ['tune-block'] });
Copy

Options

tuneBlock.popup

  • Type: IDictionary<Array<IControlType | string>>
  • Default: See below

This option allows you to specify which buttons should appear in the popup menu for each HTML tag. You can use predefined buttons, buttons from other plugins, or create custom buttons.

Default configuration:

{ p: ['tune.up', 'tune.remove', 'tune.down'], table: ['tune.up', 'tune.remove', 'tune.down'], img: ['tune.up', 'tune.remove', 'tune.down'], blockquote: ['tune.up', 'tune.remove', 'tune.down'], div: ['tune.up', 'tune.remove', 'tune.down'], pre: ['tune.editPre', 'tune.up', 'tune.remove', 'tune.down'], h1: ['tune.h1', 'tune.h2', 'tune.h3', '\n', 'tune.h4', 'tune.h5', 'tune.h6', '\n', 'tune.up', 'tune.remove', 'tune.down'], h2: ['tune.h1', 'tune.h2', 'tune.h3', '\n', 'tune.h4', 'tune.h5', 'tune.h6', '\n', 'tune.up', 'tune.remove', 'tune.down'], h3: ['tune.h1', 'tune.h2', 'tune.h3', '\n', 'tune.h4', 'tune.h5', 'tune.h6', '\n', 'tune.up', 'tune.remove', 'tune.down'], h4: ['tune.h1', 'tune.h2', 'tune.h3', '\n', 'tune.h4', 'tune.h5', 'tune.h6', '\n', 'tune.up', 'tune.remove', 'tune.down'], h5: ['tune.h1', 'tune.h2', 'tune.h3', '\n', 'tune.h4', 'tune.h5', 'tune.h6', '\n', 'tune.up', 'tune.remove', 'tune.down'], h6: ['tune.h1', 'tune.h2', 'tune.h3', '\n', 'tune.h4', 'tune.h5', 'tune.h6', '\n', 'tune.up', 'tune.remove', 'tune.down'] }
Copy

Built-in Buttons

The plugin provides several built-in buttons that can be used in the popup menu:

  • tune.up - Move block up
  • tune.remove - Delete block
  • tune.down - Move block down
  • tune.h1 - Convert block to Heading 1
  • tune.h2 - Convert block to Heading 2
  • tune.h3 - Convert block to Heading 3
  • tune.h4 - Convert block to Heading 4
  • tune.h5 - Convert block to Heading 5
  • tune.h6 - Convert block to Heading 6
  • tune.editPre - Edit pre block (works with the paste-code plugin)

Usage Examples

Basic Configuration

Jodit.make('#editor', { tuneBlock: { popup: { p: Jodit.atom(['align', 'tune.up', 'tune.remove', 'tune.down']) } } });
Copy

Using Buttons from Other Plugins

You can include buttons from other plugins in the tune block popup:

Jodit.make('#editor', { tuneBlock: { popup: { table: Jodit.atom(['brush', 'image', 'align']) } } });
Copy

Adding Custom Buttons

You can add your own custom buttons to the popup menu:

Jodit.make('#editor', { tuneBlock: { popup: { table: [ { icon: 'brush', name: 'Brush table in red', exec(editor, tableElm) { tableElm.querySelectorAll('td').forEach((td) => { td.style.backgroundColor = 'red'; }); editor.e.fire('afterExecTune.tune'); // close the tuner } } ] } } });
Copy

Disabling the Plugin for Specific Tags

To disable the tune block popup for a specific tag, set its value to null:

Jodit.make('#editor', { tuneBlock: { popup: { h3: null // No tune-block will be shown for H3 tag } } });
Copy

Disabling the Plugin Completely

To disable the plugin for all tags:

Jodit.make('#editor', { tuneBlock: { popup: Jodit.atom({}) // We erase all default values } });
Copy

Alternatively, you can disable the plugin using the disablePlugins option:

import JoditEditor from 'jodit-react'; <JoditEditor config={{ disablePlugins: ['tune-block'] }} />;
Copy

Advanced Configuration

Combining Default and Custom Buttons

You can combine default buttons with your custom buttons:

Jodit.make('#editor', { tuneBlock: { popup: { p: [ 'tune.up', { icon: 'pencil', name: 'Add Comment', exec(editor, element) { const comment = prompt('Enter your comment:'); if (comment) { element.dataset.comment = comment; } editor.e.fire('afterExecTune.tune'); } }, 'tune.down' ] } } });
Copy

Creating a Custom Layout with Line Breaks

You can use the string '\n' to create line breaks in the popup menu:

Jodit.make('#editor', { tuneBlock: { popup: { p: [ 'tune.h1', 'tune.h2', 'tune.h3', '\n', 'align', '\n', 'tune.up', 'tune.remove', 'tune.down' ] } } });
Copy

How It Works

  1. When a user clicks on a block-level element, the plugin checks if there are any popup options defined for that tag
  2. If options are found, a popup menu is displayed near the element
  3. When a button in the popup is clicked, its associated action is executed on the target element
  4. After the action is complete, the popup is automatically closed

This plugin enhances the editing experience by providing quick access to common block-level operations without requiring users to navigate through menus or use keyboard shortcuts.

Screenshots

Demo

Full demo including Premium Plugins! 

These examples display all of the plugins available with Jodit Editor PRO/OEM version.

Jodit Editor

Framework  plugins Complete  documentation Examples 
Try play