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

[CAL-3713] Line breaks not reflecting in the event type description #15056

Open
milospuac opened this issue May 15, 2024 · 1 comment
Open

[CAL-3713] Line breaks not reflecting in the event type description #15056

milospuac opened this issue May 15, 2024 · 1 comment
Labels
booking-page area: booking page, public booking page, booker 🐛 bug Something isn't working event-types area: event types, event-types Medium priority Created by Linear-GitHub Sync ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work

Comments

@milospuac
Copy link
Contributor

milospuac commented May 15, 2024

From SyncLinear.com | CAL-3713

Copy link

dosubot bot commented May 15, 2024

To address the issue with line breaks not displaying correctly in the event type descriptions, it's likely related to how the descriptionAsSafeHTML property processes line breaks. This property should convert line breaks (\n) into <br> tags for them to render correctly in HTML. Here's a code snippet to help with this conversion:

function convertLineBreaksToHTML(inputText: string): string {
  return inputText.replace(/\n/g, '<br>');
}

You can use this function to ensure line breaks in your event type descriptions are correctly converted before setting the descriptionAsSafeHTML property. This approach will help maintain the intended formatting in the browser.

Additionally, reviewing similar past issues might offer further insights or solutions:

  1. Add line breaks, styling, and/or markdown to event description
  2. [CAL-672] turn description into a multi-line field
  3. [CAL-816] event type description: line break not applied on booking page

These references could provide valuable context or alternative approaches to solving your problem. If you need more assistance or have other questions, feel free to ask.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added event-types area: event types, event-types 🐛 bug Something isn't working labels May 15, 2024
@ciaranha ciaranha added ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work Medium priority Created by Linear-GitHub Sync booking-page area: booking page, public booking page, booker labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
booking-page area: booking page, public booking page, booker 🐛 bug Something isn't working event-types area: event types, event-types Medium priority Created by Linear-GitHub Sync ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work
Projects
None yet
Development

No branches or pull requests

2 participants