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

feat: rich text #245

Closed
wants to merge 3 commits into from
Closed

feat: rich text #245

wants to merge 3 commits into from

Conversation

DiogoSoaress
Copy link
Member

What it solves

Adds richText to the BaseBlock type. One step closer to how CMS store rich text.
Solves the need to have links in between text blocks.

Screenshot

Screenshot 2023-10-27 at 15 34 00

@github-actions
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

Branch preview

✅ Deployed to dev:

https://safe-web-landing.dev.5afe.dev

@katspaugh
Copy link
Member

Good idea!
You could take it even further by allowing Markdown in all content types. Most md compilers allow allowlisting possible HTML tags, so it should be safe to insert as HTML.

@DiogoSoaress
Copy link
Member Author

Definitely! I will create an issue for that to implement it more generically.

I would however like to keep the scope of this PR minimal to allow embedding the link in the screenshot I shared (the new governance framework link). WDYT?

@katspaugh
Copy link
Member

katspaugh commented Oct 27, 2023

I've approved it, but tbh this solution is pretty hacky.

Actually, those components already allow simple tags like <b> and <i>, so you could just insert a link directly. The sanitize function might have to be updated to allow a-tags.

@DiogoSoaress
Copy link
Member Author

Thanks 🙏
I will refactor it when tackling #246

@DiogoSoaress
Copy link
Member Author

DiogoSoaress commented Oct 27, 2023

You're right, there was no need for the very custom solution. I'm closing this PR for #247

Content types markdown support will follow on #246

@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2023
@DiogoSoaress DiogoSoaress deleted the rich-text branch June 13, 2024 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants