2012-11-18 3 views
2

Nicedit 편집기의 편집 상자에 표시되는 텍스트의 Nicedit 기본 글꼴 크기를 변경하려면 어떻게해야합니까?Nicedit 편집기에 표시되는 텍스트의 Nicedit 기본 글꼴 크기를 변경하려면 어떻게해야합니까?

이미지를 보려면 여기를 클릭하십시오. http://4.bp.blogspot.com/-BDOmlcOIcBA/UKbZ-TFLfnI/AAAAAAAACKU/8LRYrZZRio8/s640/toggle0.jpg 편집 상자는 노란색의 꺽 은선입니다.

내가 코드 글꼴 속성을 편집 할 확신이 같다 :

area1 = new nicEditor({fullPanel : true}).panelInstance('peterText',{hasPanel : true}); 

또는 같은 :

area1 = new nicEditor({/*fullPanel : true*/buttonList : ['save','center','right','forecolor','bgcolor','image','fontSize','fontFamily','fontFormat','subscript','superscript','ol','ul','indent','link','unlink','xhtml'] 
    }).panelInstance('peterText',{hasPanel : true}); 

또는 뭔가 같은 :

bkLib.onDomLoaded(function() { 
     new nicEditor().panelInstance('area1'); 
     new nicEditor({fullPanel : true}).panelInstance('area2'); 
     new nicEditor({iconsPath : '../nicEditorIcons.gif'}).panelInstance('area3'); 
     new nicEditor({buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image']}).panelInstance('area4'); 
     new nicEditor({maxHeight : 100}).panelInstance('area5'); 
    }); 

모든 아이디어, 사람 ?

답변

0

nicEdit는 텍스트 영역의 본문 내에 html 태그를 사용하여 글꼴/굵게/밑줄 등을 관리합니다. 트릭은 패널 인스턴스를 만들기 전에 텍스트 영역 본문에 태그를 제공하는 것입니다.

var body = document.getElementById('editor_body'); 
body.innerHTML = "<font face='verdana' color='green' size='6'><div align='left'>Hello!</div></font>"; 
new nicEditor({iconsPath:'edit/nicEditorIcons.gif'}).panelInstance('editor_body'); 
관련 문제