Subscribe on changes!

Support contenteditable="plaintext-only"

avatar
Jul 16th 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNp9UUFOwzAQ/MriS0CijVBvVVoJqkrAARAgcfElJNvUxbEtexOKovydjaOWHlAlX3Zmdjxjd+LWuWnboJiLLBReOYKA1LilNKp21hN04HEDPWy8rSFhaSKNNIU1gaAOFSwG/jK5R60tfFivy4vkSposHe3YiAfC2umckCeAbHuz7Lq43PdZylNElXENQTupbYl6IQXzUoxUqVrgGwn5lIryT40sYEfFwJ4m1ugf1q62uakQasxS3uDVLD1eLK4FBfbYqGq6C9Zw4W7wlqKwtVMa/bMjxa2kmENkBi7nUt+PESPf4PUBL7ZYfP2D78J+wKR48RjQtyjFkaPcV0gjvX574twnJJduNKvPkK8YrG6GjKPsrjElxz7RxbQP8duUqd7Des8vFg6lhqCDso96KfgrV2eq/8WdTWdxT5pe9L9kVbtc

Steps to reproduce

Make component where you have

<div contenteditable="plaintext-only">Some text</div>

What is expected?

contenteditable="plaintext-only" is working

https://caniuse.com/mdn-html_global_attributes_contenteditable_plaintext-only

What is actually happening?

error TS2322: Type '"plaintext-only"' is not assignable to type '"inherit" | Booleanish | undefined'.

74     contenteditable="plaintext-only"
       ~~~~~~~~~~~~~~~

  node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts:323:5
    323     contenteditable?: Booleanish | 'inherit';
            ~~~~~~~~~~~~~~~
    The expected type comes from property 'contenteditable' which is declared here on type 'HTMLAttributes & ReservedProps & Record<string, unknown>'

System Info

No response

Any additional comments?

No response