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.
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": "AC;", "name": "Euro Sign", "char": "€" }, { "entity": "¢", "hex": "�A2;", "name": "Cent Sign", "char": "¢" }, { "entity": "£", "hex": "�A3;", "name": "Pound Sign", "char": "£" }, { "entity": "¥", "hex": "�A5;", "name": "Yen Sign", "char": "¥" }, ] }; } );
Example of special characters selection in the Block Editor.
"Special Characters" option in Paragraph Block menu.
Initial special characters, showing the "Math" character set.
Filtering the special characters via search.
Resulting inserted special character (note focus on special character, rest of window has been blurred).
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.
@babel/traverse
from 7.20.5 to 7.23.2 (props @dependabot, @dkotter via #219).semver
from 5.7.1 to 5.7.2 (props @dependabot, @dkotter via #202).word-wrap
from 1.2.3 to 1.2.4 (props @dependabot, @Sidsector9 via #206).@cypress/request
from 2.88.10 to 3.0.0, cypress
from 12.8.1 to 13.3.1 and @10up/cypress-wp-utils
from 0.1.0 to 0.2.0 (props @dependabot, @dkotter via #213).tough-cookie
from 4.1.2 to 4.1.3 and @cypress/request
from 2.88.10 to 2.88.12 (props @dependabot, @ravinderk via #214).postcss
from 8.4.20 to 8.4.31 (props @dependabot, @faisal-alvi via #216).@sideway/formula
from 3.0.0 to 3.0.1 (props @dependabot, @faisal-alvi via #186).webpack
from 5.75.0 to 5.76.1 (props @dependabot, @faisal-alvi via #188).simple-git
from 3.15.1 to 3.19.1 (props @dependabot, @dkotter via #200).ua-parser-js
from 0.7.32 to 0.7.35 (props @dependabot, @dkotter via #201).Note that this release bumps the WordPress minimum from 5.7 to 6.1. and minimum PHP version from 5.6 to 7.4
Active
to Stable
(props @jeffpaul, @Sidsector9 via #184).
character (props @redorca, @Sidsector9, @iamdharmesh via #159).wp-env
from 4.9 to to 5.3 (props @peterwilsoncc, @Sidsector9 via #161).loader-utils
from 2.0.2 to 2.0.4 (props @dependabot, @Sidsector9 via #171).simple-git
from 3.14.1 to 3.16.0 (props @dependabot, @jeffpaul via #175, #182).json5
from 1.0.1 to 1.0.2 (props @dependabot, @Sidsector9 via #180).ua-parser-js
from 0.7.32 to 0.7.33 (props @dependabot, @peterwilsoncc via #183).http-cache-semantics
from 4.1.0 to 4.1.1 (props @dependabot, @Sidsector9 via #185).Note that this release bumps the WordPress minimum supported version from 5.4 to 5.5.
Settings > Writing
(props @Sidsector9, @faisal-alvi via #147).guzzlehttp/psr7
from 1.6.1 to 1.8.5 (props @dependabot via #119).minimist
from 1.2.5 to 1.2.6 (props @dependabot via #120).ansi-regex
from 3.0.0 to 3.0.1 (props @dependabot via #121).async
from 2.6.3 to 2.6.4 (props @dependabot via #124).semver-regex
from 3.1.3 to 3.1.4 (props @dependabot via #128).react-character-map
from 0.4.4 to 0.4.6 (props @dependabot via #139).@wordpress/env
from 4.3.1 to 4.9.0 (props @dependabot via #140).@10up/cypress-wp-utils
from ecf048c
to d52e775
(props @dependabot via #142).husky
from 4.3.8 to 8.0.1 (props @dependabot via #144).react-character-map
from 0.4.2 to 0.4.4 (props @jeffpaul, @Sidsector9).v0.4.2
(props @johnwatkins0, @dinhtungdu, @jeffpaul).master
to trunk
, so please make sure to update and direct references to master
in downstream code (props @jeffpaul).acorn
from 5.7.3 to 5.7.4 (props @dependabot).ini
from 1.3.5 to 1.3.7 (props @dependabot).elliptic
from 6.5.2 to 6.5.4 (props @dependabot).y18n
from 4.0.0 to 4.0.1 (props @dependabot).rmccue/requests
from 1.7.0 to 1.8.0 (props @dependabot).ssri
from 6.0.1 to 6.0.2 (props @dependabot).lodash
from 4.17.15 to 4.17.21 (props @dependabot).browserslist
from 4.8.7 to 4.16.6 (props @dependabot).path-parse
from 1.0.6 to 1.0.7 (props @dependabot).enqueue_block_editor_assets
so script is only enqueued in editor (props @adamsilverstein, @josch87).