editor.fire command

5 posts, 0 answers
  1. vladimir
    vladimir avatar
    2 posts
    Member since:
    Oct 2008

    Posted 17 Oct 2008 Link to this post

    Hi,
    I am trying to add several custom buttons, but still have the problems with calling the editor.fire function. It works perfectly for some primitive functions like Bold, JustifyLeft etc. and it's well documented. But I spent a lot of time searching the proper syntax for setting the ForeColor property (the result was 

    Telerik.Web.UI.Editor.CommandList[

    "Blue"] = function(commandName, editor, args) { editor.fire("ForeColor", { value: "#2e2e6c" }); };

     

    Now I am in the same position when trying to fire the FlashManager dialog. While Telerik.Web.UI.Editor.CommandList["InsertPicture"] = function(commandName, editor, args) { editor.fire("ImageManager"); }; works well, the similar Telerik.Web.UI.Editor.CommandList["InsertFlash"] = function(commandName, editor, args) { editor.fire("FlashManager"); }; shows the error message "Dialog parameters for the FlashDialog doesn't exist". Could you tell me the proper syntax?

    And another question. Is it possible to hide the "EditModes" buttons at the bottom line (e.g. via css .rade_editorModesCell {display: none !important;}) and invoke the change of the EditMode by clicking my custom buttons (similar to calling javascript editor.fire function)?
  2. vladimir
    vladimir avatar
    2 posts
    Member since:
    Oct 2008

    Posted 17 Oct 2008 Link to this post

    Weird, don't know why, but works

    <telerik:EditorToolGroup>
          <telerik:EditorTool Name="myInsertFlash" Text="Insert flash" />
           <telerik:EditorTool Name="FlashManager" Text="Insert flash" Visible="false" />
        </telerik:EditorToolGroup>
  3. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 17 Oct 2008 Link to this post

    Hi,

    The editor renders only the tools that it needs on the page in order to minimize its HTML and JavaScript footprint. If the FlashManager tool is not added in the toolbar, then the editor will not render the additional scripts/parameters it needs to open the tool, so it will not be possible to call it with the .fire() method. After you have added the tool to the toolbar (even though it is visible="false"), it will be available on the client and you will be able to call it programmatically.

    About your second question - try using the set_mode() method to set the EditMode on the client: http://www.telerik.com/help/aspnet-ajax/editor_set_mode.html

    Regards,
    Lini
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. Steve Napurano
    Steve Napurano avatar
    40 posts
    Member since:
    Aug 2009

    Posted 04 Jun 2011 Link to this post

    broken link I NEED the answer to hiding the editmode toolbar on bottom all together.
    The radeditor is readonly on my page
  5. Rumen
    Admin
    Rumen avatar
    13804 posts

    Posted 07 Jun 2011 Link to this post

    Hi Steve Napurano,

    Here is the new link: http://www.telerik.com/help/aspnet-ajax/editor-set-mode.html

    All the best,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top