2017-10-30 3 views

답변

0

편집기에 일부 설정 변수를 전달할 수도 있습니다. 그것을 지나치 지 않으면 기본값을 취합니다.

바닥 글을로드하기 전에 내 페이지의 어느 곳에서나 exit();을 수행하면 바닥 글에서 일부 스크립트가로드되므로 툴바에 아무 버튼도 표시되지 않습니다. 따라서 바닥 글을로드하기 전에 exit() 또는 die()이 있으면 툴바가로드되지 않습니다.

여기에서 나는 그것을 편집인에게 전달했으며 잘 작동합니다.

define('WP_USE_THEMES', false); 
require('wp-blog-header.php'); 
$editor_id = 'mycustomeditor'; 
$settings = array(
    'wpautop' => true, // use wpautop? 
    'media_buttons' => true, // show insert/upload button(s) 
    'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here 
    'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..." 
    'tabindex' => '', 
    'editor_css' => '', // extra styles for both visual and HTML editors buttons, 
    'editor_class' => '', // add extra class(es) to the editor textarea 
    'teeny' => false, // output the minimal editor config used in Press This 
    'dfw' => false, // replace the default fullscreen with DFW (supported on the front-end in WordPress 3.4) 
    'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array() 

    'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array() 
); 
wp_editor("My content", $editor_id, $settings);