hinesboy / mavonEditor

mavonEditor - A markdown editor based on Vue that supports a variety of personalized features
http://www.mavoneditor.com/
MIT License
6.38k stars 916 forks source link

Custom toolbars buttons not working with vue3 #861

Closed geminigeek closed 1 year ago

geminigeek commented 1 year ago

🐛 Bug Report

custom toolbars are not showing i have a reproduction link , it seems slots names are changed or some config value is not documented

Steps To Reproduce

https://stackblitz.com/edit/github-qtxzqs?file=src%2Fcomponents%2FCreatePost.vue,src%2Fcomponents%2FCreatePostMavon.vue,src%2Fpages%2Findex.astro

The expected behaviour

i copied custom toolbar code from doc , still they buttons are not showing

https://stackblitz.com/edit/github-qtxzqs?file=src%2Fcomponents%2FCreatePost.vue,src%2Fcomponents%2FCreatePostMavon.vue,src%2Fpages%2Findex.astro

geminigeek commented 1 year ago

hi,

the docs are little bit misleading the slot syntax has changed this works

 <template v-slot:left-toolbar-before>
        <button
          type="button"
          @click="$click('test')"
          class="op-icon fa fa-mavon-align-left"
          aria-hidden="true"
          title="自定义"
        ></button>
      </template>