CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQHTMLEditor - moving to the top of the first page

General discussion

by ScottWGast » 13 May 2014 20:41

When I set

myHTMLEditor.Content := strHTML;

The content is loaded and displayed correctly, but the editor scrolls all of the way down to the bottom of the content. I would prefer that the content be displayed starting at the top of the document... essentially, auto-magically hitting Ctrl+PgUp once the content is loaded.

I have looked @ the CG Documentation along with the elRte.org documentation, but I cannot figure out how to get it done.

Do you have a suggestion?

Thanks,
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by ScottWGast » 15 May 2014 16:46

bump
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 15 May 2014 17:38

jQuery documentation is all you need :D

This is that javasript that needs to be executed after you load the content.



js:= Format('$($("#%s").find("iframe")[0].contentDocument.body).scrollTop(0);',[HTMLEditor.Name ]);

If it's an ajaxevent you can use WebApplication.CallbackResponse.AddJavascriptToAjaxResponse or CGAddJavaScriptToAjaxResponse(

If it's a full submit you can use PageContext.AddToInirProcLastCode
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General - Archive

Who is online

Users browsing this forum: No registered users and 4 guests

Contact Us.