Opened 18 years ago
Closed 14 years ago
#382 closed Bug (worksforme)
Extra <p> using embeds in Firefox
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Firefox | Cc: | slurms@…, macadames@…, Riceball LEE |
Description
Switch to source mode and paste
<p><embed width="200" height="100" menu="true" loop="true" play="true" src="test.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></p>
Switch to WYSIWYG and back to Source and there's an extra <p> </p> at the beggining and at the end.
present in Firefox 2.0.3.
IE 6 and Opera work properly.
Attachments (2)
Change History (22)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
I noticed this as well. Although it only seems to happen in firefox
Moved from SF. Original poster: slurms
comment:3 Changed 18 years ago by
Cc: | slurms@… macadames@… added |
---|
https://sourceforge.net/tracker/index.php?func=detail&aid=1657306&group_id=75348&atid=543653 has been marked as dup.
comment:4 follow-up: 5 Changed 18 years ago by
It seems to happen in IE as well and not only for <embed> tags but many others such as <image> <span> etc to name a few.
Is there a quick work around for this?
comment:5 Changed 18 years ago by
Replying to silver09:
It seems to happen in IE as well and not only for <embed> tags but many others such as <image> <span> etc to name a few.
Is there a quick work around for this?
Do you really have the problem that new sets of <p> </p> appear at the start and the end of the contents?
Or is just that the elements are moved into a block container? (p in this case according to the setting in fckconfig.js for the EnterMode)
comment:6 Changed 18 years ago by
Thanks for that. It's the EnterMode setting.
I propose that maybe it could be different settings. One being a config for enter mode and the other being a config for moving elements into a block container.
comment:7 follow-up: 8 Changed 18 years ago by
As in #350, the problem is that <embed> is an inline element in IE, while in Firefox it is a block element. This is at least the impression I have by navigating to Firefox's DOM after loading that HTML. The <embed> is thrown out of <p>.
Should we take the same approach and make <embed> a <block> element?
comment:8 Changed 18 years ago by
Replying to fredck:
As in #350, the problem is that <embed> is an inline element in IE, while in Firefox it is a block element. This is at least the impression I have by navigating to Firefox's DOM after loading that HTML. The <embed> is thrown out of <p>.
Should we take the same approach and make <embed> a <block> element?
I've tried and it doesn't work. As soon as the content is loaded the innerHtml of the body is:
<p /> <embed ... /> <p />
So I think that the solution would be something like it's done for HR in IE, but I've tried to do it and can't get the embeds in the documentProcessor with getElementsByTagName although in a simple test page works correctly and also with getElementsByTagNameNS
comment:9 Changed 18 years ago by
the simplest workaround is that change the FCKConfig.EnterMode to "br" in your editor config file.
the complex fixed bug way is rewrite the Flash plugin, hacked into the FCKConfig.ProtectedSource.Protect and FCKConfig.ProtectedSource.Revert to protected the embed element.
I have writen a Media plugin to do so, wraps the object and embed element, supports the windows media, real media, quick time, flash and shockwave. only left thing to do is that how to show the parameters of all kinds of media. the parameters class is done.
if anybody needs, i would glad to share it.
comment:10 Changed 18 years ago by
riceball, your proposal seams interesting, and it would be the way to go. Feel free to attach your code to this ticket if you have something complete and working. Thanks!
comment:11 Changed 18 years ago by
Hi riceball,
I've tried integrating your plugin into our SVN code, but then I get the error "cFckMediaElementName is not defined" when I load the editor.
Your code looks very interesting though. If I'm not mistaken, it can be used to insert .rmvb, .wmv, .mov files in addition to just .swf. The aspect oriented programming trick in the Inject() function is cool. I feel it can be a really nice addition to FCKeditor if it can be made to work.
comment:12 Changed 18 years ago by
Hi Martin, I've tested the plugin and the problem (at least for me) is that it expects the plugin to be in the default directory. I've uploaded a version that is able to work even if it's placed in other locations.
comment:13 Changed 18 years ago by
enh, yes, I uses the path FCKConfig.PluginsPath+ 'media/'. so the include file won't work if you change the directory name. thanks alfonsoml, I've changed it to FCK.Plugins.ItemsMedia?.Path.
the media player parameters is done. the media plugin is fined.
known bugs:
- [design view]the drag to resize media do not work in Firefox.
Changed 18 years ago by
Attachment: | mediaPlugin.zip added |
---|
the media parameters are done. use the new inject(AOP) architecture to hack! more security now.
comment:14 Changed 18 years ago by
here is the my MediaBroser and MediaUpload configs:
FCKConfig.MediaBrowser = true ; FCKConfig.MediaBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Media&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ; FCKConfig.MediaBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; 70% ; FCKConfig.MediaBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; 70% ;
FCKConfig.MediaUpload = true ; FCKConfig.MediaUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Media' ; FCKConfig.MediaUploadAllowedExtensions = ".(swf|fla|flv|wmv|mpg|mpeg|avi|qt|rm|rmvb|jpg|gif|jpeg|png)$" ; empty for all FCKConfig.MediaUploadDeniedExtensions = "" ; empty for no one
comment:15 Changed 18 years ago by
riceball, before we attempt to use your nice contribution, I need you to electronically sign our CLA. Please contact me if you have any doubt regarding it. Thanks again.
comment:16 follow-up: 17 Changed 18 years ago by
ok, no problem. I've signed. Could u give me a write permission on SVN to maintain the media plugin?
comment:17 Changed 18 years ago by
Cc: | Riceball LEE added |
---|
Replying to riceball:
ok, no problem. I've signed. Could u give me a write permission on SVN to maintain the media plugin?
Thanks riceball. Let's see now how will the integration proceed (there is a chance that we'll no use your code though). If we include it in the trunk, I'll be happy to invite you to help maintaining it. I'm CCing you to be sure you will get notifications on changes in this ticket.
comment:18 Changed 17 years ago by
Persistent problem noticed even in IE7 and Safari, and other browsers that extra unwanted <p> get inserted around editor text when you switch back and forth between source view and WYSIWYG mode.
comment:19 Changed 16 years ago by
I hope this is the best place to ask (I couldn't seem to find anywhere better, but please feel free to redirect me if there is...)
I'm really keen to use this plugin, but can't get it to work properly. The button appears on my toolbar, and the dialogue box appears if I click the button.
However, all the OPTIONs in the SELECT menu are blank (in IE7) or "undefined" (in FF3). And Firefox's error console says:
Error: GetE is not defined Source File: http://www.mydomain.com/drupal/sites/all/modules/fckeditor/plugins/Media/js/fck_media.js Line: 245 Error: GetE is not defined Source File: http://www.mydomain.com/drupal/sites/all/modules/fckeditor/plugins/Media/js/fck_media.js Line: 364
Can anyone tell what's wrong?
Thanks,
Robb
comment:20 Changed 14 years ago by
Resolution: | → worksforme |
---|---|
Status: | confirmed → closed |
Hi Fred,
After a flash insertion, and multiple switch between "source" and "wysiwyg" mode, some unwanted lines like this have been added before and after the embed tag:
<p> </p>
Bye
Jean-mat -- Moved from SF. Original poster: Jean-mat Grimaldi - Ingeniweb - macadames