-
-
Notifications
You must be signed in to change notification settings - Fork 542
feat: Inline style props in external HTML #1636
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
Changes from 3 commits
5ada460
687e092
f98ac80
b936077
7185eb1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div data-editable="">React Context Paragraph</div> | ||
<div data-editable="" style="white-space: normal;">React Context Paragraph</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is the white-space added? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is something that's added automatically to the React node view wrapper. Do we need to get rid of it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure; just wondering why it wasn't there before? (i.e.: what changed in this PR)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yeah - since we render some props out to inline styles for external HTML, I changed it so inline styles are also preserved (previously only attributes were). The React node view wrapper adds that white space style automatically, so it also gets preserved. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<p class="react-custom-paragraph">Hello World</p> | ||
<p class="react-custom-paragraph" style="white-space: normal;">Hello World</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<p class="react-custom-paragraph">Hello World</p> | ||
<p class="react-custom-paragraph" style="white-space: normal;">Hello World</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<p class="react-custom-paragraph">Hello World</p> | ||
<p class="react-custom-paragraph">Hello World</p> | ||
<p class="react-custom-paragraph">Hello World</p> | ||
<p class="react-custom-paragraph" style="white-space: normal;">Hello World</p> | ||
<p class="react-custom-paragraph" style="white-space: normal;">Hello World</p> | ||
<p class="react-custom-paragraph" style="white-space: normal;">Hello World</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
<p class="simple-react-custom-paragraph" data-editable="">React Custom Paragraph</p> | ||
<p | ||
class="simple-react-custom-paragraph" | ||
data-editable="" | ||
style="white-space: normal;" | ||
>React Custom Paragraph</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
<p class="simple-react-custom-paragraph" data-editable="">Custom React Paragraph</p> | ||
<p class="simple-react-custom-paragraph" data-editable="">Nested React Custom Paragraph 1</p> | ||
<p class="simple-react-custom-paragraph" data-editable="">Nested React Custom Paragraph 2</p> | ||
<p | ||
class="simple-react-custom-paragraph" | ||
data-editable="" | ||
style="white-space: normal;" | ||
>Custom React Paragraph</p> | ||
<p | ||
class="simple-react-custom-paragraph" | ||
data-editable="" | ||
style="white-space: normal;" | ||
>Nested React Custom Paragraph 1</p> | ||
<p | ||
class="simple-react-custom-paragraph" | ||
data-editable="" | ||
style="white-space: normal;" | ||
>Nested React Custom Paragraph 2</p> |
Uh oh!
There was an error while loading. Please reload this page.