Skip to content

How can you call getHTML(); function on custom button click (not every time the editors content is updated) #782

Discussion options

You must be logged in to vote

Sure! Hope that helps:

https://codesandbox.io/s/vue-issue-template-hjm8q?file=/src/App.vue

in the template:

  <button class="menubar__button" @click="getHTML">
    <span>getHTML</span>
  </button>

add a method:

  methods: {
    getHTML() {
      alert(this.editor.getHTML());
    }
  },

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@izabayo7
Comment options

Answer selected by izabayo7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants