2013-07-24 2 views
0

TinyMCE를 Episerver Commerce SP2의 기본 편집기로 대체하는 방법을 알고있는 사람이 있습니까? 5.2 \ EPiServerCommerceManager \ 공유 \ APPS \ 코어 \ eCommerceFramework에Episerver Commerce Editor (TinyMCE) 대체

+0

그래, 나는 그들이 심지어 표준 설치와 다른 편집기를 제공 믿습니다. 그렇게하지 않으면 자신 만의 필드 유형을 만들고 원하는 사용자 정의 편집기를 사용하는 사용자 정의 컨트롤을 연결할 수 있습니다. –

+0

아, 사용자 이름을 변경하십시오. 아무도 그런 식으로 닉으로 질문에 대답하지 않을 것입니다. –

+0

감사합니다. Eric! 작은 MCE 컨트롤의 예가 있습니까? – Bara

답변

0
  1. 복사 tiny_mce 폴더 \ 컨트롤은 상업 관리자 사이트의 \ bin 폴더에
  2. 복사 TinyMCEEditor.dll \ 편집자 \.
  3. Commerce Manager 사이트 폴더에서 appSettings.config를 엽니 다. 2 개의 키 "HtmlEditorControl"및 "AdminHtmlEditorControl"을 새 편집기 경로로 변경하십시오.
  4. Commerce Manager 사이트의 루트 폴더에 폴더 이름 "UserFiles"를 만듭니다.
  5. 완료, Commerce Manager를 입력하고 편집기를 테스트하십시오.
  6. 사용하여 다음과 같은 제어 :

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditorControl.ascx.cs" Inherits="TinyMCEEditor.EditorControl" %> 
    

    tinyMCE.init ({ // 일반 옵션 모드 : "텍스트 영역", 테마 : "고급", 플러그인 : "페이지 나눔 , 스타일, 레이어, 테이블, 저장, advhr, advimage, advlink, 감정, iespell, inlinepopups, insertdatetime, 미리보기, 미디어, searchreplace, 인쇄, contextmenu, 붙여 넣기, 방향, 전체 화면, 편집 불가능, visualchars, nonbreaking, xhtmlxtras, , advlist ", file_browser_callback : "filebrowser", setup : function (ed) { ed.onKeyPress.add ( function (ed, evt) { } ); }, 는 // 테마 옵션 theme_advanced_buttons1 "굵게, 기울임은, 밑줄, |, 문자표는, |, justifyleft, justifycenter, justifyright, justifyfull, styleselect, formatselect, fontselect, fontsizeselect" theme_advanced_buttons2은 "잘라 내기, 복사, 붙여 넣기 취소, 다시 실행, 다시 연결, 연결 해제, 앵커, 정리, 코드, |, 미리보기 ", theme_advanced_buttons3 :"tablecontrols " , theme_advanced_buttons4 "" theme_advanced_toolbar_location : "최고", theme_advanced_toolbar_align : "왼쪽", theme_advanced_statusbar_location : "바닥" theme_advanced_resizing : 사실, // 예 내용 CSS (수 있어야 사이트 CSS) content_css : "CSS/content.css" 드롭 링크/이미지/미디어/템플릿 대화 상자에 대한 template_external_list_url 나열 // : "목록/template_list.js" external_link_list_url : "목록/link_list.js" external_image_list_url를 : "lists/image_list.js", media_external_list_url : "lists/media_list.스타일 :{ {제목 : '굵은 글씨', 인라인 : 'b'}, {제목 : '빨간색 텍스트', 인라인 : '스팬', 스타일 : {색상 : '# f350000 '}}, {title :'예 1 ', 인라인 :'span ', 클래스 :'ff0000 '}}, {제목 :'빨간 머리글 ', 블록 :'h1 ', 스타일 : {색상 :'# 예 1 '} {타이틀'실시 예 2 '인라인'범위 '클래스'예 2 '} {타이틀'표 스타일 '} {타이틀 「표 1 행'선택 'TR ', classes :'tablerow1 '} ] // 템플릿 플러그인 값을 바꿉니다. template_replace_values ​​: { username : "Some User", staffid : "991234" } });

    기능 filebrowser (FIELD_NAME, URL, 유형, 승리) {

    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>