如何添加在hallo.js编辑器中添加类的按钮?如何在w rich richtextfiled中添加自定义类
这是我的代码,但它不工作,它在wagtai; s编辑界面ony注册功能。最后,我需要添加任何类到选择或当前标记。 MB我可以在html中看到它,并手动添加类?
(function() {
(function(jQuery) {
return jQuery.widget('IKS.center', {
options: {
editable: null,
toolbar: null,
uuid: '',
buttonCssClass: 'center'
},
populateToolbar: function(toolbar) {
var buttonElement, buttonset;
buttonset = jQuery('<span class="' + this.widgetName + '"></span>');
buttonElement = jQuery('<span></span>');
buttonElement.hallobutton({
uuid: this.options.uuid,
editable: this.options.editable,
label: 'Center element',
command: 'addClass("center")',
icon: 'icon-horizontalrule',
cssClass: this.options.buttonCssClass
});
buttonset.append(buttonElement);
buttonset.hallobuttonset();
return toolbar.append(buttonset);
}
});
})(jQuery);
}).call(this);
我试图StreamFiled但不明白我怎么能做出例如几个图像。标题 - 图像 - 一些文字 - 另一个标题 - 另一个图像? – Mihail
我看到它在循环可用!超!你年龄很大! – Mihail