在羽毛笔编辑器中更改标签?
Change tags in quill editor?
我试图查看文档,但没有解释例如我如何更改粗体格式以在 <strong>text</strong>
标签而不是 <b>text</b>
标签之间换行文本?
var options = {
modules: {
placeholder: { text: attrs.rtePlaceholder, style: { color: '#A9A9A9' } }
}
};
var quil = new Quill('#' + element.attr('id'), options);
var Normalizer = Quill.require('normalizer');
delete Normalizer.ALIASES["STRONG"];
Normalizer.ALIASES["B"] = "STRONG";
quil.addFormat('bold', { tag: 'STRONG', prepare: 'bold' });
官方支持仍在提供中,但目前应该可以使用:
var Normalizer = Quill.require('normalizer');
delete Normalizer.ALIASES["STRONG"];
Normalizer.ALIASES["B"] = "STRONG";
quill.addFormat('bold', { tag: 'STRONG', prepare: 'bold' });
我试图查看文档,但没有解释例如我如何更改粗体格式以在 <strong>text</strong>
标签而不是 <b>text</b>
标签之间换行文本?
var options = {
modules: {
placeholder: { text: attrs.rtePlaceholder, style: { color: '#A9A9A9' } }
}
};
var quil = new Quill('#' + element.attr('id'), options);
var Normalizer = Quill.require('normalizer');
delete Normalizer.ALIASES["STRONG"];
Normalizer.ALIASES["B"] = "STRONG";
quil.addFormat('bold', { tag: 'STRONG', prepare: 'bold' });
官方支持仍在提供中,但目前应该可以使用:
var Normalizer = Quill.require('normalizer');
delete Normalizer.ALIASES["STRONG"];
Normalizer.ALIASES["B"] = "STRONG";
quill.addFormat('bold', { tag: 'STRONG', prepare: 'bold' });