WordPress 사이트에서 게시물을 편집하고 작성하려면 INLINE 유형 Magnificent Popup 내부에 Advanced Custom Fields acf_form()
function을 사용하려고합니다. 진행중인 작업입니다. here's the link. 사용자 이름은 test
이고 비밀번호는 ukQfQ7zx7akPXH
입니다.tinymce가 멋진 팝업창에서 작동하지 않습니다
WordPress 콘텐츠 편집기가 작동합니다. WYSIWYG의 목적을 상실한 '시각적'탭을 클릭 할 수 없습니다.
각 ACF 양식에 고유 한 id
속성이 있는지 확인했습니다. 그래서, 저는 TinyMCE와 Magnific Popup과의 일종의 충돌이라고 생각합니다. 하지만 Chrome에 콘솔 오류가 나타나지 않습니다.
이전에 이런 일이 발생 했습니까?
UPDATE
여기에 새로운 코드입니다 :
function cb_new_post_popup() { ?>
<div id="new-post-popup"
class="update-popup mfp-hide">
<h3>New Post</h3>
<?php
$current_user = wp_get_current_user();
$args = array('fields' => array('field_54134c496ff9d', 'field_541877c6025b3'),
'form_attributes' => array('id' => 'acf-form-new_post'),
'post_title' => true,
'post_content' => true,
'post_id' => 'new_post',
'new_post' => array('post_status' => 'publish'),
'return' => '%post_url%');
acf_form($args);
?>
<script>
jQuery(function($) {
acf.do_action('append', $('#new-post-popup'));
});
</script>
</div>
<?php }
두 번째 업데이트가
나는 또한 JS에서 magnificPopup
기능이 추가 시도했다 :
callbacks: {
open: function() {
console.log('Popup is opened');
acf.do_action('append', $(this));
},
close: function() {
tinymce.activeEditor.save();
}
// e.t.c.
}
감사합니다! 이제 WYSIWYG로 모든 종류의 문제가 발생하지만 콘솔 오류는 없습니다. 나는 원래의 질문에 업데이트 된 코드를 넣을 것이다. 다시 한 번 감사드립니다! –
tinymce'id' 속성에 정보가 빠져있는 것처럼 보입니다. 'acf-_post_content-541c37e1567fc'와 같이 보입니다. '-_'는 이상하게 보입니다. 그것은 그렇게 되야 하는가? –