修改blue标签
This commit is contained in:
@@ -119,15 +119,14 @@ const tableStyle = `
|
||||
}
|
||||
table span blue {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}blue {
|
||||
}
|
||||
blue {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
blue sup {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
blue sub {
|
||||
blue *{
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
|
||||
.wordTableHtml table tr.table-header-row:nth-of-type(2) td {
|
||||
border-bottom: 1px solid #000 !important;
|
||||
}
|
||||
@@ -391,6 +390,10 @@ export default {
|
||||
var _this = this;
|
||||
window.tinymce.init({
|
||||
..._this.tinymceOtherInit,
|
||||
extended_valid_elements: 'blue[*]',
|
||||
custom_elements: 'blue',
|
||||
valid_children: '+blue[#text|i|em|b|strong|span],+body[blue],+p[blue]',
|
||||
|
||||
inline: false, // 使用 iframe 模式
|
||||
selector: `#${this.tinymceId}`,
|
||||
// noneditable_regexp: "/<wmath>.*?<\/wmath>/g",
|
||||
@@ -406,10 +409,13 @@ export default {
|
||||
content_style: `
|
||||
${tableStyle}
|
||||
${_this.wordStyle}
|
||||
blue{
|
||||
display: inline;
|
||||
}
|
||||
`,
|
||||
formats: {
|
||||
bold: { inline: 'b' },
|
||||
italic: { inline: 'i' }
|
||||
italic: { inline: 'i' },
|
||||
},
|
||||
body_class: 'panel-body ',
|
||||
object_resizing: false,
|
||||
@@ -617,9 +623,9 @@ export default {
|
||||
},
|
||||
paste_preprocess: function (plugin, args) {
|
||||
let imgIdx = 0;
|
||||
|
||||
|
||||
const silentPlaceholder = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
||||
|
||||
|
||||
let content = args.content.replace(/(<img[^>]*?)src="file:\/\/\/[^" ]*"/gi, (match, p1) => {
|
||||
// 保留 data-idx, Word 里的尺寸
|
||||
return `${p1}src="${silentPlaceholder}" class="word-img-placeholder" data-idx="${imgIdx++}"`;
|
||||
@@ -702,9 +708,9 @@ export default {
|
||||
},
|
||||
init_instance_callback: (editor) => {
|
||||
if (_this.value) {
|
||||
editor.setContent(_this.value);
|
||||
|
||||
editor.setContent('<p>'+_this.value+'</p>');
|
||||
|
||||
// console.log('at line 489:', ' 页面');
|
||||
setTimeout(() => {
|
||||
window.renderMathJax(_this.tinymceId); // 初始化时渲染 MathJax
|
||||
}, 10);
|
||||
@@ -910,5 +916,4 @@ export default {
|
||||
::v-deep .tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user