內容簡介
功能
起草和編輯文章。
自動儲存。編輯完畢後立即發布。
上下文工具。粗體、斜體、刪除線、連結、標題、清單和引用。
使用 WordPress 媒體庫添加媒體。
方便的快捷鍵,例如 (*, – or 1.) 用於清單、(>)用於引用和(—)用於水平線。
從此列表自動嵌入媒體。只需貼上URL。
也可以通過直接貼上URL來添加文本連結。
如果您的佈景主題支援,還可以添加特色圖片。
配置和擴展
此外掛程式設計為“即插即用”,但也可進行配置和擴展。
工具列和按鈕
您可以使用以下過濾器向任何工具列添加更多按鈕:
fee_toolbar_caret 用於插入符號,
fee_toolbar_inline 用於普通選擇,
fee_toolbar_block 用於塊選擇。
例如:
add_filter('fee_toolbar_inline', function($buttons){
return array_merge($buttons, array('subscript'));
});
您可能需要提供額外的 CSS 和 JS。有關使用 TinyMCE 添加工具列按鈕的詳細信息,請參閱代碼手冊和TinyMCE docs。
鏈接到編輯器
您可以使用正常的編輯連結從網站上的任何位置鏈接到編輯器,然後將其捆綁到掛件中。使用edit_post_link或類似功能。
自定義文章類型支援
add_post_type_support( 'page', 'front-end-editor' );
請確保您還支援REST API。
禁用
如需禁用某些文章的編輯器,您可以使用supports_fee過濾器。
//禁用 ID 為1的文章。
add_filter('supports_fee', function($supports, $post) {
return $post->ID !== 1;
}, 10, 2);
外掛標籤
開發者團隊
② 後台搜尋「Front-end Editor for WordPress」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
Features
Draft and edit posts.
Autosaves. Just publish when you’re done.
Contextual tools. Bold, italic, strikethrough, link, headings, lists and blockquote.
Add media with the WordPress media library.
Handy shortcuts for lists (*, – or 1.), blockquote (>) and horizontal rule (—).
Automatically embed media from this list. Just paste the URL.
You can also link text by just pasting the URL over it.
Add a featured image, if your theme supports it.
Configure and extend
This plugin is designed to be “plug and play”, but also configurable and extensible.
Toolbars and buttons
You can add more buttons to any of the toolbars with the following filters:
fee_toolbar_caret for the caret,
fee_toolbar_inline for normal selections,
fee_toolbar_block for block selections.
E.g.
add_filter('fee_toolbar_inline', function($buttons){
return array_merge($buttons, array('subscript'));
});
You may need to provide extra CSS and JS. See the Codex page and TinyMCE docs for more information about adding toolbar buttons with TinyMCE.
Linking to the editor
You can link to the editor from anywhere on the website with the normal edit link to the admin, and it will be picked up by the plugin. Use edit_post_link or similar.
Custom Post Types Support
add_post_type_support( 'page', 'front-end-editor' );
Please make sure you also support the REST API.
Disable
If you’d like to disable the editor for certain posts, you can use the supports_fee filter.
// Disable for the post with ID 1.
add_filter('supports_fee', function($supports, $post) {
return $post->ID !== 1;
}, 10, 2);
