Load text, and put into EditorGadget
Posted: Wed Jul 13, 2016 12:07 pm
Hi there,
had some headaches fiddling with loading of text, and applying it to an EditorGadget.
I am posting this for further reference
ApplyDemoSnippet ( 0, "" )
This one needs an EditorGadget number 1.
Cheers
J.
had some headaches fiddling with loading of text, and applying it to an EditorGadget.
I am posting this for further reference

Code: Select all
Procedure ApplyDemoSnippet ( gadget, content )
If IsGadget ( gadget ) : SetGadgetText ( gadget, content ) : EndIf
EndProcedure
Procedure LoadTextIntoEditorGadget ()
! jQuery.get('data/test.txt', function(data) {
! f_applydemosnippet ( 1, data );
! }, 'text');
EndProcedure
This one needs an EditorGadget number 1.
Cheers
J.