Skip to content

Added support HTML rendering in help and title fields #3001

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

Merged
merged 3 commits into from
Apr 22, 2025

Conversation

tabuna
Copy link
Member

@tabuna tabuna commented Apr 22, 2025

Implemented functionality to render HTML content in both help() and title() methods of the Input field.

This method accepts a plain text string, or an instance of Illuminate\Support\HtmlString or Illuminate\Contracts\Support\Htmlable. This allows you to render HTML, or even markdown, in the helper text:

use Illuminate\Support\HtmlString;
use Illuminate\Support\Str;

Input::make('name')
    ->help(new HtmlString('Your <strong>full name</strong> here, including any middle names.'))

Input::make('name')
    ->title(Str::of('Your **full name** here, including any middle names.')->inlineMarkdown()->toHtmlString())

@tabuna tabuna force-pushed the html_title_and_help branch from 67e7f4d to b06af3a Compare April 22, 2025 22:55
@tabuna tabuna merged commit 758719d into master Apr 22, 2025
@tabuna tabuna deleted the html_title_and_help branch April 22, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant