Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2010-05-20 04:38:30

tommi
Xinha Community Member
Registered: 2010-05-20
Posts: 10

Xinha as popupeditor on page load

Hi,

i'm new to xinha and i want to use it in a kind of groupware as an online email-editor.
To get the optimal editor-size for any users need i think it would be best placed in an own frame and then using the popupeditor function. This would handle e.g. a window resize without any additional work.
Is it possible to start the editor as full-frame popupeditor when the page loads without clicking the toolbars icon for popupeditor (even when i do dot display that special toolbar icon at all)

thanks for any help

tommi

Offline

#2 2010-05-20 20:54:48

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Xinha as popupeditor on page load

It is not configurable as such, but I'm sure you could modify it thusly without much difficulty.  The function to trigger the full screen mode is <yorueditorobjecthere>._fullScreen() so it's just a matter of hitting that at the right time.


James Sleeman

Offline

#3 2010-05-21 08:05:11

tommi
Xinha Community Member
Registered: 2010-05-20
Posts: 10

Re: Xinha as popupeditor on page load

Thanks you.
I had a look at the _fullScreen() function before but i still do not know, where/how to call it.
If i make am <a> tag like:
<a href="javascript:xinha_editors.sendmail._fullScreen();">Fullscreen</a>
it works very well, but when i add the same call to the end of the page that shows xinha llike:
<script type="text/javascript">
  xinha_editors.sendmail._fullScreen();
</script>
it does not work. The error message tells me "xinha_editors is null".

I also tried the end of the config.js file within the xinha_init function like:
  Xinha.startEditors(xinha_editors);
  xinha_editors.sendmail._fullScreen();
But then i get the error message "xinha_editors.sendmail._fullScreen is not a function".

What have i done wrong and how can i make it better?

Offline

#4 2010-05-21 08:22:29

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Xinha as popupeditor on page load

You need to execute it when Xinha is ready, not before.

Look into XinhaCore.js and find onGenerate, you should be able to hook in there somewhere.


James Sleeman

Offline

#5 2010-05-25 12:02:01

tommi
Xinha Community Member
Registered: 2010-05-20
Posts: 10

Re: Xinha as popupeditor on page load

searching for "onGenerate" i found the code "if ( this.config.fullScreen )" so it was pretty easy at last:
I just had to add the line "myeditor.config.fullScreen = true;" to config.js and now its working,

Thank you for your patience.

Offline

Board footer

Powered by FluxBB