0

我开始使用用于 MVC 扩展的 DevExpress HtmlEditor,但绝对没有关于如何打开和保存文件的内容。我搜索了一下,发现需要先在工具栏上添加一个自定义按钮,然后编写相应的代码。由于我找不到 MVC 的任何好的示例,我想知道是否有人有关于如何执行这些任务的示例,从添加自定义按钮开始。相信我,我搜索过....

这是部分视图的代码

@Html.DevExpress().HtmlEditor(settings =>
{
    settings.Name = "HtmlEditor1";
    settings.CallbackRouteValues = new { Controller = "HtmlEditor", Action = "HtmlEditorPartial" };
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.ToolbarMode = HtmlEditorToolbarMode.Menu;
    settings.SettingsDialogs.InsertImageDialog.SettingsImageUpload.UploadCallbackRouteValues = new { Controller = "HtmlEditor", Action = "HtmlEditorPartialImageUpload" };
    settings.SettingsDialogs.InsertImageDialog.SettingsImageUpload.UploadFolder = HtmlEditorControllerHtmlEditor1Settings.ImageUploadDirectory;
    settings.SettingsDialogs.InsertImageDialog.SettingsImageUpload.ValidationSettings.Assign(HtmlEditorControllerHtmlEditor1Settings.ImageUploadValidationSettings);

    settings.SettingsDialogs.InsertImageDialog.SettingsImageSelector.Assign(HtmlEditorControllerHtmlEditor1Settings.ImageSelectorSettings);
}).GetHtml()
4

0 回答 0