修复了一些问题

This commit is contained in:
2026-08-25 19:59:43 +08:00
parent f5746da0ae
commit c484ee6ef3
5 changed files with 16 additions and 87 deletions
+2 -8
View File
@@ -42,12 +42,6 @@ $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 = [
@@ -56,7 +50,7 @@ $is_can_new = !empty($ctx['is_can_new']);
'editor_height' => wp_is_mobile() ? 460 : 470,
'media_buttons' => false,
'default_editor' => 'tinymce',
'quicktags' => true,
'quicktags' => false,
'teeny' => false,
'tinymce' => [
'toolbar1' => $toolbar1,
@@ -65,7 +59,7 @@ $is_can_new = !empty($ctx['is_can_new']);
'placeholder' => (string) ($settings['content_placeholder'] ?? ''),
],
];
wp_editor($initial_content, 'post_content', $editor_settings);
wp_editor((string) $ctx['current_content'], 'post_content', $editor_settings);
?>
</div>