Tiptap: editable property is not working with Node(Vue component)

Created on 6 Mar 2019  路  5Comments  路  Source: ueberdosis/tiptap

image

 watch: {
    editable(newValue, oldValue) {
      this.editor.setOptions({
        editable: newValue
      });
    }
  },
 props: ['node', 'updateAttrs', 'editable'],
bug

All 5 comments

I removed the editable prop, because it's already available and reactive (!) via view.editable. So please use the view prop instead.

Spent an hour debugging this 馃毈 Good thing I stumbled upon this. Was already wondering if my computed property abuse got the best of me 馃拑

If you wouldn't mind, please update the Iframe example for future reference. 鉂わ笍

@techouse Ah thanks! Fixed it!

Did this change? It doesn't work with this.editor.view.editable for me, but this.editor.options.editable works..

As an aside:
Is there a way to bind this to my custom Vue component that includes the Tiptap Editor component? I cannot get a parent component to control the edibility of the embedded Tiptap Editor through prop binding in Vue.js :-( Thanks!

@A-d-o-n-i-s non of editor.view.editable or editor.options.editable or view.editable is not working on 1.29.6 sadly.

for aside: you can define a prop like editable for your tiptap wrapper component and watch it with vue watchers and use setOptions method on your editor instance to change editable option.

{
    props : {
        editable : {
            default : true
        }
    },
    watch : {
        editable(value){
            this.editor.setOptions({editable : value})
        }
    },
    data(){
        return {
            editor : new Editor({})
        }
    }
}
Was this page helpful?
0 / 5 - 0 ratings