Loading Content

pinEdit WP

Loading Content


Jasper 09-25-2006, 10:17

hi there,

Im currently building an application using your texteditor. Can you please tell me how i can change the location from wich the editor loads the content?
i use the following code: onclick="pinEditID1.editLoad('1.html').
it trys to load the content from  pinEdit/editor/1.html, while it should be pinEdit/doc/1.html

Jasper

Re: Loading Content


Pintexx Support 09-25-2006, 1:40

Hi Jasper,

when you load content this way the file must be relative to "editor" folder.
Otherwise please specify the full or the relative path to your file like

pinEditID1.editLoad('../doc/1.html').

Regards,
Hans-Peter

Re: Loading Content


Jasper 09-25-2006, 3:23
ai, that was easy! Thank you! might come back later with another question

Re: Loading Content


Jasper 09-29-2006, 1:18

Hans-Peter,

you stated that if i use this method. So i guess there are other ways to load content? Can you please tell me the right method to load a file in the editor? My structure is as following: first the users selects a file, then page reloads and content should be loaded. It goes through a script that gets the filename from a database, and then loads the file pointed to by the database. So the content that has to be loaded is a <name>.html file.

as far as i know the only method is the editLoad function

t.i.a,

Jasper

Re: Loading Content


Pintexx Support 09-29-2006, 4:27

Jasper,

it depends if you want to load content at client or server side.

You could also read the file into a string at server side and write the string to the editor.

Regards,
Hans-Peter

Re: Loading Content


Jasper 09-29-2006, 5:08
Thank you for pointing me in the right direction! now using setText, works really fine!