We all know that in HTML5 edit documents when <br> wrap directly on it, but did not recognize the wxml <br> label.
Spaces, wrap in a small program written summarized as follows:
Must <text>
! Tag
First, space
js:
Page ({ Data: { Text0: 'This is a paragraph \ n I see turned wrap', text1: 'This is a paragraph see my space ", }, })
wxml:
<View> <text> This is a paragraph \ n I see turned wrap </ text> </ View> <View> <text> Text0 {{}} </ text> </ View>
Second, the continuous spaces and spaces
<View> <text style = "White Space-: pre-wrap"> {{}} ---- text1 White-Space: pre-wrap text retention space, carriage return </ text> </ View> <View> <text> this is a paragraph \ t \ t \ t \ t \ t \ t I see a space (a space only displays a plurality of) </ text> </ View> <View> <decode text = "{{to true }} "> I & ensp; start & ensp; & ensp; & ensp; spaces of (space is Chinese characters half the size) </ text> </ View> <View> <text decode =" {{to true}} "> I want & emsp; start & emsp; & emsp; & emsp; spaces of (space is the Chinese character size) </ text> </ View> <View> <text decode = "{{to true}}"> I want to & nbsp; start & nbsp; & nbsp; & nbsp; the space (the space from the font set) </ text> </ View>
Background incoming text wrapping rich in rich text \ n will be treated as string processing, only written in js file \ n, in order to be properly escaped achieve wrap.