vue-email-editor icon indicating copy to clipboard operation
vue-email-editor copied to clipboard

How do you enable Form tool?

Open mlanders opened this issue 4 years ago • 2 comments

Having an issue getting forms to work with the Vue component. Does it need to be in display mode web, or is it supported in email?

The documentation show enabling forms as the following.

unlayer.init({
  tools: {
    form: {
      enabled: false
    }
  }
});

However when trying to enable it via the tools props it doesn't show up.

<EmailEditor ref="documentEditor" :options="options" :tools="tools" @load="editorLoaded" />

The following is from the example which also does not work.

      tools: {
        form: {
          properties: {
            action: {
              editor: {
                data: {
                  actions: [
                    {
                      label: "Marketing",
                      method: "POST",
                      url: "http://whatever.com/marketing-form-submission",
                    },
                    {
                      label: "Sales",
                      method: "POST",
                      target: "_blank",
                      url: "http://whatever.com/sales-form-submission",
                    },
                  ],
                },
              },
            },
          },
        },
     }

mlanders avatar Feb 24 '21 18:02 mlanders

Got it to work by modifying the display mode in the package and rebuilding it.

mlanders avatar Feb 24 '21 19:02 mlanders

Got a PR in for this #30

mlanders avatar Feb 24 '21 19:02 mlanders