Unknown error

18 views
Skip to first unread message

fusionstream

unread,
Dec 16, 2009, 2:52:29 AM12/16/09
to MooEditable
Hi there.

Say I want to extend the UI right?

Is this right?

because when I call this.dialogs.youtube.alert.open() from
MooEditable.UI.YoutubeDialog, I get a this.dialogs is undefined error.

MooEditable.Actions.extend({

youtube: {
title: 'Embed youtube video',
dialogs: {
alert: MooEditable.UI.AlertDialog.pass('That is not a valid
hyperlink.'),
prompt: function(editor){
return MooEditable.UI.YoutubeDialog(editor);
}
},
command: function(){
this.dialogs.youtube.prompt.open();
}
},

gvideos: {
title: 'Embed google video',
dialogs: {
alert: MooEditable.UI.AlertDialog.pass('That is not a valid
hyperlink.'),
prompt: function(editor){
return MooEditable.UI.GvideosDialog(editor);
}
},
command: function(){
this.dialogs.gvideos.prompt.open();
}
}

});

cheeaun

unread,
Dec 16, 2009, 3:14:12 AM12/16/09
to MooEditable
Try this:

youtube: {
title: 'Embed youtube video',
dialogs: {
youtube: MooEditable.UI.AlertDialog.pass('That is
not a valid
hyperlink.'),
prompt: function(editor){
return MooEditable.UI.YoutubeDialog
(editor);
}
},
command: function(){
this.dialogs.youtube.prompt.open();
}
},

gvideos: {
title: 'Embed google video',
dialogs: {
gvideos: MooEditable.UI.AlertDialog.pass('That is
not a valid
hyperlink.'),
prompt: function(editor){
return MooEditable.UI.GvideosDialog
(editor);
}
},
command: function(){
this.dialogs.gvideos.prompt.open();
}
}

It uses the key of the dialogs object. Sorry for not documenting this,
I'll do so in next few days/weeks.

Cheers.

[F]usion[S]tream - Gmail

unread,
Dec 28, 2009, 7:25:44 PM12/28/09
to mooed...@googlegroups.com
Oh wow.

I totally didn't see this message. So sorry for the late reply and Merry
Christmas and Season's Greetings and what not... =)

Ok. I have changed the ...dialogs: { alert:... to ...dialogs: { youtube:

How would I go about calling the alert then?

You see, the funny thing is... I had it working before and am pretty
sure that I used alert:.... I decided to test out a few functions in a
forked version of this but found it had quite a number of issues for my
implementation so I reverted back to this main fork. And now it doesn't
work. Weird.

> --
>
> You received this message because you are subscribed to the Google Groups "MooEditable" group.
> To post to this group, send email to mooed...@googlegroups.com.
> To unsubscribe from this group, send email to mooeditable...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mooeditable?hl=en.
>
>
>
>

cheeaun

unread,
Dec 28, 2009, 8:52:21 PM12/28/09
to MooEditable
Yikes sorry, my code in my previous reply is actually wrong (somehow
messed up).

Your original code should work fine though. Could you hook up a demo/
test page?

Also, Merry Xmas :)

On Dec 29, 8:25 am, "[F]usion[S]tream - Gmail"

.:: [F]usion[S]tream ::. -- online

unread,
Dec 28, 2009, 10:37:30 PM12/28/09
to mooed...@googlegroups.com
possible for you to create a live account on the forum I run and test the fishingkakiV3 template there?

Or do you want a live demo.

http://www.fishingkaki.com/forum and when creating a new template, choose fishingkakiV3 as your template. Create a new topic in test section.

Or I could create a dedicated demo. =)
--
Cheers,
BlueStream

-------------------------------------------------------------
"ditto." - Anon

.:: [F]usion[S]tream ::. -- online

unread,
Dec 28, 2009, 10:45:23 PM12/28/09
to mooed...@googlegroups.com
ok.. try here....
http://fusionstream.org/a.html

ignore the bad layout as it's mostly cut and paste.. the first two buttons are youtube and gvideos respectively...

enter a valid youtube/gvideo address into the dialog and the code will appear, failing that nothing will happen... (it should actually popup an alert)

code reverted back to original for comparison

cheeaun

unread,
Jan 1, 2010, 9:44:02 PM1/1/10
to MooEditable
Hey, sorry for this late reply.

I think I know where the problem is. I see that you have
'this.dialogs.youtube.alert.open();' inside the onClick function,
where 'this' actually refers to the 'Dialog' instead of 'MooEditable'
instance.

For now, what you can do is to pass a function into the Dialog
function and call it like this:
http://github.com/cheeaun/mooeditable/blob/master/Source/MooEditable/MooEditable.js#L1213

.. and you could access the MooEditable instance as 'editor' over
here:
http://github.com/cheeaun/mooeditable/blob/master/Source/MooEditable/MooEditable.js#L1362

Cheers.

On Dec 29 2009, 11:45 am, ".:: [F]usion[S]tream ::. -- online"
<fusionstr...@gmail.com> wrote:
> ok.. try here....http://fusionstream.org/a.html


>
> ignore the bad layout as it's mostly cut and paste.. the first two buttons
> are youtube and gvideos respectively...
>
> enter a valid youtube/gvideo address into the dialog and the code will
> appear, failing that nothing will happen... (it should actually popup an
> alert)
>
> code reverted back to original for comparison
>
> On Tue, Dec 29, 2009 at 11:37 AM, .:: [F]usion[S]tream ::. -- online <
>
>
>
> fusionstr...@gmail.com> wrote:
> > possible for you to create a live account on the forum I run and test the
> > fishingkakiV3 template there?
>
> > Or do you want a live demo.
>

> >http://www.fishingkaki.com/forumand when creating a new template, choose
> > fishingkaki*V3* as your template. Create a new topic in test section.


>
> > Or I could create a dedicated demo. =)
>

> >> mooeditable...@googlegroups.com<mooeditable%2Bunsu...@googlegroups.com>


> >> .
> >> > > For more options, visit this group athttp://
> >> groups.google.com/group/mooeditable?hl=en.
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups
> >> "MooEditable" group.
> >> To post to this group, send email to mooed...@googlegroups.com.
> >> To unsubscribe from this group, send email to

> >> mooeditable...@googlegroups.com<mooeditable%2Bunsu...@googlegroups.com>

.:: [F]usion[S]tream ::. -- online

unread,
Jan 4, 2010, 12:50:33 AM1/4/10
to mooed...@googlegroups.com
I knew it was the wrong context! Just had no idea what context it was in.

Have solved it by replacing this with editor i.e. solution number 2!

Thanks a bunch! =D

Happy New Year.

pre.s. The "// Remove useless BRs" portion ends up removing multiple consecuvite BRs. In my situation (which is fairly common), Ps are not allowed so we have to rely on BRs which is what forces the problem to present... Solution is simply to comment this line out.

Cheers,
Shawn!


To unsubscribe from this group, send email to mooeditable...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/mooeditable?hl=en.


.:: [F]usion[S]tream ::. -- online

unread,
Jan 13, 2010, 11:53:32 PM1/13/10
to MooEditable
Hello again.

I have another question.

How do I enable a cleanup on first load?

This code block:

        // Build the content of iframe
        var docHTML = this.options.html.substitute({
            BASECSS: this.options.baseCSS,
            EXTRACSS: this.options.extraCSS,
            EXTERNALCSS: (this.options.externalCSS) ? '<link rel="stylesheet" href="' + this.options.externalCSS + '">': '',
            CONTENT: this.cleanup(this.textarea.get('value'))
        });

seems to be about right but the contents are not cleaned-up unless I toggleview.

.:: [F]usion[S]tream ::. -- online

unread,
Jan 14, 2010, 12:11:03 AM1/14/10
to MooEditable
Tests on this suggest that the content is indeed cleaned-up and it is displayed in the mooeditable iframe for a split second but the issue is it will then revert to the original source immediately.

cheeaun

unread,
Jan 14, 2010, 6:40:12 AM1/14/10
to MooEditable
Do you have a test page?

On Jan 14, 1:11 pm, ".:: [F]usion[S]tream ::. -- online"

.:: [F]usion[S]tream ::. -- online

unread,
Jan 17, 2010, 11:21:39 PM1/17/10
to mooed...@googlegroups.com
I am unable to provide a test page in this instance unless you would consider my live example.

The stop-gap solution here is to modify the original textarea before initing mooeditable.

--
You received this message because you are subscribed to the Google Groups "MooEditable" group.
To post to this group, send email to mooed...@googlegroups.com.
To unsubscribe from this group, send email to mooeditable...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mooeditable?hl=en.



Reply all
Reply to author
Forward
0 new messages