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

Newlines not correctly handled in product card titles #20027

Open
1 task done
cathysarisky opened this issue Apr 16, 2024 · 3 comments
Open
1 task done

Newlines not correctly handled in product card titles #20027

cathysarisky opened this issue Apr 16, 2024 · 3 comments

Comments

@cathysarisky
Copy link
Contributor

Issue Summary

If I press shift-enter while creating a title for a product card, then each line of the product title ends up in a separate span. I can publish and it displays without issues. (This is handy, because I might want to change how those spans are styled or laid out.)

Everything is OK until I open the post a second time in the editor. At that point, the title is consolidated into a single span.

Maybe titles shouldn't be breakable into multiple spans, but it'd be nice if the behavior (whatever it is) were consistent, and opening a published post didn't reformat it.

Steps to Reproduce

Create a product card.
Give it a title that spans multiple lines.
Publish.
Observe the output of the post HTML, with the title in multiple spans.
Open the post in the editor again. (Line breaks will be gone.)
Save, without making other changes.
Observe the output of the HTML, with the title now in a single span.

Ghost Version

5.81.1

Node.js Version

18

How did you install Ghost?

WSL2/using Ghost-cli

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Apr 16, 2024
@daniellockyer daniellockyer removed the needs:triage [triage] this needs to be triaged by the Ghost team label May 1, 2024
@ErisDS ErisDS added the P4 - Low label Jun 14, 2024 — with Linear
@nairvismaya
Copy link

can you assign me this

@dhrcodeer
Copy link

Newlines are also not preserved in the headings and subheadings of a header card. It's the same behavior: it publishes and displays without issues, but on re-opening the post/page in the editor the newlines disappear.

Any updates on the issue?

@cathysarisky
Copy link
Contributor Author

I have a PR open that fixes the behavior. (It's in the Koenig repo, since this is actually a Koenig editor issue.) Stay tuned! :)

@ErisDS ErisDS added the OSS label Nov 8, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants