修复了一些问题

This commit is contained in:
2026-08-25 19:42:16 +08:00
parent ea83f2211c
commit f5746da0ae
4 changed files with 81 additions and 3 deletions
+8 -2
View File
@@ -42,6 +42,12 @@ $is_can_new = !empty($ctx['is_can_new']);
<?php else : ?>
<div class="aksrt-submit-editor-wrap">
<?php
$initial_content = (string) $ctx['current_content'];
if ($initial_content !== '') :
?>
<textarea id="aksrt-initial-post-content" hidden aria-hidden="true" tabindex="-1"><?php echo esc_textarea($initial_content); ?></textarea>
<?php
endif;
$toolbar1 = 'formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,blockquote,code,fullscreen';
$plugins = 'paste,link,lists,fullscreen,wordpress,wplink,charmap';
$editor_settings = [
@@ -50,7 +56,7 @@ $is_can_new = !empty($ctx['is_can_new']);
'editor_height' => wp_is_mobile() ? 460 : 470,
'media_buttons' => false,
'default_editor' => 'tinymce',
'quicktags' => false,
'quicktags' => true,
'teeny' => false,
'tinymce' => [
'toolbar1' => $toolbar1,
@@ -59,7 +65,7 @@ $is_can_new = !empty($ctx['is_can_new']);
'placeholder' => (string) ($settings['content_placeholder'] ?? ''),
],
];
wp_editor((string) $ctx['current_content'], 'post_content', $editor_settings);
wp_editor($initial_content, 'post_content', $editor_settings);
?>
</div>