替换Episerver商务编辑器(TinyMCE)
是否有人知道如何在Episerver Commerce SP2上用默认编辑器替换TinyMCE替换Episerver商务编辑器(TinyMCE),tinymce,episerver,commerce,Tinymce,Episerver,Commerce,是否有人知道如何在Episerver Commerce SP2上用默认编辑器替换TinyMCE 将tiny_mce文件夹复制到电子商务框架\5.2\EPiServerCommerceManager\Shared\Apps\Core\Controls\Editors\ 将TinyMCEEditor.dll复制到Commerce Manager站点中的\bin文件夹中 在Commerce Manager站点文件夹中打开appSettings.config。将两个键“HtmlEditorControl
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditorControl.ascx.cs" Inherits="TinyMCEEditor.EditorControl" %>
tinyMCE.init({
//一般选择
模式:“文本区域”,
主题:“高级”,
插件:“分页符、样式、图层、表格、保存、advhr、advimage、advlink、情感、iespell、inlinepopups、insertdatetime、预览、媒体、搜索替换、打印、上下文菜单、粘贴、方向性、全屏、不可编辑、可视光标、不可中断、xhtmlxtras、模板、字数、advlist”,
文件浏览器回调:“文件浏览器”,
设置:函数(ed){
ed.onKeyPress.add(
函数(ed,evt){
}
);
},
//主题选项
主题高级按钮1:“粗体、斜体、下划线、|、字符映射、|、左对齐、居中对齐、右对齐、满对齐、样式选择、格式选择、字体选择、字体选择、字体大小选择”,
主题_高级_按钮2:“剪切、复制、粘贴、|、搜索、替换、|、bullist、numlist、|、outdent、缩进、块引号、|、撤消、重做、|、链接、取消链接、锚定、清理、代码、|、预览”,
主题\高级\按钮3:“表格控件”,
主题\高级\按钮4:“”,
主题\高级\工具栏\位置:“顶部”,
主题\高级\工具栏\对齐:“左”,
主题\高级\状态栏\位置:“底部”,
主题\u高级\u大小调整:正确,
//示例内容CSS(应该是您的网站CSS)
content\u css:“css/content.css”,
//链接/图像/媒体/模板对话框的下拉列表
template\u external\u list\u url:“lists/template\u list.js”,
外部链接列表url:“lists/link\u list.js”,
外部图片列表url:“lists/image\u list.js”,
媒体\u外部\u列表\u url:“lists/media\u list.js”,
//样式格式
样式_格式:[
{标题:“粗体文本”,内联:“b'},
{标题:'Red text',内联:'span',样式:{color:'#ff0000'}},
{title:'Red header',block:'h1',style:{color:'#ff0000'}},
{title:'example1',inline:'span',classes:'example1'},
{title:'example2',inline:'span',classes:'example2'},
{title:'表格样式'},
{title:'Table row 1',选择器:'tr',类:'tablerow 1'}
],
//替换模板插件的值
模板替换值:{
用户名:“某个用户”,
标记:“991234”
}
});
功能文件浏览器(字段名称、url、类型、win){
fileBrowserURL=“../FileManager/Default.aspx?sessionid=”;
tinyMCE.activeEditor.windowManager.open({
标题:“Ajax文件管理器”,
url:fileBrowserURL,
宽度:950,
身高:650,
内联:0,
最大化:1,
关闭上一个:0
}, {
窗口:赢,
输入:字段名称,
会话ID:“”
}
);
}
$(“.ajax\u htmleditor\u editor\u toptoolbar”)。每个(函数(索引){
$(this.html($(this.html()+);
});
函数openFileManager(索引){
window.open(“../FileManager/Default.aspx?sessionid=&input=“+索引,“我的窗口”,“状态=1,高度=650,宽度=950,可调整大小=0”)
}
是的,我相信他们甚至还提供了另一个带有标准安装的编辑器。如果这还不行,你可以创建你自己的字段类型并连接一个自定义控件,该控件可以使用你想要的任何自定义编辑器。哦,还可以更改你的用户名。没有人会用这样的尼克回答你的问题。谢谢埃里克!你们有小型MCE控制器的例子吗?
fileBrowserURL = "../FileManager/Default.aspx?sessionid=<%= Session.SessionID.ToString() %>";
tinyMCE.activeEditor.windowManager.open({
title: "Ajax File Manager",
url: fileBrowserURL,
width: 950,
height: 650,
inline: 0,
maximizable: 1,
close_previous: 0
}, {
window: win,
input: field_name,
sessionid: '<%= Session.SessionID.ToString() %>'
}
);
}
</script>
<script type="text/javascript" language="javascript">
$(".ajax__htmleditor_editor_toptoolbar").each(function (index) {
$(this).html($(this).html() + "<img onclick=showImgManager('" + index + "') src='../FileManager/icons/img-add-32.png' class='ajax__htmleditor_toolbar_button' /><img onclick=showFileManager('" + index + "') src='../FileManager/icons/Files-add-32.png' class='ajax__htmleditor_toolbar_button' /><div style='display:none;float:left;width:100%;padding-top:5px;' id='divImgManager" + index + "'></div>");
});
function openFileManager(index) {
window.open("../FileManager/Default.aspx?sessionid=<%= Session.SessionID %>&input=" + index, "myWindow", "status = 1, height = 650, width = 950, resizable = 0")
}
</script>
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 40%"
runat="server"></textarea>