2

How to add a HTML editor, to add images, format and for adding videos to the message that I am going to send. Is there any free tool that I can use. And How should I store the images and videos in the database. Consider user is uploading the images and video from his computer.

2 Answers 2

1

http://ckeditor.com/

Get it From here. i have used this. Read instruction for further information. There will be a dll and a fckeditor like folder that you should add in your project. and then jst add reference to your page as you do for any ascx control. then just put tag prefix an tag name similarly.. :)

Sign up to request clarification or add additional context in comments.

1 Comment

I want to use it for commercial purpose, is the ckeditor licensed
1

At first take a class name CustomEditor.cs

using AjaxControlToolkit.HTMLEditor;
namespace MyControls
{
    public class CustomEditor : Editor
    {
        protected override void FillTopToolbar()
        {
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Bold());
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Italic());
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.BackColorSelector());
            AjaxControlToolkit.HTMLEditor.ToolbarButton.FontName fontName = new AjaxControlToolkit.HTMLEditor.ToolbarButton.FontName();
            TopToolbar.Buttons.Add(fontName);
            options = fontName.Options;
            option = new AjaxControlToolkit.HTMLEditor.ToolbarButton.SelectOption();
            option.Value = "arial,helvetica,sans-serif";
            option.Text = "Arial";
            options.Add(option);
            AjaxControlToolkit.HTMLEditor.ToolbarButton.FontSize fontSize = new AjaxControlToolkit.HTMLEditor.ToolbarButton.FontSize();
            TopToolbar.Buttons.Add(fontSize);
            options = fontSize.Options;
            option = new AjaxControlToolkit.HTMLEditor.ToolbarButton.SelectOption();
            option.Value = "8pt";
            option.Text = "1 ( 8 pt)";
            options.Add(option);
           }
        protected override void FillBottomToolbar()
        {
            BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.DesignMode());
        }
        public AjaxControlToolkit.HTMLEditor.ToolbarButton.SelectOption option { get; set; }
        public System.Collections.ObjectModel.Collection<AjaxControlToolkit.HTMLEditor.ToolbarButton.SelectOption> options { get; set; }
    }
}

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>
<%@ Register namespace="MyControls" tagprefix="custom" %> <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager> <custom:CustomEditor ID="CustomEditor1" 
        Width="450px"  
        Height="200px"
        runat="server" />

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.