TYPO3 rte_ckeditor 插件
TYPO3 rte_ckeditor plugin
我尝试在 CKEditor 中插入一个 FontAwesome 插件。
https://github.com/brstuff/ckawesome
externalPlugins:
ckawesome:
resource: "EXT:siteconfig/Resources/Public/JavaScripts/RTE/Plugins/ckawesome/plugin.js"
我在该文件夹中复制了 Font Awesome 字体和 CSS,RTE 提供了一个弹出对话框的按钮。
但是控制台给了我 "Uncaught TypeError: $(...).select2 is not a function"
在plugin.js中是:
CKEDITOR.scriptLoader.load(CKEDITOR.plugins.getPath('ckawesome') + 'resources/select2/select2.full.min.js');
这个路径是正确的,但是是否应该使用 TYPO3 CKEditor 在不同的方法上加载这种方式的脚本?
首先,也许这个扩展可以解决问题
https://github.com/DirkPersky/rte-ckeditor-fontawesome
它添加的字体很棒,因此您无需重新发明那个轮子:-)
其次,如果你真的想找出为什么你自己的解决方案不起作用,请尝试找出什么路径
CKEDITOR.scriptLoader.load(CKEDITOR.plugins.getPath('ckawesome') + 'resources/select2/select2.full.min.js');
解决,可能是哪里出了问题。
我尝试在 CKEditor 中插入一个 FontAwesome 插件。 https://github.com/brstuff/ckawesome
externalPlugins:
ckawesome:
resource: "EXT:siteconfig/Resources/Public/JavaScripts/RTE/Plugins/ckawesome/plugin.js"
我在该文件夹中复制了 Font Awesome 字体和 CSS,RTE 提供了一个弹出对话框的按钮。
但是控制台给了我 "Uncaught TypeError: $(...).select2 is not a function"
在plugin.js中是:
CKEDITOR.scriptLoader.load(CKEDITOR.plugins.getPath('ckawesome') + 'resources/select2/select2.full.min.js');
这个路径是正确的,但是是否应该使用 TYPO3 CKEditor 在不同的方法上加载这种方式的脚本?
首先,也许这个扩展可以解决问题
https://github.com/DirkPersky/rte-ckeditor-fontawesome
它添加的字体很棒,因此您无需重新发明那个轮子:-)
其次,如果你真的想找出为什么你自己的解决方案不起作用,请尝试找出什么路径
CKEDITOR.scriptLoader.load(CKEDITOR.plugins.getPath('ckawesome') + 'resources/select2/select2.full.min.js');
解决,可能是哪里出了问题。