Announcement

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

#1 2007-08-01 09:29:18

NewBee123
New member
Registered: 2007-08-01
Posts: 1

How to open editor in new window and save to textarea

Hello,

Can someone tell me how I can open the editor in a new window and then save / parse the info to the textbox?

Thanks!

Offline

#2 2007-08-17 08:33:09

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: How to open editor in new window and save to textarea

I won't put the code for doing it here, but one way to do it is to create a page with xinha on it, this will be the contents of the popup window.  then use

Xinha.prependDomOEvent(Xinha._currentlyActiveEditor._textArea.form, 'submit', function () {
  editor = Xinha._currentlyActiveEditor;
  top.mytextarea.value = editor.outwardHtml(editor.getHTML());
});


this code should be inside script tags after the include for Xinha, this way when the form submits it will send it back to the parent. you will also want to attach a function to a link or button on the main page so that it opens up the popup window and sets the value of the textarea on that page to the value of the textarea on the mainpage

note: make sure that the textarea in the popup window is inside a form.


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#3 2008-12-26 15:22:39

jondolar
New member
Registered: 2008-12-26
Posts: 1

Re: How to open editor in new window and save to textarea

Has anybody had success doing this?  I'm not sure what code to put into the main file that passes the original data to the popup window and I'm not able to get the data from the popup window(xinha editor) back into the main textarea on the main window.

Any help in spelling this out for me would be helpful and much appreciated.

Thanks

Offline

Board footer

Powered by FluxBB