Problem with embeding flash objects in django-grappelli TinyMCE

219 views
Skip to first unread message

Michał Oleniec

unread,
Jul 9, 2010, 4:44:43 PM7/9/10
to Django Grappelli
Hello,

Maybe someone could confirm the same problem in your installation of
django-grappelli.

When I try to edit html in TinyMCE an embed flash object (custom or
for example embed code from youtube) and click Insert I get flash
yellow box in preview but if I try to edit html again the whole OBJECT
markup dissapear (also when I try to save the form).

With TinyMCE media plugin turned off in TinyMCE setup the problem
disappears I can add objects manually in html and save flash object
markups. But it's not the way that it should work I guess (missing
media plugin).

I would consider it rather TinyMCE bug especially by amount of google
results on embeding flash objects problem but it seems that this
problem is not present in TinyMCE examples.

http://tinymce.moxiecode.com/examples/full.php

If someone could confirm the same behaviour. Is it a bug or maybe
there's something wrong with my configuration. I'm using grappelli 2.1
(r1079), MacOS X Leopard (checked in Safari, Firefox, Chrome - newest
versions)

Hope that's clear for you.

ivankin

unread,
Jul 22, 2010, 3:10:28 AM7/22/10
to Django Grappelli
Same problem!... Have you found a solution?

Alvaro

unread,
Aug 1, 2010, 7:27:37 PM8/1/10
to Django Grappelli
Same issue for me


I can get rid of it if I disable the Tinymce cleanup code option in
the tinymce_setup/tinymce_setup.js file ( cleanup: false inside
tinyMCE.init )
But then every TinyMce area gets filled with empty paragraphs and this
is anoying in required fields.

I'm investigating in this direction, but no luck (yet):

http://syedgakbar.wordpress.com/2008/01/28/adding-flash-embed-support-in-tinymce-editor/


Regards

On 22 jul, 09:10, ivankin <lukyanets.i...@gmail.com> wrote:
> Same problem!... Have you found a solution?
>
> On 10 июл, 02:44, Michał Oleniec <m.olen...@gmail.com> wrote:
>
> > Hello,
>
> > Maybe someone could confirm the same problem in your installation of
> > django-grappelli.
>
> > When I try to edit html in TinyMCE anembedflash object (custom or
> > for exampleembedcode from youtube) and click Insert I get flash

Klemens Mantzos

unread,
Aug 2, 2010, 6:08:41 AM8/2/10
to django-g...@googlegroups.com
On Mon, Aug 2, 2010 at 01:27, Alvaro <manos...@gmail.com> wrote:
> Same issue for me
>
>
> I can get rid of it if I disable the Tinymce cleanup code option in
> the tinymce_setup/tinymce_setup.js file (  cleanup: false inside
> tinyMCE.init )
sounds to me like you need to add <embed>/<object> tags to the valid
tags in the tinymce_setup.js

should work without the empty paragraphs issue.

--
klemens mantzos
http://fetzig.at/

Alvaro Gomez

