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.