<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[썸머노트 엔터시 P자동 추가 해제 방법 궁금합니다.]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/63725</link>
		<description><![CDATA[<p>썸머노트에서 엔터 줄바꿈시 P가 자동추가 되어 레이아웃이 깨집니다.</p>

<p>CSS로 간격을 좁혀서 볼 수는 있지만 </p>

<p>게시판&gt;고급&gt;<strong>양식을 사용하고 있고</strong> 메모장에 있는 내용을 <strong>복붙하면 P태그가 자동으로 들어가</strong></p>

<p>형태가 깨집니다. 하여 아래와 같이 코드를 삽입해도 문제가 해결되지 않습니다.</p>

<p> </p>

<p>방법1)</p>

<pre>
<code class="language-php">add_filter( 'sanitize_file_name', 'mb_strtolower' );

add_filter( 'the_content', 'remove_autop_tags_from_summernote_editor' );
function remove_autop_tags_from_summernote_editor( $content ) {
    $content = str_replace( '&lt;p&gt;&lt;br&gt;&lt;/p&gt;', '', $content );
    return $content;
}</code></pre>

<p> </p>

<p>방법2)</p>

<pre>
<code class="language-php">function clear_p($content){
return str_replace("&lt;/p&gt;","&lt;p clear='none'/&gt;", $content);
}
add_filter('the_content', 'clear_p');</code></pre>

<p><br />
방법3)</p>

<pre>
<code class="language-php">remove_filter('the_content', 'wpautop');
remove_filter('the_excerpt', 'wpautop');
remove_filter('widget_text_content', 'wpautop');
remove_filter('the_twput', 'wpautop');</code></pre>

<p> </p>

<p> </p>

<p>방법4) 이 방법으로 코드 삽입시 기본 클래식 에디터에서 엔터 줄바꿈 사용시 P가 추가되지 않아 좋았지만</p>

<p><strong>여진히 썸머노트에서는 적용되지 않습니다.</strong></p>

<pre>
<code class="language-php">add_filter('tiny_mce_before_init','change_mce_options', 10, 1);
function change_mce_options($init){
	$init["forced_root_block"] = false;
	$init["force_br_newlines"] = true;
	$init["force_p_newlines"] = false;
	$init["convert_newlines_to_brs"] = true;
	return $init;
}</code></pre>

<p> </p>

<p> </p>

<p><strong>좀 더 명확하게 어떤 코드를 어떤 경로의 PHP 파일에 추가하거나 변경해야 하는지 도움을 구합니다.</strong></p>

<p><strong>부탁드립니다.</strong></p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^

kboard/template/js/script.js 파일 내에 

 

아래 코드 내에


jQuery(this).summerno...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/63751</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>kboard/template/js/script.js 파일 내에 </p>

<p> </p>

<p>아래 코드 내에</p>

<pre>
<code>jQuery(this).summernote({
	...
});</code></pre>

<p> enterParagraphs: false, 를 아래 처럼 입력해보시겠어요?</p>

<pre>
<code>jQuery(this).summernote({
	enterParagraphs: false,
...
});</code></pre>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Fri, 17 Mar 2023 04:58:38 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>