Пример #1
0
        public Editor(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
            : base(viewContext, initializer)
        {
            UrlGenerator = urlGenerator;

            DefaultToolGroup = new EditorToolGroup(this);

            Template = new HtmlTemplate();
            Messages = new EditorMessages();
            StyleSheets = new List<string>();
            Pdf = new PDFSettings();

            new EditorToolFactory(DefaultToolGroup)
                .Formatting()
                .Bold().Italic().Underline()
                .JustifyLeft().JustifyCenter().JustifyRight()
                .InsertUnorderedList().InsertOrderedList()
                .Outdent().Indent()
                .CreateLink().Unlink()
                .InsertImage()
                .TableEditing();

            TagName = "textarea";

            ImageBrowserSettings = new EditorImageBrowserSettings(Messages.ImageBrowserMessages);
            FileBrowserSettings = new EditorFileBrowserSettings(Messages.FileBrowserMessages);

            //>> Initialization

            Resizable = new EditorResizableSettings();

            Serialization = new EditorSerializationSettings();

            //<< Initialization
        }
 public EditorSerializationSettingsBuilder(EditorSerializationSettings settings)
 {
     container = settings;
 }