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

[Feature] HTML Field #280

Closed
SeoFood opened this issue Aug 28, 2018 · 7 comments
Closed

[Feature] HTML Field #280

SeoFood opened this issue Aug 28, 2018 · 7 comments

Comments

@SeoFood
Copy link

SeoFood commented Aug 28, 2018

A field type where you can return your own html so you can display images, links, status labels with your color etc.

HTML::make('Custom HTML', function() {
    return '<strong>' . $this->status . '</strong>';
})
@albalooshi
Copy link

I haven't tired this but I think this is achievable (for now until this feature to be implemented) by creating a custom field

@SeoFood
Copy link
Author

SeoFood commented Aug 28, 2018

yeah its possible but I don't want to create custom fields for just simple fields.

@davidhemphill davidhemphill added request Feature Request planned labels Aug 31, 2018
@davidhemphill
Copy link
Contributor

Working on this today. Might just make it into the next release. You'd be able to do something like this:

Text::make('Custom Link', function () {
    return view('custom-link', [
        'url' => url('/view-profile'),
        'name' => $this->name,
    ])->render();
})->asHtml(),

@bomshteyn
Copy link

I have made a custom HTML field for anyone that needs: https://github.com/treeStoneIT/nova-html

@laraning
Copy link

laraning commented Sep 1, 2018

Your solution is the best David, since it will give us full flexibility to render any HTML we want via a view :) happy to see it on the next Nova version 👍🏻

@RicardoRamirezR
Copy link

Version 1.0.9 has this covered

Text::make('Title')->asHtml()

@davidhemphill
Copy link
Contributor

Alrighty, closing since this just got released. Thanks for the help everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants