我试图在这里添加//自定义css到微小的mce编辑器中,但目前它删除了样式标记和保存时它们之间的任何东西。我试图设置valid_elements:"style“和/或custom_elements:"sabioStyle”和/或extended_valid_elements:"style“。我也试过:"[]“根据tiny的文档,但它似乎对任何事情都没有影响。我看到init功能:
piranha.editor.addInline = function (id, toolbarId) {
tinymce.init({
selector: "#" + id,
browser_spellcheck: true,
fixed_toolbar_container: "#" + toolbarId,
menubar: false,
branding: false,
statusbar: false,
inline: true,
convert_urls: false,
plugins: [
piranha.editorconfig.plugins
],
width: "100%",
autoresize_min_height: 0,
toolbar: piranha.editorconfig.toolbar,
extended_valid_elements: piranha.editorconfig.extended_valid_elements,
block_formats: piranha.editorconfig.block_formats,
style_formats: piranha.editorconfig.style_formats,
file_picker_callback: function(callback, value, meta) {
// Provide file and text for the link dialog
if (meta.filetype == 'file') {
piranha.mediapicker.openCurrentFolder(function (data) {
callback(data.publicUrl, { text: data.filename });
}, null);
}
// Provide image and alt text for the image dialog
if (meta.filetype == 'image') {
piranha.mediapicker.openCurrentFolder(function (data) {
callback(data.publicUrl, { alt: "" });
}, "image");
}
}
});
$("#" + id).parent().append("<a class='tiny-brand' href='https://www.tiny.cloud' target='tiny'>Powered by Tiny</a>");
};Piranha使用sets extended_valid_elements: piranha.editorconfig.extended_valid_elements,但是我的开发工具没有显示我在editorconfig.json中键入的值.
我试过了他们的医生说的每一件事,我也有一个关于Piranha的github的问题。任何建议都会很好!谢谢
发布于 2021-07-24 18:54:51
https://stackoverflow.com/questions/68505725
复制相似问题