Read: 10264
|
2016-07-21 17:34:01
|
tinymce.init({
selector: 'textarea',
height: 600,
language_url: '/tinymce/langs/ko.js',
theme: 'modern',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools'
],
toolbar1: ' mySubmit | myButton | insertfile undo redo | styleselect | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media fullscreen',
//toolbar2: 'print preview media | forecolor backcolor emoticons',
image_advtab: true,
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' }
],
content_css: [
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
'//www.tinymce.com/css/codepen.min.css'
],
setup: function (editor) {
editor.addButton('myButton', {
text: '파일 업로드',
icon: false,
onclick: function () {
window.open('업로드 URL','_fileupload','width=800, height=600');
}
});
editor.addButton('mySubmit', {
text: '문서저장하기',
icon: false,
onclick: function () {
if(confirm('저장하시겠습니까?'))
{
document.FORM_NAME.submit();
}
}
});
}
});
xxxxxxxxxx
function TinyMceInsert(s)
{
tinymce.execCommand('mceInsertContent',false,s);
}
xxxxxxxxxx
function insertImage(s)
{
opener.TinyMceInsert('<p style="text-align: center;"><img src="'+s+'" align="absbottom" border="0" title="#FileManagerV0.1UploadImage"></p>');
}
IEO.KR의 사전 서면동의 없이 IEO.KR 사이트의 일체의 정보, 콘덴츠 및 UI등을 상업적 목적으로 전재, 전송, 스크래핑 등 무단 사용할 수 없습니다.
|