Insert Special Characters

外掛說明

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": "¥" },
            ]
        };
    }
);

螢幕擷圖

  • 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).

安裝方式

  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!

常見問題集

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.

使用者評論

2020 年 10 月 7 日 1 則留言
THANK YOU! I am a typographer from way back when I was hand-setting (and pieing — the term for spilling) little pieces of metal in the forms of letters, numbers & dingbats. Special Characters is the WordPress feature I have missed most in Gutenberg, and your plugin is the first & only that makes inserting Special Characters easy and enjoyable. Look for a donation from this old type lover! ❤
2019 年 10 月 28 日 1 則留言
Thank You! It solves a big problem in Gutenberg, which misses this function!
2019 年 10 月 3 日 1 則留言
Thank you for this great plugin! WHY special characters are STILL absent from the Gutenberg Wordpress editor -- though it has been requested numerous times -- is quite the annoyance. This plugin is perfect! Thanks again!
2019 年 9 月 1 日 1 則留言
This is perfect for me. Thanks for developing it!If there was an option to move it to the main toolbar without the need to use the dropdown, it would be a six-star product
2019 年 8 月 31 日 1 則留言
This functionality has been missed and was surprised that it was omitted from Gutenberg. But, these folks did a great job. I loaded it to two sites and then edited posts adding special characters easily. Martin's suggestions about the location of the icon and automatically sorting by most used is on target. I join him in asking for those improvements. Mostly, I want to say thank you!!!
2019 年 8 月 31 日 1 則留言
This plugin adds a much needed functionality to the Gutenberg editor, and it works fine. To make it perfect for me it should be placed directly in the toolbar (not in a toolbar dropdown) and have a "last used" palette.
閱讀全部 6 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Insert Special Characters〉的開發相關工作。

參與者

〈Insert Special Characters〉外掛目前已有 5 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Insert Special Characters〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

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