-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Added markdown extensions support #14419
base: 4.x
Are you sure you want to change the base?
Conversation
Ping @danharrin @ryangjchandler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea! Few things:
- I think all the properties and methods should be renamed to
commonMarkOptions()
andcommonMarkExtensions()
for clarity - I think it should apply to the TextColumn and TextEntry, "summarizer" classes too, which can render Markdown using the
markdown()
method - Since we're using it in multiple places, extract the properties and methods to a trait
CanConfigureCommonMark
inFilament\Support\Concerns
@danharrin I have updated the PR with requested changes. The failing actions are for Laravel 10. |
Laravel 10 will soon be out of security release support, so I will probably drop it in v4 anyway. I will update this PR when I do so. Thanks for the rest of it, it looks perfect! |
You might have to lock it to at least v11.13.0 then. |
Description
As proposed in #1294 (comment), this PR adds support for markdown extensions.
One important change - HTML is sanitized before being passed to
markdown()
function. This still sanitizes user input, but allows markdown to produce "unsafe" HTML like<iframe>
.I'm starting this as draft PR to receive feedback. I'll be able to update docs once desired API is confirmed. Also, let me know if this needs tests and point me to an example I can follow.
Visual changes
No visual changes.
Functional changes
composer cs
command.