Skip to content

Commit

Permalink
fix(editor): remove italic and bold
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Nov 6, 2021
1 parent 0559a56 commit 71178ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/editor/entity/EditorEntityShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
const _input = input.value as HTMLDivElement
data.value = val
_input.innerText = val
_input.innerHTML = val
}
watch(data, async (_data: string) => {
Expand Down
6 changes: 5 additions & 1 deletion src/use/raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export const useRaw = () => {

const wrap = set.content.substring(initial, finish)

if (wrap !== target.value) {
if (!wrap || wrap !== target.value) {
switch (set.type) {
case 'italic':
_ += make().italic(set.content)
Expand All @@ -490,6 +490,10 @@ export const useRaw = () => {
}

if (set.type !== 'simple') {
if (target.value === set.content) {
_ += set.content
}

return
}

Expand Down

0 comments on commit 71178ff

Please sign in to comment.