|
@@ -35,7 +35,7 @@ var gagaSn = {
|
|
|
if (typeof(type) == 'undefined' || type == 'default') {
|
|
if (typeof(type) == 'undefined' || type == 'default') {
|
|
|
return [
|
|
return [
|
|
|
['style', ['style']],
|
|
['style', ['style']],
|
|
|
- ['Font Style', ['fontname']],
|
|
|
|
|
|
|
+ //['Font Style', ['fontname']], <!-- 210309 삭제 -->
|
|
|
['fontsize', ['fontsize']],
|
|
['fontsize', ['fontsize']],
|
|
|
['height', ['height']],
|
|
['height', ['height']],
|
|
|
['style', ['bold', 'italic', 'underline','clear']],
|
|
['style', ['bold', 'italic', 'underline','clear']],
|
|
@@ -50,7 +50,7 @@ var gagaSn = {
|
|
|
} else if (type == 'media') {
|
|
} else if (type == 'media') {
|
|
|
return [
|
|
return [
|
|
|
['style', ['style']],
|
|
['style', ['style']],
|
|
|
- ['Font Style', ['fontname']],
|
|
|
|
|
|
|
+ //['Font Style', ['fontname']], <!-- 210309 삭제 -->
|
|
|
['fontsize', ['fontsize']],
|
|
['fontsize', ['fontsize']],
|
|
|
['height', ['height']],
|
|
['height', ['height']],
|
|
|
['style', ['bold', 'italic', 'underline','clear']],
|
|
['style', ['bold', 'italic', 'underline','clear']],
|
|
@@ -79,15 +79,26 @@ var gagaSn = {
|
|
|
placeholder: '내용을 입력하세요',
|
|
placeholder: '내용을 입력하세요',
|
|
|
height: editorHeight, //에디터 기본 높이
|
|
height: editorHeight, //에디터 기본 높이
|
|
|
lang : 'ko-KR', //기본 언어 인코딩
|
|
lang : 'ko-KR', //기본 언어 인코딩
|
|
|
- fontNames: ['Malgun Gothic', 'HY견고딕', 'Helvetica', 'Verdana', 'Arial', 'Arial Black'], //폰트 스타일
|
|
|
|
|
- fontNamesIgnoreCheck: ['Malgun Gothic'], //기본폰트 스타일
|
|
|
|
|
|
|
+ //fontNames: ['Malgun Gothic', 'HY견고딕', 'Helvetica', 'Verdana', 'Arial', 'Arial Black'], //폰트 스타일 <!-- 210309 삭제 -->
|
|
|
|
|
+ //fontNamesIgnoreCheck: ['Malgun Gothic'], //기본폰트 스타일 <!-- 210309 삭제 -->
|
|
|
|
|
+ fontNames: ['Noto Sans kr'], //폰트 스타일 <!-- 210309 수정 -->
|
|
|
|
|
+ fontNamesIgnoreCheck: ['Noto Sans kr'], //기본폰트 스타일 <!-- 210309 수정 -->
|
|
|
focus: false, //로드시 에디터창에 포커싱
|
|
focus: false, //로드시 에디터창에 포커싱
|
|
|
fontSizes: ['8','9','10','11','12','13','14','15','16','17','18','19','20','24','30','36'],
|
|
fontSizes: ['8','9','10','11','12','13','14','15','16','17','18','19','20','24','30','36'],
|
|
|
toolbar: toolbarOptions,
|
|
toolbar: toolbarOptions,
|
|
|
callbacks: {
|
|
callbacks: {
|
|
|
- onImageUpload: function(files, editor, welEditable) { //이미지 업로드
|
|
|
|
|
- for (var i = files.length - 1; i >= 0; i--) {
|
|
|
|
|
- sendFile(files[i], this);
|
|
|
|
|
|
|
+ onImageUpload: function(files) { // 이미지 업로드
|
|
|
|
|
+ for (var i = 0; i < files.length; i++) {
|
|
|
|
|
+ uploadImage(files[i], this);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onPaste: function(e) {
|
|
|
|
|
+ var clipboardData = e.originalEvent.clipboardData;
|
|
|
|
|
+ if (clipboardData && clipboardData.items && clipboardData.items.length) {
|
|
|
|
|
+ var item = clipboardData.items[0];
|
|
|
|
|
+ if (item.kind === 'file' && item.type.indexOf('image/') !== -1) {
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -105,6 +116,32 @@ var gagaSn = {
|
|
|
} catch(e) {
|
|
} catch(e) {
|
|
|
// Do nothing
|
|
// Do nothing
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ uploadImage : function(file, editorId) {
|
|
|
|
|
+ var formData = new FormData();
|
|
|
|
|
+ formData.append("file", file);
|
|
|
|
|
+ formData.append("policy", image);
|
|
|
|
|
+
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ data : formData,
|
|
|
|
|
+ type : 'POST',
|
|
|
|
|
+ url : '/common/file/upload?subDir=/editor',
|
|
|
|
|
+ cache : false,
|
|
|
|
|
+ contentType : false,
|
|
|
|
|
+ enctype : 'multipart/form-data',
|
|
|
|
|
+ processData : false,
|
|
|
|
|
+ success : function(data) {
|
|
|
|
|
+ console.log("================== EDITOR FILE UPLOAD ===================");
|
|
|
|
|
+ console.log("viewUrl : " + data.viewUrl);
|
|
|
|
|
+ console.log("viewPath : " + data.viewPath);
|
|
|
|
|
+ console.log("oldFileNm : " + data.oldFileNm);
|
|
|
|
|
+ console.log("newFileNm : " + data.newFileNm);
|
|
|
|
|
+ console.log("filePath : " + data.filePath);
|
|
|
|
|
+ console.log("================== // EDITOR FILE UPLOAD ===================");
|
|
|
|
|
+ $(editorId).summernote('insertImage', data.viewPath);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|