元素
- // let wordButtonContainer = null; // 用来存储删除按钮
- // const _this = this;
- // window.tinymce.init({
- // height: '100%',
- // resize: true,
- // readonly: true, // 设置为只读模式
- // selector: `#${this.tinymceId}`,
- // content_css: false,
- // table_resize_bars: true,
- // valid_elements: '*[*]',
- // paste_preprocess: function (plugin, args) {
- // let content = args.content;
- // const container = document.createElement('div');
- // container.innerHTML = content;
- // _this.updateTableStyles(container);
- // args.content = container.innerHTML;
- // },
- // content_style: `${tableStyle + this.wordStyle}.tox .tox-edit-area::before{
- // border:none;
- // }
- // .isRemark {
- // display:flex;
-
- // align-items:center;
- // position:absolute;
- // top:-12px;
- // left:-12px;
- // z-index:2;
- // cursor: pointer;
-
- // }
- // .isRemark img{
- // width:15px;
- // height:15px;
- // margin-right:4px;
-
- // }
- // .isRemark span{
- // background-color: #fef0f0;
- // border-color: #fde2e2;
- // padding: 0 5px;
- // line-height: 19px;
- // color: #f56c6c;
- // font-size: 12px;display:inline-block;
-
- // }
- // .isRemark .Resolved{
- // background-color: #f0f9eb;
- // margin-left:10px;
- // border-color: #67c23a;
- // color:#67c23a;
- // font-weight:bold;
- // border-radius:2px;
-
- // }
-
- // img{
- // max-width:580px;
- // }blue {
- // color: rgb(0, 130, 170) !important;
- // }
- // `,
- // formats: {
- // bold: { inline: 'b' },
- // italic: { inline: 'i' }
- // },
- // body_class: 'panel-body ',
- // object_resizing: false,
- // toolbar: [],
- // menubar: false,
- // statusbar: false,
- // custom_colors: false,
- // color_map: ['000000', 'Black', '0082AA', 'TMR Blue'],
- // plugins: 'forecolor code paste table image resize',
- // end_container_on_empty_block: true,
- // content_css: 'default ',
-
- // setup(ed) {
- // ed.ui.registry.addButton('customBlue', {
- // text: 'Blue', // 按钮文本
- // onAction: function () {
- // // 在选中的文本周围包裹 标签的位置信息
- // const paragraphRect = paragraph.getBoundingClientRect();
- // const iframe = ed.getDoc().defaultView.frameElement;
- // const iframeRect = iframe.getBoundingClientRect();
- // var left = 0;
- // if (_this.isEditComment) {
- // left = 100;
- // } else {
- // left = 80;
- // }
- // // 创建按钮容器 div
- // wordButtonContainer = document.createElement('div');
- // wordButtonContainer.style.position = 'absolute';
- // wordButtonContainer.style.top = `${iframeRect.top + paragraphRect.top + window.scrollY - 20}px`; // 确保按钮容器位于 标签旁边
- // wordButtonContainer.style.left = `${iframeRect.left + paragraphRect.left + paragraphRect.width - left}px`;
- // wordButtonContainer.style.zIndex = '9999'; // 设置更高的值
- // wordButtonContainer.style.display = 'flex'; // 使用 flex 布局将按钮水平排列
- // wordButtonContainer.style.alignItems = 'center'; // 垂直居中
-
- // // 创建删除按钮
- // const deleteButton = document.createElement('button');
- // deleteButton.style.backgroundColor = 'red';
- // deleteButton.style.color = 'white';
- // deleteButton.style.border = 'none';
- // deleteButton.style.borderRadius = '50%';
- // deleteButton.style.padding = '5px';
- // deleteButton.style.cursor = 'pointer';
- // deleteButton.style.marginLeft = '10px'; // 给批注按钮添加间距
- // const deleteIcon = document.createElement('i');
- // deleteIcon.classList.add('el-icon-delete'); // 使用 Element UI 删除图标
- // deleteIcon.style.fontSize = '20px';
- // deleteIcon.style.color = '#fff'; // 设置图标颜色
- // deleteButton.appendChild(deleteIcon);
- // deleteButton.addEventListener('mousedown', function (e) {
- // e.stopImmediatePropagation();
- // e.preventDefault();
-
- // _this.$emit('onDelete', paragraph.getAttribute('main-id'));
- // });
-
- // // 创建批注按钮
- // const editButton = document.createElement('button');
- // editButton.style.backgroundColor = 'rgb(19, 188, 32)';
- // editButton.style.color = 'white';
- // editButton.style.border = 'none';
- // editButton.style.borderRadius = '50%';
- // editButton.style.padding = '5px';
- // editButton.style.marginLeft = '10px'; // 给批注按钮添加间距
- // editButton.style.cursor = 'pointer';
-
- // const editIcon = document.createElement('i');
- // editIcon.classList.add('el-icon-edit'); // 使用 Element UI 批注图标
- // editIcon.style.fontSize = '20px';
- // editIcon.style.color = '#fff'; // 设置图标颜色
-
- // editButton.appendChild(editIcon);
- // editButton.addEventListener('mousedown', function (e) {
- // e.stopImmediatePropagation();
- // e.preventDefault();
- // // 触发批注事件
- // _this.$emit('onEdit', paragraph.getAttribute('main-id'));
- // });
-
- // // 将按钮添加到容器中
- // wordButtonContainer.appendChild(editButton);
- // wordButtonContainer.appendChild(deleteButton);
-
- // if (_this.isEditComment) {
- // // 创建批注按钮
- // const commentButton = document.createElement('button');
- // commentButton.style.backgroundColor = '#2b81ef';
- // commentButton.style.color = 'white';
- // commentButton.style.border = 'none';
- // commentButton.style.borderRadius = '50%';
- // commentButton.style.padding = '5px';
- // commentButton.style.marginLeft = '10px'; // 给批注按钮添加间距
- // commentButton.style.cursor = 'pointer';
-
- // const commentIcon = document.createElement('i');
- // commentIcon.classList.add('el-icon-chat-dot-square'); // 使用 Element UI 批注图标
- // commentIcon.style.fontSize = '20px';
- // commentIcon.style.color = '#fff'; // 设置图标颜色
-
- // commentButton.appendChild(commentIcon);
- // commentButton.addEventListener('mousedown', function (e) {
- // e.stopImmediatePropagation();
- // e.preventDefault();
- // // 触发批注事件
- // _this.$emit('onAddComment', paragraph.getAttribute('main-id'));
- // if (wordButtonContainer) {
- // wordButtonContainer.remove(); // 移除删除按钮
- // wordButtonContainer = null; // 清空按钮引用
- // }
- // });
-
- // wordButtonContainer.appendChild(commentButton);
- // }
-
- // wordButtonContainer.classList.add('wordButtonContainer'); // 给按钮
- // // 将容器添加到页面中
- // document.body.appendChild(wordButtonContainer);
- // }
- // ed.on('mousedown', function (e) {
- // // 检查点击的位置是否是删除按钮或选中的 标签
- // if (!currentParagraph || (e.target !== wordButtonContainer && !currentParagraph.contains(e.target))) {
- // if (wordButtonContainer) {
- // wordButtonContainer.remove(); // 移除删除按钮
- // wordButtonContainer = null; // 清空按钮引用
- // }
- // }
- // });
- // }
- // },
-
- // init_instance_callback: (editor) => {
- // if (_this.value) {
- // editor.setContent(_this.value);
- // _this.$emit('loaded');
- // }
- // _this.hasInit = true;
- // editor.on('NodeChange Change KeyUp SetContent', () => {
- // this.hasChange = true;
- // this.$emit('input', editor.getContent());
- // });
-
- // const iframeDocument = editor.getDoc(); // 使用 ed.getDoc() 获取编辑器的 document
- // if (iframeDocument) {
- // iframeDocument.addEventListener('scroll', function () {
- // if (wordButtonContainer) {
- // wordButtonContainer.remove();
- // wordButtonContainer = null;
- // }
-
- // if (_this.lastTag) {
- // _this.lastTag.style.backgroundColor = ''; // 清除上一个高亮的标签样式
- // _this.lastTag.style.border = '';
- // }
- // });
- // }
- // }
- // });
- // },
-
- // 显示选中的批注内容
viewCommentDetail(comment) {
this.selectedComment = comment.text;
},
@@ -3710,7 +3244,6 @@ return false
getContent1(type, content) {
console.log('content at line 2986:', content);
content = this.$commonJS.transformHtmlString(content);
-
var div = document.createElement('div');
div.innerHTML = content; // 将 HTML 字符串加载到 div 中
@@ -3824,7 +3357,6 @@ return false
//获取上传图片后的地址,并设置图片样式
tableSuccessCBK(arr) {
- console.log(arr, '222');
const _this = this;
window.tinymce.get(_this.tinymceId).insertContent(arr);
}
@@ -3909,22 +3441,24 @@ return false
}
.MaxPicture {
- text-align: center;
+ text-align: center !important;
}
.myeditablediv img {
- width: 500px !important;
+ width: 80% !important;
margin-bottom: 10px;
+ max-width: 580px;
}
.font {
display: block;
margin: 0 auto;
- font-size: 13px;
+ font-size: 14px;
}
.tableTitle {
text-align: center !important;
font-weight: bold;
+ color: rgb(210, 90, 90) !important;
}
.word-container {
@@ -3940,9 +3474,10 @@ return false
.pMain {
margin-top: 5px;
margin-bottom: 5px;
- min-height: 30px;
- font-family:'Charis SIL' !important;
-
+ min-height: 22px;
+ font-size: 14px;
+ font-family: 'Charis SIL';
+ text-align: justify;
}
::v-deep .tox.tox-tinymce-inline {
z-index: 9999 !important;
@@ -4179,82 +3714,94 @@ return false
}
/* 容器:改为纵向 Flex,让两行排开 */
.wps-two-layer-bar {
- position: fixed;
- display: flex;
- flex-direction: column; /* 纵向排列两行 */
- gap: 8px; /* 两行之间的间距 */
- padding: 10px;
- background: rgba(255, 255, 255, 0.98);
- border-radius: 12px;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
- border: 1px solid #e5e6eb;
- z-index: 10000;
- min-width: 320px;
+ position: fixed;
+ display: flex;
+ flex-direction: column; /* 纵向排列两行 */
+ gap: 1px; /* 两行之间的间距 */
+ padding: 10px;
+ background: rgba(255, 255, 255, 0.98);
+ border-radius: 12px;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
+ border: 1px solid #e5e6eb;
+ z-index: 10000;
+ min-width: 320px;
}
/* 每一行的样式 */
.bar-row {
- display: flex;
- align-items: center;
- gap: 4px;
+ display: flex;
+ align-items: center;
+ gap: 0px;
}
/* 下层样式可以微调,比如颜色稍淡或缩小 */
.bottom-row {
- padding-top: 4px;
- border-top: 1px dashed #f2f3f5; /* 增加一条虚线分割感 */
+ padding-top: 4px;
+ border-top: 1px dashed #9b9c9f; /* 增加一条虚线分割感 */
}
/* 通用项样式 */
.menu-item {
- display: flex;
- align-items: center;
- padding: 0 8px;
- height: 30px;
- border-radius: 6px;
- font-size: 13px;
- color: #4e5969;
- cursor: pointer;
- transition: all 0.2s;
- white-space: nowrap;
+ display: flex;
+ align-items: center;
+ padding: 0 8px;
+ height: 30px;
+ border-radius: 6px;
+ font-size: 13px;
+ color: #4e5969;
+ cursor: pointer;
+ transition: all 0.2s;
+ white-space: nowrap;
}
.menu-item i {
- margin-right: 6px;
- font-size: 14px;
+ margin-right: 6px;
+ font-size: 14px;
}
.menu-item:hover {
- background-color: #f2f3f5;
+ background-color: #f2f3f5;
}
/* 颜色高亮 */
-.primary { color: #2b81ef; font-weight: 500; }
-.ai-feat { color: #6740fb; background: rgba(43, 129, 239, 0.05); }
-.comment-feat { color: #f56c6c; }
-.danger { color: red; }
+.primary {
+ color: #2b81ef;
+ font-weight: 500;
+}
+.ai-feat {
+ color: #6740fb;
+ background: rgba(43, 129, 239, 0.05);
+}
+.comment-feat {
+ color: #f56c6c;
+}
+.danger {
+ color: red;
+}
/* H1/H2/H3 组样式 */
.h-group {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 0 4px;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 0 4px;
}
.h-item {
- font-weight: bold;
- cursor: pointer;
- font-size: 14px;
- color: #1d2129;
+ font-weight: bold;
+ cursor: pointer;
+ font-size: 14px;
+ color: #1d2129;
+}
+.h-item.active {
+ color: #2b81ef;
}
-.h-item.active { color: #2b81ef; }
/* 分隔线 */
.row-divider {
- width: 1px;
- height: 14px;
- background-color: #e5e6eb;
- margin: 0 8px;
+ width: 1px;
+ height: 14px;
+ background-color: #e5e6eb;
+ margin: 0 8px;
}
::v-deep .rightTabs .el-tabs__item {
height: 46px !important;
@@ -4376,4 +3923,81 @@ return false
color: #c0c4cc;
cursor: not-allowed;
}
+.word-menu {
+ box-shadow: 0 2px 2px -2px rgba(34, 47, 62, 0.1), 0 8px 8px -4px rgba(34, 47, 62, 0.07);
+ margin: 0px 0;
+ box-sizing: border-box;
+ display: flex;
+}
+.pMainH1 {
+ font-family: 'Charis SIL';
+ min-height: 12px;
+ background: rgb(222, 235, 247);
+ color: rgb(210, 90, 90) !important;
+ text-align: center !important;
+ border: 1px solid rgba(222, 234, 247, 0.1);
+ border-radius: 10px;
+ font-size: 16px;
+
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ box-shadow: rgba(222, 234, 247, 0.6) 0px 4px 4px;
+}
+.pMainH1 .pMain {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ line-height: 30px !important;
+ text-align: center;
+ font-size: 16px;
+}
+::v-deep.pMainH1 .pMain i {
+ font-style: normal !important;
+}
+.proofreading-num {
+ z-index: 2;
+ background: #e61a12;
+ color: rgb(255, 255, 255);
+ border-radius: 20px;
+ padding: 0px 6px;
+ font-size: 12px;
+ margin-left: 20px;
+ position: absolute;
+ right: 6px;
+ cursor: pointer;
+}
+.imageTitle {
+ color: rgb(210, 90, 90) !important;
+ font-weight: bold;
+ text-align: center;
+ margin-bottom: 10px;
+}
+.table-header-row {
+ border-bottom: 1px solid #000;
+}
+.oddColor td {
+ background: rgb(250, 231, 232);
+}
+.table_Box {
+ padding: 8px 15px;
+ box-sizing: border-box;
+}
+.table-box tr:first-child td {
+ border-top: 1px solid #000 !important;
+}
+.imageNote {
+ line-height: 22px;
+ font-size: 14px;
+ text-align: center;
+ margin-bottom: 10px;
+}
+.tableNote {
+ line-height: 22px;
+ font-size: 14px;
+
+ margin-bottom: 10px;
+ color: #333;
+}
+wmath {
+ font-size: 14px !important;
+}