Refactor Summernote initialization for consistency and improved readability
This commit is contained in:
@@ -67,28 +67,10 @@
|
||||
buttonControl(false);
|
||||
}
|
||||
|
||||
$('#faqAnswer').summernote({
|
||||
// Summernote 에디터 초기화 (이미지 붙여넣기 data-uri 방식, 리사이징 지원)
|
||||
initSummernote('#faqAnswer', {
|
||||
placeholder: '여기에 답변을 입력하세요.',
|
||||
height: 300,
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['table', ['table']],
|
||||
['insert', ['link', 'picture']],
|
||||
['view', ['fullscreen', 'codeview', 'help']]
|
||||
],
|
||||
callbacks: {
|
||||
onInit: function() {
|
||||
$('.note-editable').addClass('editor-content');
|
||||
$('.note-editable').on('keydown', function(e) {
|
||||
if (e.keyCode === 8) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
height: 300
|
||||
});
|
||||
|
||||
if (key) {
|
||||
|
||||
@@ -109,26 +109,10 @@
|
||||
var returnUrl = getReturnUrlForReturn();
|
||||
var key = "${param.id}";
|
||||
|
||||
$('#responseDetail').summernote({
|
||||
height: 200,
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['table', ['table']],
|
||||
['insert', ['link']],
|
||||
['view', ['codeview', 'help']]
|
||||
],
|
||||
callbacks: {
|
||||
onInit: function () {
|
||||
$('.note-editable').on('keydown', function (e) {
|
||||
if (e.keyCode === 8) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Summernote 에디터 초기화 (이미지 붙여넣기 data-uri 방식, 리사이징 지원)
|
||||
initSummernote('#responseDetail', {
|
||||
placeholder: '여기에 답변을 입력하세요.',
|
||||
height: 200
|
||||
});
|
||||
|
||||
if (key) {
|
||||
|
||||
@@ -137,28 +137,10 @@
|
||||
|
||||
init();
|
||||
|
||||
$('#contents').summernote({
|
||||
// Summernote 에디터 초기화 (이미지 붙여넣기 data-uri 방식, 리사이징 지원)
|
||||
initSummernote('#contents', {
|
||||
placeholder: '여기에 내용을 입력하세요.',
|
||||
height: 300,
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['table', ['table']],
|
||||
['insert', ['link']],
|
||||
['view', ['codeview', 'help']]
|
||||
],
|
||||
callbacks: {
|
||||
onInit: function() {
|
||||
$('.note-editable').addClass('editor-content');
|
||||
$('.note-editable').on('keydown', function(e) {
|
||||
if (e.keyCode === 8) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
height: 300
|
||||
});
|
||||
|
||||
if (key) {
|
||||
|
||||
@@ -127,28 +127,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#contents').summernote({
|
||||
placeholder: '여기에 답변을 입력하세요.',
|
||||
height: 300,
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['table', ['table']],
|
||||
['insert', ['link']],
|
||||
['view', ['fullscreen', 'codeview', 'help']]
|
||||
],
|
||||
callbacks: {
|
||||
onInit: function() {
|
||||
$('.note-editable').addClass('editor-content');
|
||||
$('.note-editable').on('keydown', function(e) {
|
||||
if (e.keyCode === 8) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Summernote 에디터 초기화 (이미지 붙여넣기 data-uri 방식, 리사이징 지원)
|
||||
initSummernote('#contents', {
|
||||
placeholder: '여기에 약관 내용을 입력하세요.',
|
||||
height: 300
|
||||
});
|
||||
|
||||
if (agreementsType && revision) {
|
||||
|
||||
@@ -54,7 +54,8 @@ function detail(key){
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#emailTemplate').summernote({
|
||||
// Summernote 에디터 초기화 (이미지 붙여넣기 data-uri 방식, 리사이징 지원)
|
||||
initSummernote('#emailTemplate', {
|
||||
placeholder: '여기에 내용을 입력하세요.',
|
||||
height: 300,
|
||||
toolbar: [
|
||||
@@ -65,16 +66,7 @@ $(document).ready(function() {
|
||||
['table', ['table']],
|
||||
['insert', ['link', 'picture', 'video']],
|
||||
['view', ['codeview', 'help']]
|
||||
],
|
||||
callbacks: {
|
||||
onInit: function() {
|
||||
$('.note-editable').on('keydown', function(e) {
|
||||
if (e.keyCode === 8) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var key ="${param.id}";
|
||||
|
||||
Reference in New Issue
Block a user