Commit 71a3429e authored by tyyin lan's avatar tyyin lan

fix: 编辑器指令编辑插入内容失去格式

parent a5cf8520
......@@ -149,7 +149,11 @@ function handleInsertContent() {
if (editor) {
editor.selection.collapse()
editor.execCommand('mceInsertNewLine')
editor.execCommand('InsertHTML', false, editResponseContent.value)
editor.execCommand(
'InsertHTML',
false,
contentOptimizationEditMRRef.value?.getRenderTextContent() || editResponseContent.value,
)
editor.execCommand('mceInsertNewLine')
contentEditStatus.value = 'Normal'
......@@ -286,7 +290,7 @@ function toneSelectMenuRenderOption({ node, option }: { node: VNode; option: Dro
</div>
<Transition>
<div v-show="editResponseLoading" class="flex select-none items-center justify-between">
<div v-show="editResponseLoading" class="flex select-none items-center justify-between pr-[10px]">
<span>
<template v-if="!editResponseContent">生成中...</template>
</span>
......@@ -298,7 +302,7 @@ function toneSelectMenuRenderOption({ node, option }: { node: VNode; option: Dro
</Transition>
<Transition>
<div v-show="isShowReplaceToolbar" class="mt-[9px]">
<div v-show="isShowReplaceToolbar" class="mt-[9px] pr-[10px]">
<n-button type="primary" size="small" @click="handleReplaceContent"
>替换
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment