# Text.htmlText

**URL:** <https://forum.kirupa.com/t/text-htmltext/259947>\
**Category:** Uncategorized\
**Created:** [May 10, 2008, 6:53pm UTC](https://forum.kirupa.com/t/text-htmltext/259947 "2008-05-10T18:53:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adnan794](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@adnan794](https://forum.kirupa.com/u/adnan794)\
**Post date:** [May 10, 2008, 6:53pm UTC](https://forum.kirupa.com/t/text-htmltext/259947/1 "2008-05-10T18:53:02Z")

</div>

Hi all

Is there any way that you can disable html tags if you want the user to edit only the text inside the text field.

What I am trying to do is allowing the user to edit content of a textfield without accidentally deleting and html tag. Like if I have the follwoing html text that is being displayed in a textfield.

[FONT=WileyCode-Regular][SIZE=1][LEFT][SIZE=2]txt.htmlText = “\<p\>List of books I’ve started and not finished [/SIZE][/SIZE][/FONT][FONT=CharcoalSymbols]i[/LEFT]  
[/FONT][FONT=WileyCode-Regular][LEFT]and why. \<br\> \<li\>Finnegans Wake - incoherent\</li\>\<li\>Atlas [/FONT][FONT=CharcoalSymbols]i[/LEFT]  
[/FONT][FONT=WileyCode-Regular][LEFT]Shrugged - boring\</li\>\<li\>Programming Perl - don’t like [/FONT][FONT=CharcoalSymbols]i[/LEFT]  
[/FONT][FONT=WileyCode-Regular][SIZE=1][SIZE=2]Perl\</li\>\<li\>Remembrance of Things Past - too long\</li\>\</p\>”;[/SIZE]  
[SIZE=2][/SIZE]  
[SIZE=2]Here I want to give the option to user to edit only the content not the tags in any way.[/SIZE]  
[SIZE=2][/SIZE]  
[SIZE=2]I hope I am making any sense.[/SIZE]  
[SIZE=2][/SIZE]  
[SIZE=2]Please let me know if you want more information.[/SIZE]  
[SIZE=2][/SIZE]  
[SIZE=2]Thanks[/SIZE]  
[SIZE=2][/SIZE]  
[SIZE=2][/SIZE]

[/SIZE][/FONT]

---

<div class="post-metadata">

**Author:** ![congyaan](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@congyaan](https://forum.kirupa.com/u/congyaan)\
**Post date:** [May 12, 2008, 5:21am UTC](https://forum.kirupa.com/t/text-htmltext/259947/2 "2008-05-12T05:21:04Z")

</div>

Agree with the upstairs , that’s a good way.you can give some new textFields and made the user enter contents in to,at the end you can add the contents together like this:

txt.htmlText = “\<p\>"+txt1.text+" \<br\> \<li\>“txt2.text”+\</li\>\<li\>"+txt3.text+"\</li\>\<li\>"+txt4.text+"\</li\>\<li\>"+txt5.text+"\</li\>\</p\>”;

---

<div class="post-metadata">

**Author:** ![adnan794](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@adnan794](https://forum.kirupa.com/u/adnan794)\
**Post date:** [May 12, 2008, 2:45pm UTC](https://forum.kirupa.com/t/text-htmltext/259947/3 "2008-05-12T14:45:32Z")

</div>

Thanks for your reply I will implement this.

Regards  
Adnan
