cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted text color

kroly_horvth
Participant
0 Kudos

Hi,

The customer requirement is that they create a descriptive text for a function and I have to display it on the top of the page. an example:

This Function is to do some action. As a regular text some part should be in red, other part is highlighted with blue.

In BSP I simply showed the B, I, U and FONT COLOR html tags, and he created the text. Now how is this possible in WebDynpro?

There is TextView I can change design like bold, or color to one of the many choices for SemanticColor. For longer text there is FormattedTextView, however that is rather limited.

One solution is to use the new HTMLFragment/HTMLContainer/HTMLIsland technology, however that is not working under IE8.

Your help is appreciated.

Thanks!

Charlie

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

There is no semantic Color assigned for Formatted Text View UI, but you can make the part of string Bold.

Or divide your string into 3 parts, and create 3 textView UI and set the string to the Text view with semantic color set to the part of string which you want to highlight and bind it to the corresponding text View.

The HTML Container/Element/Islands works in IE 9/ chrome/safari. So change your browser OR If you are on Netweaver 731 SP05 you can use application parameter WDPREFFEREDRENDERING with value STANDARDS to support HTML Integration in IE8 too.

Hope this helps u,

Regards,

Kiran

kroly_horvth
Participant
0 Kudos

Hi,

This was just an example sentence, if I have 10 sentences with 1 red words in each, should I break it into 30 elements? I don't think so. Actually it was a 'poetic' questions, I am just surprised nobody in the WebDynpro team thinks a web page could contain a text with other format than bold and italic.

The WDPREFERREDRENDERING is a must for the WD application to use HTML components even in IE11. The issue with this, that even if I specify it, IE8 will stop that the browser should run in standards mode.

I tried to create a HTTP handler class to add the X-UA-COMPATIBLE meta tag to force the standards mode, but it is not working, WD ignores it.

THanks,

Charlie

former_member184578
Active Contributor
0 Kudos

Hi,

That work around applies if the string size is less. As mentioned by you, if the size is more yes, we should not create multiple TV UI's .

And, as mentioned earlier, to use STANDARDS mode, you need to be on Netweaver 731 version; Please check the SAP Note: 1790704 & 1753544

Add the url parameter sap-ie=EmulateIE9 in the url, then it should work.

so it will look like.. comp:port/<application_path>&sap-ie=EmulateIE9

Hope this helps u,

Regards,

Kiran

kroly_horvth
Participant
0 Kudos

The 'sap-ie=EmulateIE9' solved the problem, thanks!

Answers (0)