Copy and paste without formating - InfoPath Dev
in

InfoPath Dev

Copy and paste without formating

Last post 05-02-2007 09:09 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-17-2006 11:18 PM

    Copy and paste without formating

    Hi,

    I have the following problem I have in a rich textbox some formating that I set (xhtml:b) for enter my model.

    For example:
    <Text>the <xhtml:b>cat</xhtml> is under the <xhtml:b>table</xhtml>.</Text>


    But if the user user make a copy and paste from word for example there is a problem because there copy the font familly attribut and other things that I dont need how I can do for remove this formatting?

    What is the best before they insert (crtl-v) or after on Save event?

    So for resume there must stay in my richtext only my formatting (xhtml:b with an id attribut equals to T,B,N,I) that I set in my code behind.

    But If I can remove the formatting before they insert with crtl+v I think it's the best way!

    Thanks

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 05-02-2007 09:09 AM In reply to

    Re: Copy and paste without formating

    Hi Thierry,

    One idea would be to provide a regular textbox above the rich-text box for pasting. The user would paste into this regular textbox (therefore removing all formatting), and then you could write code to copy from the regular textbox into the rich-text box, adding all of the tags that you need.

    Just an idea, I hope you got it figured out!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.