Page 1 of 1

Edit/Display text as HTML in VLF command Handler

Posted: Fri Feb 01, 2019 7:54 pm
by PhilA
Hi, first time post and currently in uncharted waters...

We have a VLF command handler where we display description text from in ISeries file. Ideally I would like to see the data in a HTML format on the command handler if the Text has been formatted with HTML tags.

I would like to amend this test using a 3rd party HTML editor by passing arguments (ie the Text Data) to the editor and then passing the HTML formatted text back to the command handler.

Has anyone done anything similar and if so can you suggest how this can be done.

Any help would be appreciated..

Re: Edit/Display text as HTML in VLF command Handler

Posted: Sat Feb 02, 2019 1:20 am
by jyoung
Hi and Welcome!

There is a VLF-ONE demo that uses QuillJS embedded in a widget. ... 8_7000.htm

You can find the implementation in DF_Note_QuillInterface widget and the DF_Note_NoteDetailPanel RP.

Hope this helps.

Re: Edit/Display text as HTML in VLF command Handler

Posted: Sat Feb 02, 2019 2:30 am
by Pablo
Hi Phil,

You'd be thinking at writing a widget to wrap around the 3rd party editor.

The shipped VLF demo includes a Notes command handler - DF_Note_CommandHandler - attached to Places, Things and People in the Resources Application. The handler uses DF_Note_NoteDetailPanel which is the wrapper around the widget DF_Note_Quillinterface.

Open DF_Note_Quillinterface and look at the Resources tab. You can add external Javascript/css. I don't know the editor you will use but if you have to include external Javascript that's the way to do it.
If your editor is provided as a html page you would probably create an iFrame container to point to it.
If that's the case you would do that in the PROTOTYPE.onRealizeControl routine. Find that routine in the quill widget ... you'd see this

PROTOTYPE.onRealizeControl = function( parentDiv )

The parentDiv is passed as an argument to the widget and where you would append your manufactured child iFrame. Once the onRealizeControl has been executed it fires an Initialized event meaning the widget is now operational. See Evtroutine Handling(#DF_Note_QuillInterface.Initialize) in DF_Note_NoteDetailPanel.

Look also at the widget's definition tab where you define properties/methods/events to talk to the handler.
I suppose your widget would be quite similar in that you'd have a setContent where you pass the html from the iSeries and a getContent when the user has finished with editing that returns the contents as a string.

[while I was writing this I see that Joe beat me to it :)]


Re: Edit/Display text as HTML in VLF command Handler

Posted: Thu Feb 28, 2019 11:33 pm
by PhilA
Hi, Thanks fo the replies guys, will will review the demos...thanks