-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: textnode with content "null" is rendered as "null" not whitespace #5229
Comments
Hi @joukhar is it happening with the latest version? I'm able to see Not sure in which case the textnode might be |
thanks for the replay, if you need demo so please give me some time until i make one , i will comment again when im finished it |
Here is The demo You can see the result after storing and loading the original component My suggestion is: to replace null with whitespace Note:
|
@joukhar so I guess you can confirm that right now it's not possible to generate the |
one last question i can't build it locally, it shows many errors and i don't have enough time for them |
Probably in the first week of August |
GrapesJS version
What browser are you using?
Chrome Version 114.0.5735.199 (Official Build) (64-bit)
Reproducible demo link
N/A
Describe the bug
How to reproduce the bug?
<div class=\"flex items-center rounded shadow-md overflow-hidden max-w-xl relative dark:bg-gray-900 dark:text-gray-100\"> <div class=\"self-stretch flex items-center px-3 flex-shrink-0 dark:bg-gray-700 dark:text-violet-400\"> <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" class=\"h-8 w-8\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\"></path></svg> </div><div class=\"p-4 flex-1\"> <h3 class=\"text-xl font-bold\">Error</h3> <p class=\"text-sm dark:text-gray-400\">The password is incorrect. Do you need to <a href=\"#\" rel=\"referrer noopener\" class=\"underline\">recover your password?</a> </p></div><button type=\"button\" class=\"absolute top-2 right-2\"> <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"h-4 w-4 p-2 rounded cursor-pointer\"><path fill-rule=\"evenodd\" d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\" clip-rule=\"evenodd\"></path></svg> </button> </div>
What is the expected behavior?
after saving and loading pages object, it convert whitespace to "null" and it shows "null" instead of whitespace.
What is the current behavior?
And to see nulls on the page u should export page using grapesj-export plugin .
![Screenshot 2023-07-10 114242](https://private-user-images.githubusercontent.com/94228259/252328391-d7243d8d-79b1-4ef8-9828-5c2294e49895.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTIwNDQsIm5iZiI6MTczODk5MTc0NCwicGF0aCI6Ii85NDIyODI1OS8yNTIzMjgzOTEtZDcyNDNkOGQtNzliMS00ZWY4LTk4MjgtNWMyMjk0ZTQ5ODk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA1MTU0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyODVkZTI0NmRmZGYzYzhlZWUwY2JjYmEzMDkzNTYxYzQyMmRhMjkwZGJmOTc3NWIwZDQ1Nzc4YWQ1ZDc5ZDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6jlk_5DBGn9jdNjnROXfq3T6K5JgjW_mxUab2mSCj8k)
and exported page will look like this :
in brief, this is what cause the issue :
{ "type": "textnode", "content": null },
this issue appeared only in the latest versions grapesjs>v0.18.4
Note
This issue is not from my server or even source code of the component itself
Code of Conduct
The text was updated successfully, but these errors were encountered: