'Change enter to break line instead of new paragraph in tiptap

I have searched for a way to change the default behavior for Enter to be the same as Shift + Enter. To get instead of new

Is it possible to change to this behavior somehow?



Solution 1:[1]

 this.editor = new Editor({
  content: this.modelValue,
  extensions: [
    StarterKit,
    HardBreak.extend({
      addKeyboardShortcuts () {
        return {
          Enter: () => this.editor.commands.setHardBreak()
        }
      }
    })
  ]
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bohodir Rahmonov