Home Search Member List Faq Register Login  
UltimateEditor
Re: SizeToFit per javascript

Thread Starter: lentinus   Started: 09-04-2008 8:06 AM   Replies: 4
 Karamasoft Support Forums » General Discussions » UltimateEditor » Re: SizeToFit per javascript
 Printable Version    « Previous Thread   Next Thread »
  04 Sep 2008, 8:06 AM
lentinus is not online. Last active: 11/7/2008 7:17:56 AM lentinus

Not Ranked
Joined on 09-04-2008
Posts 8
SizeToFit per javascript
Hello,
how can i Execute the Command "SizeToFit" per javascript??
I would like to Fit the Editor-Size to the whole window per javascript.

Thanks!

  
  04 Sep 2008, 12:35 PM
Karamasoft is not online. Last active: 9/2/2010 12:02:18 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 5,325
Re: SizeToFit per javascript
Are you referring to FitToWindow when you say SizeToFit? FitToWindow toolbar button already does that. Do you want to fit to window when the page is opened or do you want to create your own custom JavaScript to trigger the FitToWindow operation? If you let us know what exactly you are trying to achieve, we can help you better. Thanks.
  
  05 Sep 2008, 3:00 AM
lentinus is not online. Last active: 11/7/2008 7:17:56 AM lentinus

Not Ranked
Joined on 09-04-2008
Posts 8
Re: SizeToFit per javascript

Yes i mean FitToWindow ;-)
Yes, first i would like to fit to window when the page is opened.
And second, i would like to create my own javascript to trigger the FitToWindow operation. I have an embedded Webbrowser control on my WPF-Form and if i resize the Webbrowser i have execute the "FitToWindow"-Command to fill the complete Webbrowser-Area with the editor.

Thanks!


  
  05 Sep 2008, 5:12 PM
Karamasoft is not online. Last active: 9/2/2010 12:02:18 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 5,325
Re: SizeToFit per javascript
For the initial page load issue, you should set Selected property of the FitToWindow property to True in your editor XML file as follows:

<ToolbarItem Type="Button" ID="FitToWindow" Command="FitToWindow" ButtonFile="FitToWindow.gif" Selected="True" />

For the second issue, you can simulate the click event of the FitToWindow toolbar button using client-side JavaScript as follows:

document.getElementById('UltimateEditor1FitToWindow').click()

The client-side ID of the toolbar button takes the suffix of FitToWindow. For example, if the client-side ID of your UltimateEditor control is UltimateEditor1, it will be UltimateEditor1FitToWindow. Then, you can use that ID to simulate the click operation.


  
  17 Oct 2008, 12:27 AM
lentinus is not online. Last active: 11/7/2008 7:17:56 AM lentinus

Not Ranked
Joined on 09-04-2008
Posts 8
Re: SizeToFit per javascript
Thanks a lot for your quick response and assistant! Now all it works fine!
  
 Page 1 of 1 (5 items)
Karamasoft Support Forums » General Discussions » UltimateEditor » Re: SizeToFit per javascript

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2010 Karamasoft LLC. All rights reserved.