Skip to content

Added support HTML rendering in help and title fields#3001

Merged
tabuna merged 3 commits into
masterfrom
html_title_and_help
Apr 22, 2025
Merged

Added support HTML rendering in help and title fields#3001
tabuna merged 3 commits into
masterfrom
html_title_and_help

Conversation

@tabuna

@tabuna tabuna commented Apr 22, 2025

Copy link
Copy Markdown
Member

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