+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Not able to add Flash files using generic content WYSIWYG editor

Not able to add Flash files using generic content WYSIWYG editor

9 posts, 0 answered
  1. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    28 Jun 2010
    Link to this post
    Hi,

    I am not able to add a flash file to a page using the generic contents WYSIWYG editor, the file was uploaded to the library module, but when I try to add the file using the flash icon on WYSIWYG editor, the file does not appear in the dialog box The website is in sitefinity 3.7 sp3 (recently upgraded from sitefinity 3.2). Is there a fix for this issue?

    Thanks,
    Annie
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    28 Jun 2010
    Link to this post
    Hi Annie,

    There is no built-in selector for the flash manager. The built in dialogs are for Links, Images, Documents.
    You need to create a custom dialog for video selection, generates the proper object tags through js and finally call pasteHtml method of the RadEditor control . Here is sample code that we use for ImageManager.

    Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = function(commandName, editor, args) {
         var editorArgs = editor.getSelectedElement();
         if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
             editorArgs = editor.getSelection();
     
         var myCallbackFunction = function(sender, args) {
             if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "IMG")
                 args.parentNode.replaceChild(editorArgs, args);
             else {
                 var cloned = args.cloneNode(true);
                 var div = args.ownerDocument.createElement("DIV");
                 div.appendChild(cloned);
                 editorArgs.pasteHtml(div.innerHTML);
             }
         }
         var path = '<%= ((Telerik.Cms.Web.CmsPageBase)Page).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx") %>';
         editor.showExternalDialog(
    path,
    editorArgs,
    750,
    515,
    myCallbackFunction,
    null,
    'ImageLibraryDialog',
    true,
    Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
    false,
    true)
     };


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    29 Jun 2010
    Link to this post
    Hi Ivan,

    Thanks for your reply, are you saying that there is no way of adding a flash file using the flash manager in the picture file that I have attached?

    Thanks,
    Annie
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Jun 2010
    Link to this post
    Hello Annie,

    I am not saying that there is no way. There is no built-in selector that will do this for you out of the box. You have to implement a custom one as suggested in the previous reply and the code I sent you illustrates how you can do this.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    29 Jun 2010
    Link to this post
    Hi Ivan,

    Thanks again for you reply, where would I add the custom code?

    Thanks,
    Annie
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Jun 2010
    Link to this post
    Hi Annie,

    In a control template where you want to use this manager. For instance you can observe the implementation of the template for Generic Content control. You can download the template from the external templates archive. The default location of the template is

    [External Templates Archive]\Sitefinity\Admin\ControlTemplates\Generic_Content\GenericContentDesigner.ascx

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    29 Jun 2010
    Link to this post
    Thank you
  8. Annie
    Annie avatar
    123 posts
    Registered:
    08 Apr 2009
    29 Jun 2010
    Link to this post
    Hi,

    Sorry I think I am little bit confused, in this forum post it is mentioned that http://www.sitefinity.com/devnet/forums/sitefinity-3-x/developing-with-sitefinity/add-swf-o0r-flash-video-in-the-pages.aspx, the generic content has a button for the flash manager that can be used to add .swf files, so is this not a built in functionality?


    Thanks,
    Annie
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Jun 2010
    Link to this post
    Hi Annie,

    RadEditor has built-in Flash Manager, but there is no wrapper that allows you to select files from Images and Documents module. You can select then only form the file system. Here is the description of the RadEditor's Flash Manager.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
9 posts, 0 answered