2013-05-25 1 views
0

Orchard 용 TinyMCE Deluxe 모듈을 사용하여 사이트의 추가 편집 옵션을 지원합니다. 고객이 필요로하는 것 중 하나는 Word가 작동하는 방식과 동일한 텍스트 정렬을 수행하는 것입니다. 나는 TinyMCE에서 유틸리티가 "Core"컨트롤 세트 (see here)의 일부로 이러한 옵션을 지원한다는 것을 알았지 만 코어를 지원하기 위해 orchard-tinymce.js를 편집하려고 할 때 JS 에러가 발생하기 시작하고 툴바에 ' 보여줘.오차드 TinyMCE 구성

정렬 옵션을 추가하는 방법에 대한 제안 사항이 있으십니까? 여기에 편집

은 (/ 모듈/TinyMceDeluxe에 위치/스크립트) 내 과수원-tinymce.js 파일입니다

$(document).ready(function() { 
tinyMceDeluxe = new TinyMceDeluxe.Orchard(); 

// 1st arg is an array of plugin names. See plugin link above for full list of available plugins 
// 2nd arg is an options object; also see TinyMce documentation for details on all available options. 
tinyMceDeluxe.init(['pagebreak', 'paste', 'table', 'template', 'syntaxhl'], { 
    theme: "advanced", 
    mode: "specific_textareas", 
    editor_selector: "tinymce", 
    plugins: "fullscreen,autoresize,searchreplace,mediapicker,inlinepopups,-table,-pagebreak,-template,-paste,-syntaxhl", 
    theme_advanced_toolbar_location: "top", 
    theme_advanced_toolbar_align: "left", 
    theme_advanced_statusbar_location: "bottom", 
    theme_advanced_resizing: "true", 
    //theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,fontselect,fontsizeselect,|,styleselect,|,forecolor,backcolor", 
    theme_advanced_buttons1: 'core', 
    theme_advanced_buttons2: "mediapicker,|,tablecontrols,|,hr,removeformat,visualaid,|,visualchars,template,blockquote,pagebreak,|,alignleft,aligncenter,alignright,alignjustify,|,syntaxhl,code,fullscreen", 
    theme_advanced_buttons3: "", 
    convert_urls: false, 
    template_external_list_url: "/modules/tinymcedeluxe/scripts/samples/tinymce_template_list.js", 
    // content_css sets the path to your site's main .css file. The styles from this file are imported into a droplist in the TinyMce editor. 
    // TinyMceDeluxe sets this path automatically to the /Styles/custom.css file in your site's theme, but you can override the path by declaring it here: 
    //content_css: '/path/to/your/stylesheet.css', 
    valid_elements: "*[*]", 
    // shouldn't be needed due to the valid_elements setting, but TinyMCE would strip script.src without it. 
    extended_valid_elements: "script[type|defer|src|language]" 
}); 

});

특정 개수의 theme_advanced_buttons1을 주석 처리하고이를 단지 '코어'로 변경했습니다. 이렇게하면 tiny_mce.js에 "Uncaught TypeError : 정의되지 않은 'propery'Button '을 읽을 수 없습니다."라는 오류 메시지가 나타납니다.

+0

설정에서 설정 한 코드와 어떤 오류가 발생했는지 보여주는 몇 가지 코드를 보여주십시오! – Thariama

답변

1

Thariama의 질문에 답변하기 위해 조금 파기 한 후 TinyMCE 웹 사이트에서 this 페이지를 발견했습니다. 나는 "alignleft", "alignright"등의 버튼을 사용하여 사이트에서 다른 곳에서 본 정렬 컨트롤을 사용했지만 실제 이름은 "justifyleft", "justifyright"등으로 밝혀졌습니다. 그것들은 내가 필요한 모든 정렬 옵션을 내게 주었다.