unread,
Aug 3, 2010, 4:11:35 AM8/3/10
to django-g...@googlegroups.com
I included it so far, but it does not work. object was included by default so I added the embed tag at the end, but is ignored. Mybe I'm not using the right syntax.

 extended_valid_elements: [
         'a[name|class|href|target|title|onclick]',
         'img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]',
         'br[clearfix]',
         '-p[class<clearfix?summary?code]',
         'h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]',
         'ul[class<clearfix],ol[class<clearfix]',
         'div[class]',
         'object[align<bottom?left?middle?right?top|archive|border|class|classid'
           + "|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name"
           + "|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
           + "|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap"
           + "|vspace|width]",
         'param[id|name|type|value|valuetype<DATA?OBJECT?REF]',
         'address',
         'embed[src|type|width|height|flashvars|wmode]'



2010/8/2 Klemens Mantzos <klemens...@gmail.com>



--
Alvaro
www.dorsalcero.net

Cody Django

unread,
Sep 12, 2010, 12:34:43 AM9/12/10
to Django Grappelli
No solution, hey?

I'm also struggling with this.

the media plugin/button is active in the stock grappelli
tinymce_setup.js, but we still need to go in to add valid embed tags?

Every modification I've done causes it to break.

Clarification please?




On Aug 3, 1:11 am, Alvaro Gomez <manosuc...@gmail.com> wrote:
> I included it so far, but it does not work. object was included by default
> so I added the embed tag at the end, but is ignored. Mybe I'm not using the
> right syntax.
>
>  extended_valid_elements: [
>          'a[name|class|href|target|title|onclick]',
>
> 'img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]',
>          'br[clearfix]',
>          '-p[class<clearfix?summary?code]',
>          'h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]',
>          'ul[class<clearfix],ol[class<clearfix]',
>          'div[class]',
>
> 'object[align<bottom?left?middle?right?top|archive|border|class|classid'
>            +
> "|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name"
>            +
> "|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
>            +
> "|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap"
>            + "|vspace|width]",
>          'param[id|name|type|value|valuetype<DATA?OBJECT?REF]',
>          'address',
>          'embed[src|type|width|height|flashvars|wmode]'
>
> 2010/8/2 Klemens Mantzos <klemens.mant...@gmail.com>
>
>
>
> > On Mon, Aug 2, 2010 at 01:27, Alvaro <manosuc...@gmail.com> wrote:
> > > Same issue for me
>
> > > I can get rid of it if I disable the Tinymce cleanup code option in
> > > the tinymce_setup/tinymce_setup.js file (  cleanup: false inside
> > > tinyMCE.init )
> > sounds to me like you need to add <embed>/<object> tags to the valid
> > tags in the tinymce_setup.js
>
> > should work without the empty paragraphs issue.
>
> > > But then every TinyMce area gets filled with empty paragraphs and this
> > > is anoying in required fields.
>
> > > I'm investigating in this direction, but no luck (yet):
>
> >http://syedgakbar.wordpress.com/2008/01/28/adding-flash-embed-support...

Cody Django

unread,
Sep 13, 2010, 5:55:11 AM9/13/10
to Django Grappelli
I've also noticed the same media button is prominent in the mezzanine
project, yet also seems to fail in the mezzanine demo. That is, the
media is not actually embedded, and rather results in an empty
paragraph.

http://mezzanine.jupo.org/

Cody

patrickk

unread,
Sep 13, 2010, 11:48:02 AM9/13/10
to Django Grappelli
mezzanine is obviously on a previous grappelli-version.

can someone confirm that this issue is related to grappelli (meaning
it works with tinymce when grappelli is not installed)?

regards,
patrick

Cody Django

unread,
Sep 13, 2010, 5:32:07 PM9/13/10
to Django Grappelli
I can confirm that; I used tinymce with the stock django admin for
media embeds, I switched to grappelli, and the media embeds are no
longer functional. I've since tried different versions of grappelli -
both 2.0 and trunk.

Cody

patrickk

unread,
Sep 13, 2010, 5:55:25 PM9/13/10
to Django Grappelli
@cody: with the same tinymce-setup?

regards,
patrick

Cody Django

unread,
Sep 13, 2010, 10:52:13 PM9/13/10
to django-grappelli
with various tinymce_setup.js, including the stock file for each version of grappelli as well as a lightly modified version of my own.

Are you saying that it works for you?  Can anyone confirm that they have it functioning properly?

Cody

Cody Django

unread,
Sep 15, 2010, 4:38:33 AM9/15/10
to Django Grappelli
Figured it out. My issue was actually an issue with firefox and the
ff requirement of an embed tag.

The embed element needs to be added to the list of valid elements, and
media_strict option needs to be set to false in tinymce init.

http://codydjango.com/post/grappelli-20-tinymce-flash-media-object-and-firefo/


On Sep 13, 7:52 pm, Cody Django <codydja...@gmail.com> wrote:
> with various tinymce_setup.js, including the stock file for each version of
> grappelli as well as a lightly modified version of my own.
>
> Are you saying that it works for you?  Can anyone confirm that they have it
> functioning properly?
>
> Cody
>

patrickk

unread,
Sep 15, 2010, 11:21:06 AM9/15/10
to Django Grappelli
should work with r1143+. there´s been a minor bug with the media-
plugin.

regards,
patrick


On 15 Sep., 10:38, Cody Django <codydja...@gmail.com> wrote:
> Figured it out.  My issue was actually an issue with firefox and the
> ff requirement of an embed tag.
>
> The embed element needs to be added to the list of valid elements, and
> media_strict option needs to be set to false in tinymce init.
>
> http://codydjango.com/post/grappelli-20-tinymce-flash-media-object-an...

Michał Oleniec

unread,
Sep 14, 2010, 5:35:18 AM9/14/10
to django-g...@googlegroups.com
It's been a long since I started this thread. And as I see some people got same problems out of grappelli like here for example: http://forum.joomla.org/viewtopic.php?t=217293

I haven't got the time to look into this problem too much. My solution to insert flash objects on site was to turn off media plugin and remove all valid_elements settings from tinymce_setup.js. Person which add content does it straight in html popup editor. And those objects are visible from edit area. Maybe it will work in someone else's setting.

2010/9/13 Cody Django <codyd...@gmail.com>
Reply all
Reply to author
Forward
0 new messages