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

bug: initialValue is getting passed as text when using JSONContent #453

Open
Satindar31 opened this issue Oct 15, 2024 · 2 comments
Open

Comments

@Satindar31
Copy link

Provide environment information

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 996.57 MB / 7.83 GB
  Binaries:
    Node: 20.10.0 - D:\node\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.8.2 - D:\node\npm.CMD
    pnpm: 9.5.0 - ~\AppData\Roaming\npm\pnpm.CMD
    bun: 1.1.6 - ~\.bun\bin\bun.EX

Describe the bug

When passing in initialValue which is of type JSONContent the editor displays it as plain text instead of text with propper highlighting.

Link to reproduction

https://github.com/satindar31/openpages

To reproduce

Feed JSONContent to initialValue (preferably which is being imported from another file or which is being fetched from a DB/server).

Additional information

The editor files in the repro repo are in /components/editor

@Satindar31
Copy link
Author

You can also use the site which is available online at https://openpages.us.kg/ to understand the bug. Signup for an account(or use clerks test emails to signup) and then go to https://openpages.us.kg/dashboard/write and write something in the editor. It should save on the second try(write pause, wait for save to fail, write again, it should save, this is a bug). Then view the document on https://openpages.us.kg/dashboard and click the id to see the editor handling the initialContent

@Satindar31
Copy link
Author

@andrewdoro

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

No branches or pull requests

1 participant