小编Jon*_*ner的帖子

TipTap 编辑器中无法正确识别空格

我们在项目中使用TipTap的富文本编辑器。
但我们有一个问题,空间无法正确识别,只有在每两次单击后才会创建一个空间。我们使用 Vue.JS 作为框架。

import { Editor, EditorContent, EditorMenuBar } from 'tiptap'
import {
  HardBreak,
  Heading,
  OrderedList,
  BulletList,
  ListItem,
  Bold,
  Italic,
  History
} from 'tiptap-extensions'
import EditorMenuButton from './EditorMenuButton.vue'
export default {
  name: 'editor',
  components: {
    EditorMenuButton,
    EditorMenuBar,
    EditorContent
  },
  props: {
    value: {
      type: null,
      default: ' '
    }
  },
  data () {
    return {
      innerValue: ' ',
      editor: new Editor({
        extensions: [
          new HardBreak(),
          new Heading({ levels: [1, 2, 3] }),
          new BulletList(),
          new OrderedList(),
          new ListItem(),
          new …
Run Code Online (Sandbox Code Playgroud)

html javascript frontend vue.js tiptap

5
推荐指数
1
解决办法
5579
查看次数

标签 统计

frontend ×1

html ×1

javascript ×1

tiptap ×1

vue.js ×1