1
더 버튼을 보여줍니다 모두, 다른 버튼이나 툴바가 없습니다.wp_editor 내가 (안 관리자 섹션에서하지 플러그인) 간단한 PHP 페이지에 wp_editor를 사용하기 위해 노력하고있어
wp_editor를 호출하기 전에 다른 WP 라이브러리를로드해야합니까?
감사합니다.
더 버튼을 보여줍니다 모두, 다른 버튼이나 툴바가 없습니다.wp_editor 내가 (안 관리자 섹션에서하지 플러그인) 간단한 PHP 페이지에 wp_editor를 사용하기 위해 노력하고있어
wp_editor를 호출하기 전에 다른 WP 라이브러리를로드해야합니까?
감사합니다.
편집기에 일부 설정 변수를 전달할 수도 있습니다. 그것을 지나치 지 않으면 기본값을 취합니다.
바닥 글을로드하기 전에 내 페이지의 어느 곳에서나 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);