
內容簡介
Insert Special Characters 外掛讓使用者在 WordPress 的區塊編輯器(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
Requires PHP 7.4+.
Requires WordPress 6.6+
Issues and Pull requests welcome in the GitHub repository.
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": "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": "¥" },
]
};
}
);
