Closed (fixed)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 May 2008 at 20:12 UTC
Updated:
7 Jul 2009 at 19:42 UTC
I would like Fckeditor to embed FLV and Youtube and Google.video links correctly like livejournal.com does.
Comments
Comment #1
jessicakoh commentedYou can use CCK Video Module. It allows many video types like google, youtube, meta, etc.
Comment #2
Jorrit commentedThis would be something that would need to be done at the level of FCKeditor, not the module. Please contact the FCKeditor developers at www.fckeditor.com for this.
Comment #3
MGParisi commentedSorry to open this up again, but I have a solution which I can not implement due to lack of time and a complete lack of knowledge of regular expressions. If I knew regular expressions I would make this. What needs to be done is take this module " http://drupal.org/project/embedfilter " and modify it... this filter ensures abuse is not being done by the embedded code. However, FCKEditor will convert the embedded code into HTML. So what you want to do is to recognize if this embedded encoded HTML exists, that it meets the requirements of the filter, then converts it BACK into HTML. Then runs the check to see if the embedded code is safe!
http://drupal.org/project/embedfilter
I hope this makes sense! BTW, doing this would ensure embeded code could be inputed into any WYSIWYG editor!
Comment #4
MGParisi commentedturns out html purifier allows youtube to be inserted, but to insert it through fckeditor I think you need to unparse their html encoding of our and
statements!
Comment #5
Jorrit commentedWhat exactly do you want to achieve? Embedded code is HTML, so what do you mean by "convert the embedded code into HTML"
Comment #6
MGParisi commentedThere is not allot of solutions, one is that FCKEditor has a You Tube button add-on (which is nice). However it wont work with the default HTML filter securely because Embed and Param code has to come from a trusted source. Even external images can be used to track your user statistics. So the default HTML editor has some disadvantages. However it is excellent and very secure, but limited filter.
However there is another add-on called htmlpurifier. Its a Drupal GNU wrapper for the htmlpurifier project. That project accepts full HTML and removes all possible security issues (such as XSLT). It has its benefits and subtracts. Its a robust program that prevents abuse. It is much more complicated in its filtering. As you can imagine Its a big application. I would ask CHK for more info, since he wrote the original HTMLFilter default to Drupal. You can also google HTMLPurifier and get lots of info on it.
Now to use the embed and Param tags you got to trust your source. So HTML-profile has an option to accept embeds that point to you tube. They are suppose to have plug ins for others, I have not looked.
Now if I use the FCKEditor "You Tube pliugin", it meshes well with everything else. It takes the flash button and makes it simpler more user friendly. GREAT OPTION! Except some users dont use FCKEditor, and may not see the button. In addition Myspace, Facebook and others have gotten users use to publishing Embed tags right into the text editor.
So here is the last issue... I want my users to take the embed code and copy it right into the editor! Now FCKEditor and all WYSIWYG editors, in all its wisdom will take all Text placed inside the Editor window and turn it into HTML. So our HTML embed and param tags get turned into >embed> and >param>! This of course will not run a video on display but show the user and
!
My proposal was to reverse this process on the filter level, and then later on in the process run the code through HTMLPurifier! Thus people can post youtube video in ANY WYSIWYG editor! They can ALSO just cut and paste the embed code right into the FCKEditor.
I believe this will work, and I trust in HTML Purifier. It is now a refined product with allot of experience! So I believe the tools are there for more flexible WYSIWYG editors that will allow you to mix code + WYSIWYG features using such an approach (combinding WYSIWIG with a selective HTML De-encoder). Just imagine Filtered HTML that works BACK WORDS!
I hope this clears it up! I need to write a document how-too on how to incorporate embeds safely in your project using FCK's you tube add on.
Comment #7
wwalc commented@MGParisi: you can always tell users to paste code in the Source mode, where HTML code is not converted into entities.
Anyway, it should be relatively easy to write a plugin for FCKeditor, where users would be allowed to paste plain HTML code... you can even try extending youtube plugin - add another tab where users could simply paste the HTML code instead of a link to a movie.
Comment #8
MGParisi commentedI do find your solution to be the best solution, and the (changed do to brain fart) You Tube module basically does that, but they check to make sure its from amazon. There is no features yet to add to the list of supported embed types:( BTW the filter is in HTML Purifier, not in FCKEditor:(
Comment #9
Jorrit commentedClosed because of inactivity. If it is still a problem, please reopen.