No way to submit content from editor or use as part of a form

5 views
Skip to first unread message

SamGoody

unread,
Nov 23, 2009, 2:17:07 PM11/23/09
to MooRTE
I recieved the following mail, which points out how the editor is
missing two very important features, rendering it virtually worthless.


1) No easy way to use a textarea as part of a form

2) No easy way to submit

These are serious issues, and will be dealt with over the next week (I
hope).

Please weigh in if you have this to be blocking adoption.

Here's the mail.

Hi Sam,

I found your MooRTE class today and have been working with it, great
job! I'm confused though on something and can't find anything in the
docs about it.

I want to have it replace a textarea element in a form, but am coming
up with a blank in how to do it. I've ended up just making it a <div>
element like in your samples, and am trying to extract the formatted
html from the class using the following command, and putting the
contents into my <textarea> box, on a keyup event for the <div>
element:

$('editor').moorte({
'buttons':'div.Toolbar:
[bold,italic,underline,strikethrough,Lists]'
});

$('editor').addEvent('keyup',function() {
$('editor').getElement('.MooRTE').retrieve
('fields').each(function(el) {
alert(MooRTE.Utilities.clean(el));
})
});

(In the case above I'm just alerting the clean html)

This actually works well as far as getting a clean html content from
the editor, but it is wiping the editor's toolbar out and is only able
to retrieve it once before the editor is broken. (I can still edit
with the editor, but the toolbar is gone, and the getElement returns
an error that 'fields' doesn't exist). I've poked through the source
code and am not real sure what's breaking it, because I'm not real
sure what you're doing with the $('washer') item, but my guess is that
my editor is getting cleaned which is resulting in it deleting the
menu bar as well as all the fields.

Any thoughts? Am I doing this completely wrong?

--

Jon Baker

SamGoody

unread,
Dec 25, 2009, 2:46:33 AM12/25/09
to MooRTE
Update:
The issue has been resolved as follows:

1. If the extended textarea is part of a form, the textarea is updated
automatically on submit.
Really simple and easy.
2. For textareas that are not part of a form, or RTE's that extend
other elements, a submit button has been added to the list of
available buttons.
This is also useful for those that wish to submit the content via
AJAX.

Some documentation has been added to the faq page, but more docs are
needed. Any of our readers willing to help?

The issue had been resolved and committed within the week, and all
downloads made using the download builder reflect the changes.
However they still haven't made their way into the pre-built
downloads.

We hope to have all of this ready ready with the release of v0.6 and
the placing of MooRTE on the forge, within the next few days (it has
been held up by bugs in the Depender class, as I've ranted about on
the blog (http://blog.siteroller.net))

Reply all
Reply to author
Forward
0 new messages