You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

832 lines
29 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>六步法编辑器</title>
<link rel="stylesheet" href="./element-ui.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: #fafafa;
}
#app {
width: 100%;
height: 100vh;
}
.step-editor-container {
display: flex;
flex-direction: column;
height: 100vh;
background: #fafafa;
}
.editor-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 32px;
height: 56px;
background: #fff;
}
.header-left {
display: flex;
align-items: center;
gap: 16px;
}
.header-right {
display: flex;
gap: 12px;
}
.back-btn {
padding: 8px 12px;
font-size: 16px;
color: #666;
}
.back-btn:hover {
color: #409EFF;
}
.step-title {
font-size: 18px;
font-weight: bold;
color: #333;
}
.save-btn {
padding: 8px 24px;
font-size: 16px;
border-radius: 4px;
}
.export-btn {
padding: 8px 24px;
font-size: 16px;
border-radius: 4px;
}
.editor-toolbar {
display: flex;
align-items: center;
gap: 0;
padding: 0 32px;
height: 44px;
background: #fff;
border-bottom: 1px solid #e8e8e8;
}
.toolbar-group {
display: flex;
align-items: center;
gap: 4px;
}
.toolbar-btn {
width: 36px;
height: 36px;
padding: 0;
border-radius: 4px;
color: #666;
font-size: 16px;
transition: all 0.2s;
}
.toolbar-btn:hover {
background: #f5f5f5;
color: #409EFF;
}
.format-icon {
font-size: 16px;
font-weight: 700;
font-family: Arial, sans-serif;
font-style: normal;
}
.format-icon.italic {
font-style: italic;
}
.format-icon.underline {
text-decoration: underline;
}
.format-icon.strike {
text-decoration: line-through;
}
.toolbar-divider {
width: 1px;
height: 24px;
background: #e8e8e8;
margin: 0 16px;
}
.word-count {
font-size: 12px;
color: #999;
padding: 0 12px;
min-width: 60px;
text-align: right;
}
.editor-content {
flex: 1;
overflow: hidden;
padding: 16px;
display: flex;
justify-content: center;
}
.editor-area {
width: 100%;
max-width: 100%;
height: 100%;
background: #fff;
border-radius: 8px;
padding: 24px;
overflow-y: auto;
outline: none;
font-size: 16px;
line-height: 1.8;
color: #333;
}
.editor-area:empty:before {
content: attr(data-placeholder);
color: #c0c4cc;
pointer-events: none;
}
.editor-area p {
margin: 16px 0;
}
.editor-area img {
max-width: 100%;
height: auto;
margin: 10px 0;
}
.editor-area a {
color: #409EFF;
text-decoration: underline;
}
.editor-area ul,
.editor-area ol {
margin: 16px 0;
padding-left: 32px;
}
.editor-area li {
margin: 8px 0;
}
</style>
</head>
<body>
<div id="app">
<div class="step-editor-container">
<div class="editor-header">
<div class="header-left">
<el-button type="text" icon="el-icon-back" @click="goBack" class="back-btn">
关闭
</el-button>
<span class="step-title">{{ stepTitle }}</span>
</div>
<div class="header-right">
<el-button type="primary" @click="saveContent" class="save-btn">
<i class="el-icon-check"></i>
保存
</el-button>
<el-button type="success" @click="exportContent" class="export-btn">
<i class="el-icon-download"></i>
导出
</el-button>
</div>
</div>
<div class="editor-toolbar">
<div class="toolbar-group">
<el-tooltip content="撤销" placement="top">
<el-button type="text" @click="formatText('undo')" class="toolbar-btn">
<i class="el-icon-refresh-left"></i>
</el-button>
</el-tooltip>
<el-tooltip content="重做" placement="top">
<el-button type="text" @click="formatText('redo')" class="toolbar-btn">
<i class="el-icon-refresh-right"></i>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<el-tooltip content="导入文档" placement="top">
<el-button type="text" @click="importDocument" class="toolbar-btn">
<i class="el-icon-document"></i>
</el-button>
</el-tooltip>
<el-tooltip content="导入图片" placement="top">
<el-button type="text" @click="importImage" class="toolbar-btn">
<i class="el-icon-picture"></i>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<el-tooltip content="加粗" placement="top">
<el-button type="text" @click="formatText('bold')" class="toolbar-btn">
<span class="format-icon">B</span>
</el-button>
</el-tooltip>
<el-tooltip content="斜体" placement="top">
<el-button type="text" @click="formatText('italic')" class="toolbar-btn">
<span class="format-icon italic">I</span>
</el-button>
</el-tooltip>
<el-tooltip content="下划线" placement="top">
<el-button type="text" @click="formatText('underline')" class="toolbar-btn">
<span class="format-icon underline">U</span>
</el-button>
</el-tooltip>
<el-tooltip content="删除线" placement="top">
<el-button type="text" @click="formatText('strikeThrough')" class="toolbar-btn">
<span class="format-icon strike">S</span>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<el-tooltip content="上标" placement="top">
<el-button type="text" @click="formatText('superscript')" class="toolbar-btn">
<span class="format-icon"></span>
</el-button>
</el-tooltip>
<el-tooltip content="下标" placement="top">
<el-button type="text" @click="formatText('subscript')" class="toolbar-btn">
<span class="format-icon">x₂</span>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<el-tooltip content="左对齐" placement="top">
<el-button type="text" @click="formatText('justifyLeft')" class="toolbar-btn">
<i class="el-icon-s-unfold"></i>
</el-button>
</el-tooltip>
<el-tooltip content="居中对齐" placement="top">
<el-button type="text" @click="formatText('justifyCenter')" class="toolbar-btn">
<i class="el-icon-s-grid"></i>
</el-button>
</el-tooltip>
<el-tooltip content="右对齐" placement="top">
<el-button type="text" @click="formatText('justifyRight')" class="toolbar-btn">
<i class="el-icon-s-fold"></i>
</el-button>
</el-tooltip>
<el-tooltip content="两端对齐" placement="top">
<el-button type="text" @click="formatText('justifyFull')" class="toolbar-btn">
<i class="el-icon-menu"></i>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<el-tooltip content="无序列表" placement="top">
<el-button type="text" @click="formatText('insertUnorderedList')" class="toolbar-btn">
<i class="el-icon-plus"></i>
</el-button>
</el-tooltip>
<el-tooltip content="有序列表" placement="top">
<el-button type="text" @click="formatText('insertOrderedList')" class="toolbar-btn">
<i class="el-icon-sort"></i>
</el-button>
</el-tooltip>
<el-tooltip content="减少缩进" placement="top">
<el-button type="text" @click="formatText('outdent')" class="toolbar-btn">
<i class="el-icon-back"></i>
</el-button>
</el-tooltip>
<el-tooltip content="增加缩进" placement="top">
<el-button type="text" @click="formatText('indent')" class="toolbar-btn">
<i class="el-icon-right"></i>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
<div class="toolbar-group">
<el-tooltip content="全屏" placement="top">
<el-button type="text" @click="toggleFullscreen" class="toolbar-btn">
<i :class="isFullscreen ? 'el-icon-crop' : 'el-icon-full-screen'"></i>
</el-button>
</el-tooltip>
<div class="word-count">
{{ wordCount }} 字
</div>
</div>
</div>
<div class="editor-content">
<div
ref="editor"
class="editor-area"
contenteditable="true"
:data-placeholder="placeholder"
@input="onInput"
@keydown="onKeydown"
@focus="onFocus"
@blur="onBlur"
>
</div>
</div>
<input
ref="fileInput"
type="file"
style="display: none"
@change="handleFileChange"
/>
</div>
</div>
<script src="https://unpkg.com/vue@2.6.12/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/mammoth@1.6.0/mammoth.browser.min.js"></script>
<script>
new Vue({
el: '#app',
data() {
return {
stepTitle: '',
stepIndex: 0,
content: '',
placeholder: '在此输入内容...',
uploadType: '',
savedContent: {},
wordCount: 0,
isFullscreen: false
}
},
created() {
const urlParams = new URLSearchParams(window.location.search)
this.stepTitle = urlParams.get('title') || '编辑器'
this.stepIndex = parseInt(urlParams.get('index')) || 0
this.loadSavedContent()
},
methods: {
goBack() {
window.close()
},
formatText(command) {
document.execCommand(command, false, null)
this.$refs.editor.focus()
},
importDocument() {
this.uploadType = 'document'
this.$refs.fileInput.accept = '.txt,.md,.docx'
this.$refs.fileInput.click()
},
importImage() {
this.uploadType = 'image'
this.$refs.fileInput.accept = 'image/*'
this.$refs.fileInput.click()
},
handleFileChange(event) {
const file = event.target.files[0]
if (!file) return
if (this.uploadType === 'document') {
this.handleDocumentUpload(file)
} else if (this.uploadType === 'image') {
this.handleImageUpload(file)
}
event.target.value = ''
},
handleDocumentUpload(file) {
const fileName = file.name.toLowerCase()
const fileExt = fileName.substring(fileName.lastIndexOf('.'))
if (fileExt === '.docx') {
this.handleDocxUpload(file)
} else if (fileExt === '.txt' || fileExt === '.md') {
this.handleTextFileUpload(file)
} else {
this.$message.warning('不支持的文件格式,请使用 .txt、.md 或 .docx 文件')
}
},
handleDocxUpload(file) {
this.$message.warning('正在解析 Word 文档...')
const reader = new FileReader()
reader.onload = (e) => {
try {
const arrayBuffer = e.target.result
this.parseDocx(arrayBuffer)
} catch (error) {
console.error('解析 Word 文档失败:', error)
this.$message.error('解析 Word 文档失败,请将文档另存为 .txt 或 .md 格式后重试')
}
}
reader.readAsArrayBuffer(file)
},
async parseDocx(arrayBuffer) {
try {
const result = await mammoth.extractRawText({ arrayBuffer: arrayBuffer })
const text = result.value
this.insertText(text)
this.$message.success('Word 文档导入成功')
} catch (error) {
console.error('mammoth.js 解析失败:', error)
this.$message.error('解析 Word 文档失败')
}
},
handleTextFileUpload(file) {
const reader = new FileReader()
reader.onload = (e) => {
let text = e.target.result
if (!text || text.trim() === '') {
this.$message.warning('文档内容为空')
return
}
if (this.isGarbled(text)) {
this.tryGBKEncoding(file)
} else {
this.insertText(text)
this.$message.success('文档导入成功')
}
}
reader.readAsText(file, 'UTF-8')
},
isGarbled(text) {
const garbageChars = text.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g)
return garbageChars && garbageChars.length > text.length * 0.3
},
tryGBKEncoding(file) {
const reader = new FileReader()
reader.onload = (e) => {
const text = e.target.result
if (this.isGarbled(text)) {
this.$message.error('文档编码无法识别,请确保文档使用 UTF-8 或 GBK 编码')
} else {
this.insertText(text)
this.$message.success('文档导入成功')
}
}
reader.readAsText(file, 'GBK')
},
handleImageUpload(file) {
const reader = new FileReader()
reader.onload = (e) => {
const img = `<img src="${e.target.result}" style="max-width: 100%; height: auto; margin: 10px 0;" />`
this.insertHTML(img)
this.$message.success('图片导入成功')
}
reader.readAsDataURL(file)
},
insertText(text) {
const editor = this.$refs.editor
const selection = window.getSelection()
if (selection.rangeCount > 0) {
const range = selection.getRangeAt(0)
const textNode = document.createTextNode(text)
range.insertNode(textNode)
} else {
if (editor.innerHTML.trim() === '') {
editor.innerHTML = `<p>${text}</p>`
} else {
editor.innerHTML += `<p>${text}</p>`
}
}
this.$nextTick(() => {
this.updateWordCount()
})
},
insertHTML(html) {
const editor = this.$refs.editor
const selection = window.getSelection()
if (selection.rangeCount > 0) {
const range = selection.getRangeAt(0)
const div = document.createElement('div')
div.innerHTML = html
range.insertNode(div)
} else {
if (editor.innerHTML.trim() === '') {
editor.innerHTML = `<p>${html}</p>`
} else {
editor.innerHTML += `<p>${html}</p>`
}
}
this.$nextTick(() => {
this.updateWordCount()
})
},
onInput() {
this.content = this.$refs.editor.innerHTML
this.updateWordCount()
},
updateWordCount() {
const text = this.$refs.editor.innerText || ''
this.wordCount = text.replace(/\s+/g, '').length
},
toggleFullscreen() {
this.isFullscreen = !this.isFullscreen
const container = document.querySelector('.step-editor-container')
if (this.isFullscreen) {
if (container.requestFullscreen) {
container.requestFullscreen()
} else if (container.webkitRequestFullscreen) {
container.webkitRequestFullscreen()
} else if (container.msRequestFullscreen) {
container.msRequestFullscreen()
}
} else {
if (document.exitFullscreen) {
document.exitFullscreen()
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen()
} else if (document.msExitFullscreen) {
document.msExitFullscreen()
}
}
},
onFocus() {
const editor = this.$refs.editor
if (editor.innerText.trim() === '' && editor.innerHTML.trim() === '') {
editor.innerHTML = ''
}
},
onBlur() {
const editor = this.$refs.editor
if (editor.innerHTML.trim() === '' || editor.innerText.trim() === '') {
editor.innerHTML = ''
}
},
onKeydown(event) {
if (event.ctrlKey || event.metaKey) {
if (event.key === 's') {
event.preventDefault()
this.saveContent()
}
}
},
saveContent() {
this.content = this.$refs.editor.innerHTML
const savedData = JSON.parse(localStorage.getItem('stepEditorContent') || '{}')
savedData[`step_${this.stepIndex}`] = {
content: this.content,
updateTime: new Date().toISOString()
}
localStorage.setItem('stepEditorContent', JSON.stringify(savedData))
this.$message.success('保存成功')
},
async exportContent() {
this.content = this.$refs.editor.innerHTML
let contentWithBase64 = this.content
try {
const base64 = await this.imageToBase64('./logo2.jpg')
contentWithBase64 = this.content.replace(/<img src="\.\/logo2\.jpg"[^>]*>/g,
`<img src="${base64}" style="height: 50px; width: auto;">`)
} catch (e) {
console.log('Logo conversion skipped:', e)
}
const completeHtml = `
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${this.stepTitle}</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h1 {
font-size: 32px;
font-weight: bold;
margin: 20px 0;
text-align: center;
}
h2 {
font-size: 24px;
font-weight: bold;
margin: 20px 0;
}
p {
margin: 10px 0;
}
.editor-content {
margin-top: 20px;
}
</style>
</head>
<body>
<div class="editor-content">
${contentWithBase64}
</div>
</body>
</html>
`
const blob = new Blob([completeHtml], { type: 'text/html;charset=utf-8' })
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = `${this.stepTitle}_${new Date().toLocaleString().replace(/[/:]/g, '-')}.html`
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
URL.revokeObjectURL(url)
this.$message.success('导出成功')
},
imageToBase64(url) {
return new Promise((resolve, reject) => {
const img = new Image()
img.crossOrigin = 'Anonymous'
img.onload = () => {
const canvas = document.createElement('canvas')
canvas.width = img.width
canvas.height = img.height
const ctx = canvas.getContext('2d')
ctx.drawImage(img, 0, 0)
resolve(canvas.toDataURL('image/jpeg'))
}
img.onerror = reject
img.src = url
})
},
loadSavedContent() {
const savedData = JSON.parse(localStorage.getItem('stepEditorContent') || '{}')
const stepData = savedData[`step_${this.stepIndex}`]
if (stepData && stepData.content) {
this.$nextTick(() => {
this.$refs.editor.innerHTML = stepData.content
this.content = stepData.content
this.updateWordCount()
})
} else {
this.setDefaultContent()
}
},
setDefaultContent() {
this.$nextTick(() => {
if (this.stepIndex === 0) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">点名</h1>
<div></div>
</div>
<div style="display: flex; justify-content: center; gap: 580px; margin-top: 30px; text-align: center;">
<div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
</div>
<div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
</div>
<div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
<div style="margin-bottom: 80px;"><h2 style="font-size: 18px; font-weight: bold; display: inline-block;">XXX组:</h2><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>
</div>
</div>
`
} else if (this.stepIndex === 1) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">集体协同</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">任务主要目标、次要目标及风险等级</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">主要目标:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">次要目标:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">风险等级:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else if (this.stepIndex === 2) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">战术规划</h1>
<div></div>
</div>
<h2 style="font-size: 24px; font-weight: bold; margin: 20px 0;">整体战术:</h2>
`
} else if (this.stepIndex === 3) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">资源准备</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">资源准备、风险识别及应对措施</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">资源准备:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">风险识别:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">应对措施:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else if (this.stepIndex === 4) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">指挥演练</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">任务分工、时间节点及实时监控</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">任务分工:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">时间节点:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">实时监控:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else if (this.stepIndex === 5) {
this.$refs.editor.innerHTML = `
<div style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px;">
<img src="./logo2.jpg" alt="logo" style="height: 50px; width: auto; justify-self: start;">
<h1 style="font-size: 32px; font-weight: bold; margin: 0; text-align: center;">总结评估</h1>
<div></div>
</div>
<p style="font-size: 18px; font-weight: bold; margin: 20px 0; text-align: center;">任务完成情况、效果评估及总结改进</p>
<div style="margin-top: 30px;">
<p style="font-size: 16px; font-weight: bold; margin-bottom: 10px;">完成情况:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">效果评估:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="font-size: 16px; font-weight: bold; margin: 20px 0 10px 0;">总结改进:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
`
} else {
this.$refs.editor.innerHTML = ''
}
this.content = this.$refs.editor.innerHTML
this.updateWordCount()
})
}
}
})
</script>
</body>
</html>