Registry / productivity / tinymce-line-height-plugin

tinymce-line-height-plugin

JSON →
library1.0.0jsnpmunverified

A basic TinyMCE plugin that adds a line-height formatter similar to font-size functionality. Current version 1.0.0, last updated 2018. The plugin adds a toolbar dropdown ('lineheightselect') and allows configuration of line-height formats. There are no maintenance updates or releases. It is designed specifically for TinyMCE version 4.x (tested on 4.1.5) and not compatible with TinyMCE 5/6. No npm package exists; developers must copy the plugin folder manually.

npm install tinymce-line-height-plugin
INSTALL
IMPORT
SIG · TINYMCE-LINE-HEIGH
T
tinymce-line-height-plugin
productivityjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lineheight
tinymce.init({ plugins: 'lineheight', toolbar: 'lineheightselect' })
tinymce.init({ plugins: 'line-height' })
Plugin key is 'lineheight' (no hyphen). Works only with TinyMCE 4.x.
lineheight_formats option
tinymce.init({ lineheight_formats: '8pt 10pt 12pt 14pt 18pt 24pt' })
tinymce.init({ line_height_formats: '...' })
Configuration option uses underscores and matches plugin name. Default formats are hardcoded if not set.
Plugin setup
Copy plugin folder into TinyMCE's plugins directory, e.g., 'tinymce/plugins/lineheight/'
npm install tinymce-line-height-plugin
There is no npm registry package. Manual installation required.

Demonstrates basic TinyMCE 4.x initialization with the lineheight plugin enabling a line-height selector dropdown.

// index.html <script src='tinymce/tinymce.min.js'></script> <textarea id='editor'>Hello World</textarea> <script> tinymce.init({ selector: '#editor', plugins: 'lineheight', toolbar: 'lineheightselect', lineheight_formats: '12pt 14pt 16pt 18pt 20pt 24pt 36pt' }); </script>
Debug
Known issues
deprecatedThis plugin is only compatible with TinyMCE 4.x (tested on 4.1.5). It will not work with TinyMCE 5 or 6.
fix
Migrate to TinyMCE 5/6 native line-height support or use a modern alternative.
affects: >=5.0
gotchaPlugin must be manually copied to TinyMCE plugins directory; there is no package manager installation.
fix
Download the plugin folder and place it inside tinymce/js/tinymce/plugins/.
affects: all
gotchaToolbar button name is 'lineheightselect' not 'lineheight'.
fix
Use toolbar: 'lineheightselect' in init config.
affects: all
gotchaPlugin key in plugins list is 'lineheight' without hyphen or space.
fix
Set plugins: 'lineheight' (not 'line-height' or 'line_height').
affects: all
Errors
Common errors & fixes
Uncaught TypeError: Cannot read property 'addButton' of undefined
TinyMCE version 5+ does not have editor.addButton; this plugin uses TinyMCE 4 API.
fix
Downgrade to TinyMCE 4.x or use a compatible line-height plugin for TinyMCE 5/6.
Failed to load plugin: lineheight from url .../plugins/lineheight/plugin.min.js
Plugin folder not present or incorrectly placed in TinyMCE plugins directory.
fix
Ensure the 'plugin.min.js' file exists at tinymce/plugins/lineheight/plugin.min.js.
tinymce is not defined
TinyMCE library not loaded before init.
fix
Include <script src='path/to/tinymce.min.js'></script> before the init script.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
tinymcerequiredRequires TinyMCE version 4.x to function
Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
tinymce-line-height-plugin — npm install tinymce-line-height-plugin · libregistry