Skip to content

Commit

Permalink
Temporary fix for whitespace in HTML, will need to be addressed later
Browse files Browse the repository at this point in the history
  • Loading branch information
Tug committed Dec 19, 2018
1 parent c3fff6d commit f7513a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,13 @@ export class RichText extends Component {
style,
formattingControls,
isSelected,
value,
} = this.props;

// Save back to HTML from React tree
const html = '<' + tagName + '>' + value + '</' + tagName + '>';
const record = this.getRecord();
// Use record instead of this.props.value to make sure we're in sync with Aztec on the selection
// TODO: Make sure the selection in Aztec and in Gutenberg both handle whitespaces in HTML and thus are in sync
const html = '<' + tagName + '>' + this.valueToFormat( record ) + '</' + tagName + '>';

return (
<View>
Expand Down

0 comments on commit f7513a8

Please sign in to comment.