Newbie Question - Can you configure the toolbar?

Last post 02-08-2004, 5:31 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  02-03-2004, 5:59 PM 293

    Newbie Question - Can you configure the toolbar?

    That is, can you define which functionality appears in the toolbar?
    Stephen McCormack
    MWeb Solutions Pty Ltd
    http://www.mwebsolutions.com.au
  •  02-04-2004, 7:02 AM 299 in reply to 293

    Re: Newbie Question - Can you configure the toolbar?

    Yes, but it's not perfect. If you add new buttons you have very little control over where they appear as you can't use the TemplateItems string to configure. And then there's a bug such that if you use the WYSIWYG font/size drop downs as I wanted to then that can crimp your style.

     

    If you're just looking for the basics... no new buttons... then you should be able to configure however you want.

  •  02-05-2004, 10:36 AM 303 in reply to 299

    Re: Newbie Question - Can you configure the toolbar?

    i found the best way to configure the bar is to start with one of the preset configurations and then use the "DisableItemList" method

     

    but remove the buttons in order and you can then get rid of the sperator tags as well.... so for instance.... what i want available for doing Private Messages:

     

    Private Sub SetUpEditBox()
            EditBox.AutoConfigure = CuteEditor.AutoConfigure.Simple
            Dim UserDir As String = Server.MapPath("/images/users" & GetThisUsername())
            If system.IO.Directory.Exists(UserDir) Then
                EditBox.ImageGalleryPath = "/images/users" & GetThisUsername()
                EditBox.DisableItemList = "fontDropDown,sizeDropDown,Separator,JustifyLeft,JustifyCenter,JustifyRight,Separator,InsertOrderedList,InsertUnorderedList,Separator,Indent,Outdent,Separator,Separator,InsertTable,Help"
            Else
                EditBox.DisableItemList = "fontDropDown,sizeDropDown,Separator,JustifyLeft,JustifyCenter,JustifyRight,Separator,InsertOrderedList,InsertUnorderedList,Separator,Indent,Outdent,Separator,Separator,ImageGallery,InsertTable,Help"
            End If
            EditBox.ShowLogo = False
            EditBox.ShowHtmlMode = False
    End Sub

    So

  •  02-06-2004, 12:46 AM 309 in reply to 303

    Re: Newbie Question - Can you configure the toolbar?

    You can add buttons,separators and custom buttons programmaticly using the Add method the buttons are displayed in the same order as they are added:

     

    rtbIngress.toolbar.Add(rtbIngress.Cut);
        rtbIngress.toolbar.Add(rtbIngress.Copy);
        rtbIngress.toolbar.Add(rtbIngress.Paste);
        rtbIngress.toolbar.Add(rtbIngress.PasteText);
        rtbIngress.toolbar.Add(rtbIngress.PasteWord);
        rtbIngress.toolbar.Add(rtbIngress.Separator);
        rtbIngress.toolbar.Add(rtbIngress.Undo);
        rtbIngress.toolbar.Add(rtbIngress.Redo);
        rtbIngress.toolbar.Add(rtbIngress.Separator);
        rtbIngress.toolbar.Add(rtbIngress.AbsolutePosition);
        rtbIngress.toolbar.Add(rtbIngress.Char);
        rtbIngress.toolbar.Add(rtbIngress.InsertText);
        rtbIngress.toolbar.Add(rtbIngress.Separator);

     

    Regards,

    Thomas

  •  02-08-2004, 5:31 PM 325 in reply to 309

    Re: Newbie Question - Can you configure the toolbar?

    Create custom buttons make it more easier in version 2.2.

    Now you can register your own button and use it in the template property!.

     

    For adding a custom button one needs to follow two steps.

     

    Step1:  Register the button to the CuteEditor

     

    .

    <script runat="server">

    void Page_Load(object sender, System.EventArgs e)

    {

            //Integrate with NetSpell

            System.Web.UI.WebControls.Image SpellingImage = new System.Web.UI.WebControls.Image ();

            SpellingImage.ToolTip = "Check Spelling";

            SpellingImage.ImageUrl = "spell/Spelling.gif";

            SpellingImage.CssClass = "button";

           // The custom button ID can be any string identifier and it's used when defining the template

           SpellingImage.ID = "Spell";

           SpellingImage.Attributes.Add("onclick","checkSpellingById('Editor1_editBox')");

           SpellingImage.Attributes.Add("type","btn");

           

           // Register the button here

           Editor1.RegisterCustomButton(SpellingImage);

    }

    </script>


     

     

     

    Step2:  Use the custom button in your template property 

     

    <CE:Editor id="Editor1" runat="server" Template="Bold, Italic, Underline, Spell, Indent,Outdent," ></CE:Editor>



    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML