Soft Hyphen Inserter

Description

Did you know that WordPress inserts automatic wordbreaks to prevent horizontal scrollbars when writing very long words into the Gutenberg Editor? This plugin adds the option to disable it and adds a button into the block toolbar to insert a hidden character – the soft hyphen. It only appears when there is not enough space. This way the word breaks where it should and where it is correct.

Plugin Features

  • inserts a hidden symbol which breaks your (long) word when necessary
  • find a new button in toolbar dropdown “more” “optional hyphenation”
  • has a settings page where you can find an option to disable the automatic hyphenation by WordPress when using the soft hyphens in that particular block
  • has an option to place the soft hyphen inserter button directly into the block toolbar for faster access
  • you can also use keyboard shortcut shift+cmd+h (mac OS) for soft hyphen placement
  • the plugin also indicates if the selected block contains a soft hyphen and if the caret/cursor is on that position, you can remove it by clicking the insert-button again

Screenshots

  • new Button in Toolbar of Paragraph and Headings Block
  • can be placed into the toolbar dropdown (default behaviour)
  • build in function to detect the hyphens and remove them again
  • simple plugin settings
  • live demonstration of how to use the plugin

Installation

  1. Upload the plugin files to the /wp-content/plugins/soft-hyphen-inserter directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the Plugins screen in WordPress
  3. Use the Settings Soft Hypen Inserter screen to configure the plugin defaults
  4. Use the plugin functions through the toolbar dropdown in heading and paragraph block

FAQ

Does it create a new block?

No, it just adds a new option / button to the “Rich Text Toolbar” of the heading and paragraph block

What are use cases for this plugin?

When writing text in paragraph or heading block with long words, it can happen that the build in WordPress-CSS will break words in order to avoid horizontal scrollbars in viewport. Which is basically a nice feature will produce wrong word hyphenation in most cases. This plugin gives you the full control of hyphenation.

Does it load any additional assets in the frontend?

No, it just adds one CSS-class and an inline CSS-rule when activating “Disable automatic hyphenation” on settings page.

What happens when i disable the plugin?

You can easily disable and delete the plugin without any effects. The placed soft hyphens will stay in place and will still work.

Who is the author of the plugin?

The WordPress-User “nicmare” vibe coded it. Means he had the idea of the plugin and uses AI to craft the code.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Soft Hyphen Inserter” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Soft Hyphen Inserter” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.1

  • added screenshots and description

1.0

  • first release of the plugin