mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Bringing TinyMce back to life
--HG-- branch : dev
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\TinyMceTextEditor.ascx" />
|
||||
<None Include="Views\EditorTemplates\TinyMceTextEditor.cshtml" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -1,23 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<% Html.RegisterScript("tiny_mce.js"); %>
|
||||
<%: Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" }) %><%
|
||||
using (this.Capture("end-of-page-scripts")) {%>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme: "advanced",
|
||||
mode: "specific_textareas",
|
||||
editor_selector: "html",
|
||||
plugins: "fullscreen,autoresize,searchreplace,addmedia",
|
||||
theme_advanced_toolbar_location: "top",
|
||||
theme_advanced_toolbar_align: "left",
|
||||
theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,image,addmedia,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
|
||||
theme_advanced_buttons2: "",
|
||||
theme_advanced_buttons3: "",
|
||||
convert_urls: false,
|
||||
addmedia_action: "<%: Url.Action("AddFromClient", "Admin", new {area = "Orchard.Media"}) %>",
|
||||
addmedia_path: "<%: Model.AddMediaPath %>",
|
||||
request_verification_token: "<%: Html.AntiForgeryTokenValueOrchard() %>"
|
||||
});
|
||||
</script><%
|
||||
}%>
|
@@ -0,0 +1,27 @@
|
||||
@model Orchard.Core.Common.ViewModels.BodyEditorViewModel
|
||||
@{
|
||||
using(Capture(script => WorkContext.Page.Head.Add(script))) {
|
||||
<script type="text/javascript" src="@Href("~/Modules/TinyMce/Scripts/tiny_mce.js")"></script>
|
||||
}
|
||||
using(Capture(script => WorkContext.Page.Tail.Add(script))) {
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme: "advanced",
|
||||
mode: "specific_textareas",
|
||||
editor_selector: "html",
|
||||
plugins: "fullscreen,autoresize,searchreplace,addmedia",
|
||||
theme_advanced_toolbar_location: "top",
|
||||
theme_advanced_toolbar_align: "left",
|
||||
theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,image,addmedia,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
|
||||
theme_advanced_buttons2: "",
|
||||
theme_advanced_buttons3: "",
|
||||
convert_urls: false,
|
||||
addmedia_action: "@Url.Action("AddFromClient", "Admin", new {area = "Orchard.Media"})",
|
||||
addmedia_path: "@Model.AddMediaPath",
|
||||
request_verification_token: "@Html.AntiForgeryTokenValueOrchard()"
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
@Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" })
|
Reference in New Issue
Block a user