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

Forums / Developing with Sitefinity / The command LibraryImageManager is not implemented yet.

The command LibraryImageManager is not implemented yet.

8 posts, 1 answered
  1. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    12 Nov 2009
    Link to this post
    Hello,

    I am getting the following error when I go to add comments to a blog post (see attachment):
        
        The command LibraryImageManager is not implemented yet.

    I've coded to remove this error via my own user control, but how do I code for this when Sitefinity creates this page.  I am coding using C#.

    Thanks in Advance,

    -R
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Nov 2009
    Link to this post
    Hi Randy Bauer,

    The error comes from your control, not from a Sitefinity page. The error is thrown from the RadEditor you use. I think that we have already discussed this here.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    12 Nov 2009
    Link to this post
    Hello,

    I've got this working for my control that I put on my pages, but his page is created by Sitefinity.  It is the blog comments page.  How do I add this to that page that your application creates on the fly?

    Also, I am still getting the ')' expected error (same thread) when trying to code using VB vs. C#.  I was able to code my own user controls to add and update posts using C#, but not VB.

    Thanks,

    -R

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 Nov 2009
    Link to this post
    Hi Randy Bauer,

    This is not the default editor added from BlogPosts control because there is no buttons for Insert image or Insert documents. You need to map ListPagedetails template and follow the suggestion from my previous post. In your template there is no definition for LibraryImageManager and LibraryDocumentManager.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    13 Nov 2009
    Link to this post
    Hi Ivan,

    I'm trying, but what you are saying doesn't make sense.  I added a page called Blog within the CMS and added the blog module to it.  The insert image must be appearing because it is picking something up from my style sheet.  It only appears when I select "Formatting Options".  I'm not sure if this is the default for this setting, but it is appearing.

    Either way, I believe you are telling me to add your javaScript to the theme (Masterpage) for my site.  Is this correct? If yes, where do I put this code?  In the body?  Also, I still get the ')' expected error.

    I'm not sure what you mean by "You need to map ListPagedetails template".

    I really appreciate your help.  I'm getting closer to making this all work and need to demo it today.

    Thanks,

    Randy

  6. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    13 Nov 2009
    Link to this post
    Ivan,

    I copied your javaScript code to my masterpage and here is the error I get when I run the application.  Again, I am doing this is VB.  I know it shouldn't make a difference, but here is the screenshot.

    Randy
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Nov 2009
    Link to this post
    Hello Randy Bauer,

    Try using the code below:

    <telerik:RadEditor
            ID="RadEditor1"
            runat="server"
            ToolsFile="~/CustomControls/CustomPublicControl/ToolsFile.xml"
            EnableEmbeddedSkins="True"
            Skin="Default"
            DialogsCssFile ="~/CustomControls/CustomPublicControl/EditorDialogs.css"
            Height="200px"
            EditModes="Design,Html"
            Width="95%">
    </telerik:RadEditor>
     
    <script type="text/javascript">
        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);
                }
            }
            editor.showExternalDialog(
                                   '<%= CType(Page,Telerik.Cms.Web.CmsPageBase).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx") %>',
                                   editorArgs,
                                   750,
                                   600,
                                   myCallbackFunction,
                                   null,
                                   'ImageLibraryDialog',
                                   true,
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                                   false,
                                   true)
        };
     
        Telerik.Web.UI.Editor.CommandList["LibraryDocumentManager"] = 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 == "A")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
            }
            editor.showExternalDialog(
                                   '<%= CType(Page,Telerik.Cms.Web.CmsPageBase).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/DocumentEditorDialog.aspx") %>',
                                   editorArgs,
                                   750,
                                   600,
                                   myCallbackFunction,
                                   null,
                                   'ImageLibraryDialog',
                                   false,
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                                   false,
                                   true)
        };
     
        Telerik.Web.UI.Editor.CommandList["LinkManager"] = function(commandName, editor, args) {
            var editorArgs = editor.getSelectedElement();
            if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A") {
                var sel = editor.getSelection();
                editorArgs = sel;
                editorArgs.Html = sel.getHtml();
                editorArgs.Text = sel.getText();
            }
     
            var myCallbackFunction = function(sender, args) {
                if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
            }
            editor.showExternalDialog(
                                   '<%= CType(Page,Telerik.Cms.Web.CmsPageBase).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>',
                                   editorArgs,
                                   750,
                                   600,
                                   myCallbackFunction,
                                   null,
                                   'ImageLibraryDialog',
                                   false,
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                                   false,
                                   true)
        };
     
        Telerik.Web.UI.Editor.CommandList["SetLinkProperties"] = 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 == "A")
                    args.parentNode.replaceChild(editorArgs, args);
                else {
                    var cloned = args.cloneNode(true);
                    var div = args.ownerDocument.createElement("DIV");
                    div.appendChild(cloned);
                    editorArgs.pasteHtml(div.innerHTML);
                }
            }
            editor.showExternalDialog(
                                   '<%= CType(Page,Telerik.Cms.Web.CmsPageBase).ResolveCmsUrl("~/Sitefinity/UserControls/Dialogs/LinksDialog.aspx") %>',
                                   editorArgs,
                                   750,
                                   600,
                                   myCallbackFunction,
                                   null,
                                   'ImageLibraryDialog',
                                   false,
                                   Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                                   false,
                                   true)
        };
                                
    </script>

    The C# methods in the script above are converted to VB.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  8. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    16 Nov 2009
    Link to this post
    Ivan,

    Thank you, that was what I was looking for.  I will take time to review the code to see what changes you have made.  I converted everything to C# and currently testing the application.

    Thanks for your help,

    Randy
Register for webinar
8 posts, 1 answered