<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[답글 에디터 오류 해결 코드]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/71404</link>
		<description><![CDATA[<p>1. 정확한 제품 또는 플러그인 이름</p>

<p>KBoard &amp; 댓글 플러그인 최신 버전</p>

<p> </p>

<p>2. 상세 내용</p>

<p><a href="https://www.cosmosfarm.com/threads/document/71089">이전에 문의드린 오류</a>를 클로드AI로 해결해서 글을 작성합니다. 다음 업데이트 때 반영해주시면 감사하겠습니다.</p>

<p><a href="https://imgur.com/zy4MdQ0">https://imgur.com/zy4MdQ0</a></p>

<p>/kboard-comments/skin/default/script.js</p>

<pre>
<code class="language-javascript">function kboard_comments_reply(obj, form_id, cancel_id, content_uid){ // 메타마인드: 답글 입력폼 초기화 오류 수정
    var parents = jQuery(obj).parents('#kboard-comments-'+content_uid);
    if(jQuery(obj).hasClass('kboard-reply-active')){
        jQuery(cancel_id).append(jQuery('.kboard-comments-form', parents));
        jQuery('.kboard-reply', parents).text(kboard_comments_localize_strings.reply).removeClass('kboard-reply-active');
    }
    else{
        jQuery(form_id).append(jQuery('.kboard-comments-form', parents));
        jQuery('textarea[name=comment_content]', parents).focus();
        jQuery('.kboard-reply', parents).text(kboard_comments_localize_strings.reply).removeClass('kboard-reply-active');
        jQuery(obj).text(kboard_comments_localize_strings.cancel).addClass('kboard-reply-active');
    }
    
    // TinyMCE 재초기화
    if(typeof tinyMCE !== 'undefined' &amp;&amp; tinyMCE.activeEditor){
        var editor_id = 'comment_content_'+content_uid;
        var settings = tinyMCE.activeEditor.settings || {};  // 기존 설정 저장
        
        // 에디터 제거
        tinyMCE.EditorManager.execCommand('mceFocus', false, editor_id);      
        tinyMCE.EditorManager.execCommand('mceRemoveEditor', true, editor_id);
        
        // 기존 설정을 유지한 채로 에디터 재생성
        var init = Object.assign({}, settings, {
            selector: '#' + editor_id,
            setup: function(editor) {
                editor.on('focus', function(e) {
                    kboard_comments_field_show(e);
                });
            }
        });
        
        tinyMCE.init(init);
    }
    return false;
}

function kboard_comments_field_show(form){ // 메타마인드: 답글 입력폼 초기화 오류 수정
    // TinyMCE 에디터에서 호출된 경우
    if(typeof tinyMCE !== 'undefined' &amp;&amp; tinyMCE.activeEditor &amp;&amp; form.target){
        form = jQuery(form.target.formElement);
    }
    // 이미 jQuery 객체인 경우는 그대로 사용
    else if(!form.jquery){
        form = jQuery(form);
    }

    jQuery('.comments-field-wrap').hide();
    jQuery('.comments-submit-button').hide();
    
    jQuery('.comments-field-wrap', form).show();
    jQuery('.comments-submit-button', form).show();
}</code></pre>

<p> </p>

<p> </p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^ 

코드 공유 감사드립니다. 

남겨주신 코드를 참고하여 다음 업데이트 때 반영해 보도록...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/71406</link>
			<description><![CDATA[<p>안녕하세요~^^ </p>

<p>코드 공유 감사드립니다. </p>

<p>남겨주신 코드를 참고하여 다음 업데이트 때 반영해 보도록 하겠습니다. </p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 07 Jan 2025 00:29:27 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>