Insert Special Characters
10up By 10up

July 17, 2024

Insert Special Characters Plugin

A Special Character inserter for the WordPress block editor (Gutenberg).

Ever wanted to add a special character while working within the WordPress block editor (Gutenberg) and suddenly find yourself longing for the days of the Classic Editor and the Special Character inserter? Well long no more, the Insert Special Characters plugin is here to ease your publishing woes!

Note: you can display the popover via the ctrl/cmd + o keyboard shortcut.

Development takes place in the GitHub repository.

Technical Notes

Extending

To control the available tabs and characters, developers can filter the data set using the insertspecialcharacters-characters JavaScript (wp.hooks) filter.

For example, to create a character inserter that only provides currency symbols:

wp.hooks.addFilter( 'insertspecialcharacters-characters', // The filter name. 'mycallback', // Our callback namespace. function( component ) { // The callback function. // Return the categories/characters to display. // The data structure is: { category: [ character data ], category2: ... } return { "Currency": [ { "entity": "$", "hex": "", "name": "Dollar Sign", "char": "$" }, { "entity": "€", "hex": "&#20AC;", "name": "Euro Sign", "char": "€" }, { "entity": "¢", "hex": "&#00A2;", "name": "Cent Sign", "char": "¢" }, { "entity": "£", "hex": "&#00A3;", "name": "Pound Sign", "char": "£" }, { "entity": "¥", "hex": "&#00A5;", "name": "Yen Sign", "char": "¥" }, ] }; } ); 

Installation

  1. Install the plugin via the plugin installer, either by searching for it or uploading a .zip file.
  2. Activate the plugin.
  3. Use Insert Special Characters!

Screenshots

  1. Example of special characters selection in the Block Editor.

    Example of special characters selection in the Block Editor.

  2. "Special Characters" option in Paragraph Block menu.

    "Special Characters" option in Paragraph Block menu.

  3. Initial special characters, showing the "Math" character set.

    Initial special characters, showing the "Math" character set.

  4. Filtering the special characters via search.

    Filtering the special characters via search.

  5. Resulting inserted special character (note focus on special character, rest of window has been blurred).

    Resulting inserted special character (note focus on special character, rest of window has been blurred).

FAQ

How come I do not see all the special characters?

When a character is displayed using a font that doesn’t support that character, a default “not defined” glyph from that font is used. The “not defined” glyph in most fonts has the appearance of a rectangular box, or some variation of that.

One example of a font with support for wide range of glyphs is the Noto family by Google Fonts, which can be loaded by the theme to render the missing characters.

Changelog

1.1.2 – 2024-01-08

1.1.1 – 2023-10-17

  • Fixed: Address an issue where some blocks would crash due to a missing attribute (props @dkotter via #221).
  • Security: Bump @babel/traverse from 7.20.5 to 7.23.2 (props @dependabot, @dkotter via #219).

1.1.0 – 2023-10-16

1.0.7 – 2023-06-28

1.0.6 – 2023-02-07

Note that this release bumps the WordPress minimum from 5.7 to 6.1. and minimum PHP version from 5.6 to 7.4

1.0.5 – 2022-07-18

Note that this release bumps the WordPress minimum supported version from 5.4 to 5.5.

1.0.4 – 2022-01-27

1.0.3 – 2021-08-17

  • Added: Many new special characters (e.g., em dash, en dash, hair space, thin space, no-break space, en space, em space, zero width non-joiner, non-breaking hyphen) and groupings (Currency, Punctuation, Greek).
  • Added: Focus style on buttons to improve accessibility for keyboard users (props @samikeijonen).
  • Added: WP Acceptance tests (props @johnwatkins0, @jeffpaul).
  • Changed: Update to React Character Map v0.4.2 (props @johnwatkins0, @dinhtungdu, @jeffpaul).
  • Changed: Integrate @wordpress/scripts for building and linting (props @johnwatkins0, @ocean90, @adamsilverstein).
  • Changed: Renamed release branch from master to trunk, so please make sure to update and direct references to master in downstream code (props @jeffpaul).
  • Changed: Bump WordPress version “tested up to” 5.8 (props @jeffpaul, @davidchabbi, @pabamato, @ankitguptaindia, @phpbits, @BBerg10up).
  • Changed: Documentation updates (props @bobbingwide).
  • Fixed: Make UI text in the component translatable (props @johnwatkins0, @dinhtungdu).
  • Fixed: Popover initial focus on top instead of bottom or center of the contents (props @phpbits, @BBerg10up).
  • Fixed: Compatility with the new widget screen in WordPress 5.8 and formatting of returned elements (props @phpbits).
  • Security: Bump acorn from 5.7.3 to 5.7.4 (props @dependabot).
  • Security: Bump ini from 1.3.5 to 1.3.7 (props @dependabot).
  • Security: Bump elliptic from 6.5.2 to 6.5.4 (props @dependabot).
  • Security: Bump y18n from 4.0.0 to 4.0.1 (props @dependabot).
  • Security: Bump rmccue/requests from 1.7.0 to 1.8.0 (props @dependabot).
  • Security: Bump ssri from 6.0.1 to 6.0.2 (props @dependabot).
  • Security: Bump lodash from 4.17.15 to 4.17.21 (props @dependabot).
  • Security: Bump browserslist from 4.8.7 to 4.16.6 (props @dependabot).
  • Security: Bump path-parse from 1.0.6 to 1.0.7 (props @dependabot).

1.0.2 – 2019-11-22

  • Changed: Relicensed from MIT to GPLv2.
  • Fixed: Hook on enqueue_block_editor_assets so script is only enqueued in editor (props @adamsilverstein, @josch87).
  • Fixed: Register text domain to ensure translations can be loaded (props @ocean90).
  • Fixed: Bump WordPress version “tested up to” 5.3 (props @adamsilverstein).
  • Fixed: Documentation and credits (props @jeffpaul).

1.0.1 – 2019-09-06

1.0.0 – 2019-08-21

Details

  • Version: 1.1.2
  • Active installations: 4,000
  • WordPress Version: 6.1
  • Tested up to: 6.6.1
  • PHP Version: 7.4

Ratings


5 Stars
4 Stars
3 Stars
2 Stars
1 Stars