Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editable property is not working with Node(Vue component) #223

Closed
Alecyrus opened this issue Mar 6, 2019 · 5 comments
Closed

editable property is not working with Node(Vue component) #223

Alecyrus opened this issue Mar 6, 2019 · 5 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@Alecyrus
Copy link
Sponsor Contributor

Alecyrus commented Mar 6, 2019

image

 watch: {
    editable(newValue, oldValue) {
      this.editor.setOptions({
        editable: newValue
      });
    }
  },
 props: ['node', 'updateAttrs', 'editable'],
@philippkuehn philippkuehn added the Type: Bug The issue or pullrequest is related to a bug label Apr 30, 2019
@philippkuehn
Copy link
Contributor

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

@techouse
Copy link

techouse commented May 26, 2019

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. ❤️

@philippkuehn
Copy link
Contributor

@techouse Ah thanks! Fixed it!

@A-d-o-n-i-s
Copy link

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!

@mojtabaahn
Copy link

mojtabaahn commented Aug 23, 2020

@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({})
        }
    }
}

@hanspagel hanspagel reopened this Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

6 participants