目前我们仅限于这些样式,粗体、斜体、链接、取消链接、锚点、表格、BulletedList、Blockquote、Strike、下标、上标
有什么方法可以在这里添加更多东西,例如:color 和 abc,以便我们可以根据 css 中的要求更改 abc 属性
谢谢
目前我们仅限于这些样式,粗体、斜体、链接、取消链接、锚点、表格、BulletedList、Blockquote、Strike、下标、上标
有什么方法可以在这里添加更多东西,例如:color 和 abc,以便我们可以根据 css 中的要求更改 abc 属性
谢谢
allowedTags:['h3','h4','h5','h6','blockquote','p','a','ul','ol','span','nl','li' , 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'caption', ' tbody','tr','th','td','pre','bgcolor','sup','sub'],
['粗体','span','h6','斜体','-','下标','上标','-','链接'],*
所以在 allowedTag 中 span 是可用的,但是当我在工具栏中放同样的东西时,我只看到 Bold , Italic 但没有 span
是的,你可以这么做。请参阅官方 HOWTO:在 Apostrophe 中配置 CKEditor。这还包括如何配置 Apostrophe 的 HTML 清理过滤器以允许您想要的东西。
我尝试添加 justify 插件,以便能够将文本向右、向左或居中对齐。但是在按照文档中的说明进行操作之后,我想知道插件是否应该位于特定文件夹中(我的文件夹位于 public/modules/apostrophe-areas/js/ckeditorPlugins/justify/)以及如何在工具栏上调用插件.
这是我的代码以防万一:(位于 lib/modules/apostrophe-areas/public/js/user.js)
apos.define('apostrophe-areas', {
construct: function(self, options) {
// Use the super pattern - don't forget to call the original method
var superEnableCkeditor = self.enableCkeditor;
self.enableCkeditor = function() {
superEnableCkeditor();
// Now do as we please
CKEDITOR.plugins.addExternal('justify', '/modules/apostrophe-areas/js/ckeditorPlugins/justify/', 'plugin.js');
};
}
});