Set Rich Text Value in client script

Peter Xiang
Tera Expert

Hi Everyone,

I want to use client script to modify the rich text value in the Rich Text lanel type. Does anyone know how to implement it?

find_real_file.png

19 REPLIES 19

HI

I just did a test-drive on a new Catalog Item to review that scenario:

I created a catalog item as shown in the screenshot below. Have a look at the variable in the related list at the bottom of the screenshot:

find_real_file.png

Then, I created a Requested Item based on that Catalog Item:

find_real_file.png

Review the variable values that I have set in the REQ ITEM form.

Then, I created a UI Action (Button) to sit on top of the form see screenshot below:

find_real_file.png

Make sure to mark that UI Action as "Client" = "true" like shown above, and make the "Onclick" value point to the function defined in your UI Action!

Look at the syntax of how you can access the variables of your Requested Item

 

Clicking that Button just showed the three Messages at the top (see screenshot below):

find_real_file.png

BTW: Setting is as simple as that:

find_real_file.png

 

Let me know if that answers your question and mark my answer as correct and helpful.

BR

Dirk

 

 

 

 

Hi Dirk,

    Thank you for spending so much time on this question, but this may be not able to solve my question beacuse I did not clearly explain my requirements.

    I have create a record producer, and the default picture is displayed on the portal. But I want to dynamically get the content through Ajax based on the charity event selection I choose, and then replace this picture. For example, when I select event 1, I can replace the existing pictures on the portal with the picture i get. The top picture  is the picture i got through Ajax, I can't use g_form.setValue("banner"), g_form.setValue("bnnder.rich_text") and g_form.setValue("rich_texk") change picture in Catalog Client Scripts.

find_real_file.png

Hi

Uhhh... What a game-changer...

I need to review if I can also answer that, sorry. Seems as if my previous effort now was a bit worthless and not helpful.

Let me try to find time for your real question then.

BR

Dirk

Hi Dirk,

    If you found anything please let me know, thanks.

Hi

Do you have an update on this?

If you were able to solve your issue or your question is answered, can you please close this thread by marking the best answer as correct & helpful.

This would indicate other users also to benefit from your question.

Thanks a lot &

BR