Michael Leigeber씨는 무료로 사용할 수 있는 쓸만한 WYSIWYG 텍스트 편집기인 TinyEditor를 만들고 공개했습니다. 어떠한 자바스크립트 프레임웍도 필요로하지 않으며, 가볍고(8kb) 간편하게 사용할 수 있습니다. 참 겸손한 WYSIWYG 편집기입니다. 기본 기능에 워낙 충실해서 딱히 쓸 말이 떠오르지 않네요. 위 편집기를 직접 사용해 보세요. 편집기를 초기화하는 방법은 다음과 같습니다.
new TINY.editor.edit('editor',{
id:'input', // (required) ID of the textarea
width:584, // (optional) width of the editor
height:175, // (optional) heightof the editor
cssclass:'te', // (optional) CSS class of the editor
controlclass:'tecontrol', // (optional) CSS class of the buttons
rowclass:'teheader', // (optional) CSS class of the button rows
dividerclass:'tedivider', // (optional) CSS class of the button diviers
controls:[
'bold', 'italic', 'underline', 'strikethrough', '|',
'subscript', 'superscript', '|',
'orderedlist', 'unorderedlist', '|',
'outdent' ,'indent', '|',
'leftalign', 'centeralign', 'rightalign', 'blockjustify', '|',
'unformat', '|',
'undo', 'redo', 'n', 'font', 'size', 'style', '|',
'image', 'hr', 'link', 'unlink', '|',
'cut', 'copy', 'paste', 'print'
], // (required) options you want available, a '|' represents a divider and an 'n' represents a new row
footer:true, // (optional) show the footer
fonts:['Verdana','Arial','Georgia','Trebuchet MS'], // (optional) array of fonts to display
xhtml:true, // (optional) generate XHTML vs HTML
cssfile:'style.css', // (optional) attach an external CSS file to the editor
content:'starting content', // (optional) set the starting content else it will default to the textarea content
css:'body{background-color:#ccc}', // (optional) attach CSS to the editor
bodyid:'editor', // (optional) attach an ID to the editor body
footerclass:'tefooter', // (optional) CSS class of the footer
toggle:{text:'source',activetext:'wysiwyg',cssclass:'toggle'}, // (optional) toggle to markup view options
resize:{cssclass:'resize'} // (optional) display options for the editor resize
});
Comments
Got something to add? You can just leave a comment.
RT @firejune: 군더더기 없는 WYSIWYG 편집기 - TinyEditor http://firejune.com/1553
from Topsy
이거 IE외의 브라우저에서요.
이탤릭 지정하고 소스보기 갔다오면 이탤릭이 해제되어 버리는데요.
이후에 다시 소스보기를 하면 font-weight:italic; 이라는 이상한 스타일지정으로 바뀌는 걸 볼 수 있습니다. 버그같이 느껴지는데... 신고하면 되려나요 ㅎ
불여우에선 더 이상하게 변해버립니다 -o-
reply edit
색깔 지정을 못하는게 아쉽네요
reply edit
Your Reaction Time!