Skip to content

Support setting inner html from string with the html macro #182

@ghost

Description

Problem

Devs would like to reuse existing templates/snippets for a lot of parts of an application.

They may try using pub const INDEX_HTML: &'static str = include_str!("../assets/templates/index.html"); and then inside html! { <div id="wrapper>{ INDEX_HTML } </div> } but all they will get is the html rendered as plain text inside the wrapper div :(

Proposed Solution

Add a special property like React's dangerouslySetInnerHTML (https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml) to VTag

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions