如何在wordpress中将文本区域代码替换为html编辑器


How to replace text area code into html editor in wordpress

如何将文本区域代码从文本区域编辑到HTML wysiwyg编辑器中?我知道,为了做到这一点,你需要将其转换为这种格式。<?php wp_editor( $content, $editor_id, $settings = array() ); ?>,但我不知道该怎么做。

文本区域代码

<label><?php echo $site_title; ?></label>      
<input name="<?php echo $name;?>" id="<?php echo $name;?>" <?php if($value){ echo 'checked="checked"';}?>  value="1" type="checkbox" /> 
<?php
} elseif($type=='textarea') {
?>
<label><?php echo $site_title; ?></label>
<textarea name="<?php echo $name;?>" id="<?php echo $name;?>"><?php echo $value;?>
</textarea>

在发布这个问题后,我发现它是如何在其他领域实现的,比如:

<textarea  name="proprty_feature" id="proprty_feature" class="textarea" rows=""  cols=""  <?php if($property_feature_pkg==0){echo 'disabled="disabled"';} ?> ><?php  if($property_feature_pkg==1){ echo esc_attr(stripslashes($proprty_feature));} ?></textarea> 
            <?php }else{ wp_editor( stripslashes($proprty_feature), 'proprty_feature', array( 'editor_class' => 'at-wysiwyg', 'media_buttons' => false ) );}?>

但是仍然不知道如何将文本区域代码更改为类似的格式。

你能找到一个插件吗?如果我正确解释了你的问题,我认为这个插件可能会完成任务:https://codex.wordpress.org/TinyMCE