x-tag / core

The Heart of X-Tag
http://x-tag.github.io/
Other
1.25k stars 151 forks source link

Ability to define placeholder for inner HTML #193

Open mkopylec opened 6 years ago

mkopylec commented 6 years ago

Is there a way to define something like:

xtag.register('x-frankenstein', {
    content: '<div><p>component text</p>${innerHTML}</div>'
});

so it can be use in HTML file like:

<x-frankenstein>
    <p>external text</p>
</x-frankenstein>

and then the rendered result to be:

<div>
    <p>component text</p>
    <p>external text</p>
</div>

?

csuwildcat commented 6 years ago

We just landed version 2.0 alpha, which contains this and more - have a look: http://x-tag.github.io/docs

ghost commented 6 years ago

Sorry I tried to @ mention this issue on the gitter channel. I don't believe their is any problem with this part of the api in v2

ghost commented 6 years ago

Although I can't find it in the docs but it's in the jasmine tests

~ edit I made a pull request that added in something on the method for placeholders => https://github.com/x-tag/x-tag.github.io/pull/13

let me know if you need anything else