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

v-model not working with output-format="json" #94

Closed
deka opened this issue Nov 6, 2019 · 5 comments · Fixed by #188
Closed

v-model not working with output-format="json" #94

deka opened this issue Nov 6, 2019 · 5 comments · Fixed by #188

Comments

@deka
Copy link
Contributor

deka commented Nov 6, 2019

Hi,
two-way binding (v-model) not working with output-format="json"
If i re-load json, i see the json, not the result

image

Regards

@iliyaZelenko
Copy link
Owner

iliyaZelenko commented Nov 6, 2019

Interesting, I'll see what is the reason. Code is here, maybe you can help.

@iliyaZelenko iliyaZelenko added the bug Something isn't working label Nov 6, 2019
@iliyaZelenko
Copy link
Owner

I tried output-format="json" and it worked correctly for me.

Could you provide a reproduction or at least more information about the problem, please?

If i re-load json, i see the json, not the result

I do not understand.

@iliyaZelenko iliyaZelenko added need a reproduction and removed bug Something isn't working labels Nov 8, 2019
@deka
Copy link
Contributor Author

deka commented Nov 9, 2019

Hi,
I commit reproduction in your demo : here

to reproduce :
write something, click switch, write something, click switch -> json is displayed

PS: if you remove output-format="json", it work as expected

Regards

@t-itzel
Copy link

t-itzel commented Jan 25, 2020

I also want to use v-model with a JSON value but value prop in TipTapVuetify is defined as String which causes a warning:

[Vue warn]: Invalid prop: type check failed for prop "value". Expected String with value "[object Object]", got Object

If i pass serialized json content, the warning is gone but the editor content displays the serialized value like seen in screenshot above.

Just insert json content into v-model for reproduction:

<template>
    <tiptap-vuetify output-format="json" v-model="editorContent"></tiptap-vuetify>
</template>
<script>
    data: () => ({
        editorContent: {"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"This is a "},{"type":"text","marks":[{"type":"bold"}],"text":"test"}]}]}
    })
</script>

iliyaZelenko pushed a commit that referenced this issue Jul 14, 2020
removed serializing of JSON in output, added Object type to v-model prop

Fix #94
iliyaZelenko pushed a commit that referenced this issue Jul 19, 2020
# [2.24.0](v2.23.0...v2.24.0) (2020-07-19)

### Bug Fixes

* Consistent JSON Output Format ([#188](#188)) ([80bade0](80bade0)), closes [#94](#94)
* **i18n:** improve fr translation ([#207](#207)) ([d964357](d964357))

### Features

* **i18n:** el translation ([#195](#195)) ([6e17964](6e17964))
@iliyaZelenko
Copy link
Owner

🎉 This issue has been resolved in version 2.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants