Hi everyone,
I have a text area (widget type = text area) with several lines (font = courier new).
Is it possible to highlight a specific line within the text area ?
For example:
Text for line 1.
Text for line 2.
Text for line 3.
Text for line 4.
I tried to add <b> ..text.. </b> but it isn't working.
There is a hex code x'25' for return resp. line feed which works fine. Is there also a hex code to highlight a line or a few words within the text area ?
Is there another function or is the only way to achieve this goal to use a html container or to use java script code ?
Having a function to easily highlight a few lines or words within a text area would be very helpful.
Thank you for your help in advance.
Christoph
Highlight a specific line in a text area
-
- Profound User
- Posts: 53
- Joined: Tue Jan 27, 2015 8:13 am
- First Name: Christoph
- Last Name: Seitz
- Company Name: Waser + Co. AG
- Phone: +41 44 94 74 341
- Address 1: Erlenwiesenstrasse 2
- City: Volketswil
- State / Province: Outside Canada/USA
- Zip / Postal Code: 8604
- Country: Switzerland
- Contact:
-
- Profound User
- Posts: 20
- Joined: Fri Sep 08, 2017 8:14 am
- First Name: Michael
- Last Name: Corbo
- Company Name: National Retail Systems
- Phone: 2018042713
- Address 1: 600 us rt 46w
- City: Hasbrouck Heights
- State / Province: New Jersey
- Zip / Postal Code: 07601
- Country: United States
- Contact:
Re: Highlight a specific line in a text area
Instead of a text area, use an html container with the html property rather than the value property set.
-
- Profound User
- Posts: 53
- Joined: Tue Jan 27, 2015 8:13 am
- First Name: Christoph
- Last Name: Seitz
- Company Name: Waser + Co. AG
- Phone: +41 44 94 74 341
- Address 1: Erlenwiesenstrasse 2
- City: Volketswil
- State / Province: Outside Canada/USA
- Zip / Postal Code: 8604
- Country: Switzerland
- Contact:
Re: Highlight a specific line in a text area
Thank you for your input.
Using a simple grid with a textbox in each row instead of a text area is also working (see attached file).
Using a simple grid with a textbox in each row instead of a text area is also working (see attached file).
- Attachments
-
- Grid.JPG (31.09 KiB) Viewed 533 times
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Highlight a specific line in a text area
A text area is simply a widget that inserts the HTML <textarea> tag. This does not offer for any sort of special formatting.... and is a built-in capability of the browser that we cannot change.
The solutions that chs and DanD have offered are both output-only solutions, which seems strange considering that a text area is an input field. But, perhaps the input capability isn't needed?
If you do want to provide formatting like this in an input field,I'd suggest incorporating a 3rd party JavaScript library for a rich text editing box. We have an example of one popular choice known as TinyMCE in our documentation here: http://www.profoundlogic.com/docs/displ ... MCE+Editor
The solutions that chs and DanD have offered are both output-only solutions, which seems strange considering that a text area is an input field. But, perhaps the input capability isn't needed?
If you do want to provide formatting like this in an input field,I'd suggest incorporating a 3rd party JavaScript library for a rich text editing box. We have an example of one popular choice known as TinyMCE in our documentation here: http://www.profoundlogic.com/docs/displ ... MCE+Editor
-
- Profound User
- Posts: 53
- Joined: Tue Jan 27, 2015 8:13 am
- First Name: Christoph
- Last Name: Seitz
- Company Name: Waser + Co. AG
- Phone: +41 44 94 74 341
- Address 1: Erlenwiesenstrasse 2
- City: Volketswil
- State / Province: Outside Canada/USA
- Zip / Postal Code: 8604
- Country: Switzerland
- Contact:
Re: Highlight a specific line in a text area
Thank you for your answer.
I will have a look at the MCE Editor.
The textbox field in my grid is an input field. I have created a little editor with a simple grid, a textbox and a bit of Java Script code. See attached file.
I will have a look at the MCE Editor.
The textbox field in my grid is an input field. I have created a little editor with a simple grid, a textbox and a bit of Java Script code. See attached file.
- Attachments
-
- Editor.JPG (79.14 KiB) Viewed 511 times
Who is online
Users browsing this forum: No registered users and 7 guests