We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using an extension to add style as a global attribute to a number of Nodes, via addGlobalAttributes.
style
When an HTML tag with and empty style tag style="" is parsed, it's being rendered as style="0".
style=""
style="0"
<p style="0">test paragraph</p>
Here's a simplified example using just paragraphs: https://codesandbox.io/s/epic-rubin-21irr?file=/src/App.vue
I can fix this using renderHTML, though I don't quite understand why because I'm just returning null
renderHTML
null
See my CodeSandbox https://codesandbox.io/s/epic-rubin-21irr?file=/src/App.vue
https://codesandbox.io/s/epic-rubin-21irr?file=/src/App.vue
<p style="">test paragraph</p>
If there's a better way to enable common HTML tag attributes like style, class, id on every Node type then I'd be happy to hear it
The text was updated successfully, but these errors were encountered:
As a workaround: Try returning '' instead of null.
''
Sorry, something went wrong.
@hanspagel - thanks, but this actually works OK: renderHTML: (attributes) => { return { style: attributes["style"] || null }; }
renderHTML: (attributes) => { return { style: attributes["style"] || null }; }
This doesn't work though: renderHTML: (attributes) => { return { style: attributes["style"] }; }
renderHTML: (attributes) => { return { style: attributes["style"] }; }
Which is strange because attributes["style"] === null when I check
attributes["style"] === null
5da313a
No branches or pull requests
What’s the bug you are facing?
I'm using an extension to add
style
as a global attribute to a number of Nodes, via addGlobalAttributes.When an HTML tag with and empty style tag
style=""
is parsed, it's being rendered asstyle="0"
.<p style="0">test paragraph</p>
Here's a simplified example using just paragraphs:
https://codesandbox.io/s/epic-rubin-21irr?file=/src/App.vue
I can fix this using
renderHTML
, though I don't quite understand why because I'm just returningnull
How can we reproduce the bug on our side?
See my CodeSandbox
https://codesandbox.io/s/epic-rubin-21irr?file=/src/App.vue
Can you provide a CodeSandbox?
https://codesandbox.io/s/epic-rubin-21irr?file=/src/App.vue
What did you expect to happen?
<p style="">test paragraph</p>
Anything to add? (optional)
If there's a better way to enable common HTML tag attributes like style, class, id on every Node type then I'd be happy to hear it
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: