You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2019/08/29 10:37:04 UTC

[GitHub] [incubator-weex] simonwu-os commented on issue #2847: richtext动态赋值,没办法渲染

simonwu-os commented on issue #2847: richtext动态赋值,没办法渲染
URL: https://github.com/apache/incubator-weex/issues/2847#issuecomment-526128935
 
 
   Hi, you can do it indirectly.  ie.  your user searchs a keyword in a passage, and you want to display  all keywords occuring in the passage with red color.  Then you can parse the passage, and split it to form object array.  such as  {style: "color:red", text: keyword}, {style: "", text: other_words }.  then you can through v-for to display it.
   there some sample code: http://dotwe.org/vue/bd599edc2b21fb41494972c043175744.
   
   If you need image, you can manage it too according to your requirements.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services