You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/04/02 12:03:37 UTC

[incubator-weex-site] branch master updated: Update richtext.md (#372)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git


The following commit(s) were added to refs/heads/master by this push:
     new c7bf854  Update richtext.md (#372)
c7bf854 is described below

commit c7bf85407b7aad5db34c58f54810c7412f1c2541
Author: sunshl <su...@gmail.com>
AuthorDate: Tue Apr 2 20:03:33 2019 +0800

    Update richtext.md (#372)
    
    Fire event when span is clicked which is in an a-label of a richtext component.
---
 docs/docs/components/richtext.md | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/docs/docs/components/richtext.md b/docs/docs/components/richtext.md
index 38f5f0d..704fc4e 100644
--- a/docs/docs/components/richtext.md
+++ b/docs/docs/components/richtext.md
@@ -64,12 +64,16 @@ Only limited css styles listed below are supported by richtext.
 ## Events
 
 * **common events**. Support [common events](../events/common-events.html).
-* **itemclick**. This event will be fired when
-   * An `img` in richtext is clicked
-   * None of parents is an `a` tag
-   * If the second condition is not satisfied, Weex will try to open the hyperlink of `a` tag instead.
-   * **pseudo-ref** of img will be passed to the callback function of onitemclick.
+* **itemclick**. Only works on `img` and `span`:
+   * `img` tag:
+      * None of parents is an `a` tag when the `img` tag is clicked.
+      * If the first condition is not satisfied, Weex will try to open the hyperlink of `a` tag instead.
+      * **pseudo-ref** of img will be passed to the callback function of onitemclick.
+   * `span` tag:
+      * The `span` tag is clicked whose parent is an `a` tag.
+      * The href property is 'click://' (This condition is required on iOS and is optional on Android).
+      * The `a` tag has a `pseudo-ref` property whose value will be sent with the itemclick event.
 
 ## Example
 
-[Demo](http://dotwe.org/vue/f748b0cee3991522a66d4376b66a4f2a)
\ No newline at end of file
+[Demo](http://dotwe.org/vue/f748b0cee3991522a66d4376b66a4f2a)