썸머노트 에디터 글씨 크기 문의 드립니다.

기본 글씨 크기가 13으로 되어 있는데 기본 크기를 16으로 설정 할 수가 있을까요?

어느 부분을 수정을 해야 하나요?

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
  • 안녕하세요~^^

    KBoard 게시판에서 글 작성 에디터를 썸머노트로 사용할 경우

    기본 폰트 크기를 설정하시려면

    아래의 코드를 활용해보세요.

    add_action('wp_head', 'wp_head_20210422');
    function wp_head_20210422(){
    	?>
    	<script>
    	jQuery(document).ready(function(){
    		var kboard_mod = jQuery('input[name=mod]', '.kboard-form').val();
    		if(kboard_mod == 'editor'){
    			if(kboard_current.use_tree_category == 'yes'){
    				kboard_tree_category_parents();
    			}
    			
    			if(kboard_current.use_editor == 'snote'){ // summernote
    				jQuery('.summernote').each(function(){
    					var height = parseInt(jQuery(this).height());
    					var placeholder = jQuery(this).attr('placeholder');
    					var lang = 'en-US';
    					
    					if(kboard_settings.locale == 'ko_KR'){
    						lang = 'ko-KR';
    					}
    					else if(kboard_settings.locale == 'ja'){
    						lang = 'ja-JP';
    					}
    					
    					jQuery(this).summernote({
    						toolbar: [
    							['style', ['style']],
    							['fontsize', ['fontsize']],
    							['font', ['bold', 'italic', 'underline', 'clear']],
    							['fontname', ['fontname']],
    							['color', ['color']],
    							['para', ['ul', 'ol', 'paragraph']],
    							['height', ['height']],
    							['table', ['table']],
    							['insert', ['link', 'picture', 'hr']],
    							['view', ['fullscreen', 'codeview']],
    							['help', ['help']]
    						],
    						fontNames: ['Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Helvetica Neue', 'Helvetica', 'Impact', 'Lucida Grande', 'Tahoma', 'Times New Roman', 'Verdana', 'Nanum Gothic', 'Malgun Gothic', 'Noto Sans KR', 'Apple SD Gothic Neo'],
    						fontNamesIgnoreCheck: ['Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Helvetica Neue', 'Helvetica', 'Impact', 'Lucida Grande', 'Tahoma', 'Times New Roman', 'Verdana', 'Nanum Gothic', 'Malgun Gothic', 'Noto Sans KR', 'Apple SD Gothic Neo'],
    						fontSizes: ['8','9','10','11','12','13','14','15','16','17','18','19','20','24','30','36','48','64','82','150'],
    						lang: lang,
    						height: height,
    						placeholder: placeholder
    					});
    					
    					jQuery(this).summernote('fontSize', 16);
    				});
    			}
    		}
    	});
    	</script>
    	<?php
    }

    위의 코드에서 jQuery(this).summernote('fontSize', 16) 부분의 숫자가 기본 폰트 크기입니다.

    테마의 functions.php 파일에 코드를 추가하거나 Code Snippets 플러그인을 사용해서 코드를 추가할 수 있습니다.

    고맙습니다.

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요