Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Specify component's root DOM element instead of defaulting to a plain DIV #339

Open
jasesmith opened this issue Jan 28, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jasesmith
Copy link

Is your feature request related to a problem? Please describe.
Yes. The root element of this component outputs a naked div tag and breaks my CSS layout controls and styles and forces me to manually wrap the component in my desired tag rather than just outputting my desired tag.

Describe the solution you'd like
I would really like to be able to specify which tag should be the root element. For instance in my implementation and layout CSS I am expecting a section tag to be the DOM node instead of a div tag.

Describe alternatives you've considered
I can wrap the component instance in my template with my desired tag, but that still leaves a naked div child node in the DOM and in some cases breaks CSS flex or grid layouts.

Additional context
Seems like this final return could use a prop like md.tag (or something with a 'div' fallback?) for the tag type instead of 'div':

return () => h('div', { innerHTML: md.value });
@jasesmith jasesmith added the enhancement New feature or request label Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant