答案 0 :(得分:0)
希望这会有所帮助,图标会收到图标的网址,如果您不想要文字然后将文字留空,如果您使用wordpress,您可以使用短划线图标指定图标的类,然后将css排入队列wp admin,有意义吗?
tinymce.init({ selector: "textarea", setup: function(editor) { editor.addButton('report_design', { type: 'menubutton',//leave empty if only want icon text: ' LEAVE BLANK ', icon: 'YOURclassHERE',//add class for css use or url to icon menu: [ {text:'Data', menu:[{text:'sub1'},{text:'sub2'}], onclick: function() {editor.insertContent('text');}} ] }); }, toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | emoticons | forecolor backcolor | print | report_design " });
您可以尝试var icon_url = 'path-to-icon-here';