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

Set proper defaults for empty documents #2

Open
hanspagel opened this issue May 5, 2021 · 0 comments
Open

Set proper defaults for empty documents #2

hanspagel opened this issue May 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@hanspagel
Copy link
Contributor

hanspagel commented May 5, 2021

New documents need a good default:

[ 'type' => 'doc', 'content' => [], ]

But that would only work for tiptap?

Or maybe better shouldn’t fail like that:

Attaching to mailmaker_hocuspocus_1
hocuspocus_1  | [2021-05-05T15:14:52.962Z] Server configured …
hocuspocus_1  | [2021-05-05T15:14:52.965Z] Listening on port "80" …
hocuspocus_1  | [2021-05-05T15:15:22.160Z] Upgrading connection …
hocuspocus_1  | [2021-05-05T15:15:22.174Z] New connection to "App%5CModels%5CNewsletter%3A1" …
hocuspocus_1  | [2021-05-05T15:15:23.592Z] Created document "App%5CModels%5CNewsletter%3A1" …
hocuspocus_1  | /var/www/node_modules/prosemirror-model/dist/index.js:1368
hocuspocus_1  |   if (!json) { throw new RangeError("Invalid input for Node.fromJSON") }
@hanspagel hanspagel added the enhancement New feature or request label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant