Added example.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Web.Mvc;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Editor(string fileName, string mode)
|
||||
{
|
||||
mode = mode ?? string.Empty;
|
||||
|
||||
var file = new FileModel
|
||||
{
|
||||
TypeDesktop = mode != "embedded",
|
||||
FileName = fileName
|
||||
};
|
||||
|
||||
return View("Editor", file);
|
||||
}
|
||||
|
||||
public ActionResult Sample(string fileExt)
|
||||
{
|
||||
var fileName = DocManagerHelper.CreateDemo(fileExt);
|
||||
Response.Redirect(Url.Action("Editor", "Home", new { fileName = fileName }));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user