30/05/2011

Différence entre RichEditableText et Richtext

Le composant RichText peut afficher du texte formaté et des paragraphes. Mais à la différence de RichEditableText, il est non-interactif: il ne supporte pas les liens hypertexte, le défilement, la sélection, ou l'édition.

Rich text
2 manières d'afficher du contenu
<s:RichText>Je suis <s:span fontSize='16'>GROS</s:span></s:RichText> 
Ou en textFlow
<s:RichText>
        <s:textFlow>
            <s:TextFlow>
                Je suis <s:span fontSize='16'>GROS</s:span> World!
            </s:TextFlow>
        </s:textFlow>
    </s:RichText>

RichEditableTxt,
<s:RichEditableText 
        editable="true" selectable="true">
        <s:text>
           Texte modifiable et sélectionnable
        </s:text>
    </s:RichEditableText>
 
Pour afficher un ascenseur, il faut encapsuler le composant richEditabletext par un scroller
<s:Scroller>
  <s:RichEditableText>
    <s:content><s:p>Mon paragraphe avec 
<s:span color="#ED3426">du texte en couleur</s:span>
<ns:br> </ns:br>
        et un retour à la ligne</s:p>
    <s:content>
  <s:RichEditableText>
<s:Scroller> 
Pourafficher un ascenseur horizontal, il suffit de mettre la valeur explicit à l'attribut linebreak

<s:RichEditableText  lineBreak="explicit">

2 commentaires:

  1. Your post really helped me to understand the Difference between RichEditableText and RichText. It has great details and yet it is easy to understand. That's what i was looking for. I will definately share it with others. Thanks for sharing.

    RépondreSupprimer