You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TinyMCE工具栏Insertfile图标无法显示问题求助

Fix for TinyMCE Insertfile Icon Not Loading

Hey there, let's work through the most likely fixes for your missing insertfile icon issue:

1. Add the insertfile Plugin to Your Initialization

The biggest red flag here is that you’ve included insertfile in your toolbar, but haven’t added the corresponding plugin to your plugins array. TinyMCE requires each toolbar button to have its supporting plugin enabled. Update your plugins list to include "insertfile":

plugins: [ "advlist autolink lists link image charmap print hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor insertfile" ],

2. Check if the Icon File Exists in Your TinyMCE Setup

If adding the plugin doesn’t fix it, verify that the insertfile icon is present in your TinyMCE skin directory. For the "modern" theme you’re using, the icon should be at:
/tinymce/js/tinymce/skins/modern/icons/default/insertfile.png

If the file is missing:

  • Re-download the full TinyMCE package to get all default icons.
  • If you’re using a custom skin, add the insertfile icon (PNG or SVG) to the appropriate icons folder.

3. Ensure Your TinyMCE Version Supports the insertfile Button

Older versions of TinyMCE might not include the insertfile button by default. If you’re running an outdated version:

  • Upgrade to the latest stable release (don’t forget to back up your current setup first).
  • Double-check that the insertfile plugin and icon are supported in the new version.

4. Define a Custom Icon (As a Last Resort)

If none of the above works, you can manually add the icon using TinyMCE’s custom icon registry. Add this to your init code (replace the SVG with an icon that matches your toolbar style):

setup: function(editor) {
  editor.ui.registry.addIcon('insertfile', '<svg width="24" height="24" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>');
}

内容的提问来源于stack exchange,提问作者xu jixue

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 07:23:42