Skip to content

The button works like submit in Form area. #91

@lovefields

Description

@lovefields

@lovefields Thanks for your efforts.

I face another issue if I use the <DragonEditor> inside a form. The form treats the top menu buttons as a submit button (e.g, Heading. bold, italic...).
So I have to do something like this to force it to a normal button.

onMounted(() => {
  // set the button type to force only the main button to submit the forms
  // those buttons are generated from DragonEditor.

  document.querySelectorAll('.de-menu.de-menu-add')
  .forEach(btn => btn.setAttribute('type', 'button'))

  document.querySelectorAll('.de-add-block')
  .forEach(btn => btn.setAttribute('type', 'button'))

  document.querySelectorAll('.de-menu')
  .forEach(btn => btn.setAttribute('type', 'button'))
})

Originally posted by @oussamalkd in #90

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions