cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Editor in WebDynpro

Former Member
0 Kudos

Hi all,

I need to provide an HTML Editor into a WebDynpro application. Unfortunately, this control is not available in the standard set of WebDynpro UI Elements.

I don't want to use an Office control because it requires an ActiveX control and is too heavyweight as well.

Any idea how to achieve this?

Marco

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can use Text Edit as a editor.

1. Give the source of text edit as context variable of binary type eg. Data.

2.In the DoInit() method write the code

 

IWDAttributeInfo attr = 
wdContext.getNodeInfo().getAttribute("Data"); 

type = attr.getModifiableSimpleType(); 

ISimpleTypeModifiable type; should be defined as a global variable.

3. Insert a Iframe and set the source as a context variable Source (String type).

4.Insert a button with text as Display and create an action as OnActionDisplay(). In that action write the code

 

wdContext.currentContextElement.setSource(type.format(wdContext.currentContextElement().getData())); 

I think this would solve your problem.

regards,

Mahesh

Please do award points if the answer is usefull

Former Member
0 Kudos

Hi,

the procedure seems pretty straightforward. However what about the iframe? Where should it be located?

Also if any event is triggered on the UI, does the iframe content get reset?

Cheers,

Marco

Former Member
0 Kudos

Hi,

This is simplest way which i found.

You can place the IFrame in the same view or different view. As far as you don't change the source of the TextEdit the IFrame will have the same content.

regards,

Mahesh

Former Member
0 Kudos

Hi,

Just check on to this link for working with HTML and WEBDYNPRO.

Hope this helps u,

Regards,

Nagarajan.

Former Member
0 Kudos

Hi,

I don't know if it could be a real solution to my problem. What I'm looking for is some HTMLEditor control like the one that is available in XF Builder or HTMLB.

What happens if I insert an Iframe and then I press any button on the page (page reload)?

Cheers,

Marco