refactor(editor): 重构编辑器组件及样式,优化功能实现
重构编辑器工具栏样式及功能,使用wangEditor替换原有实现 优化图片和视频上传逻辑,增加自定义校验和上传处理 调整编辑器样式,修复对齐功能及段落标题样式 更新表情选择器位置逻辑,支持上下方向显示 统一组件导入方式,添加版本控制参数防止缓存
This commit is contained in:
26
edit.html
26
edit.html
@@ -16,24 +16,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#editor—wrapper {
|
||||
/* border: 1px solid #ccc; */
|
||||
z-index: 100;
|
||||
/* 按需定义 */
|
||||
}
|
||||
|
||||
#toolbar-container {
|
||||
/* border-bottom: 1px solid #ccc; */
|
||||
}
|
||||
|
||||
#editor-container {
|
||||
min-height: 509px;
|
||||
max-height: 80vh;
|
||||
}
|
||||
</style>
|
||||
<script src="./js/editor.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -54,11 +37,12 @@
|
||||
<input class="title-input" type="title" placeholder="输入标题(非必填)" v-model="info.title" :maxlength="titleLength" />
|
||||
<div class="sum">{{ info?.title?.length ? titleLength - info?.title?.length : titleLength }}</div>
|
||||
</div>
|
||||
<div id="editor—wrapper">
|
||||
|
||||
<div id="editor—wrapper" class="editor—wrapper">
|
||||
|
||||
<!-- 工具栏 -->
|
||||
<div id="toolbar-container" class="editor-toolbar flexacenter">
|
||||
<div class="toolbar-item flexacenter h2" :class="{'pitch': isPTitle}" @click="paragraphTitle">
|
||||
<div ref="toolbarRef" id="toolbar-container" class="editor-toolbar flexacenter">
|
||||
<!-- <div class="toolbar-item flexacenter h2" :class="{'pitch': isPTitle}" @click="paragraphTitle">
|
||||
<img class="icon" src="{@/img/t-icon.png}" alt="段落标题" />
|
||||
<span>段落标题</span>
|
||||
</div>
|
||||
@@ -104,7 +88,7 @@
|
||||
<div class="emoji-box">
|
||||
<div class="emoji-icon" v-for="emoji in optionEmoji" :key="emoji" @click.stop="selectEmoji(emoji)">{{ emoji }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user