【问题标题】:How to replace text area code into html editor in wordpress如何在wordpress中将文本区域代码替换为html编辑器
【发布时间】:2014-04-13 22:50:21
【问题描述】:

如何将文本区域中的 文本区域代码 编辑到 HTML 所见即所得编辑器中?我知道为了做到这一点,您需要将其转换为这种格式。 <?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 ) );}?>

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

【问题讨论】:

    标签: php wordpress


    【解决方案1】:

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

    【讨论】:

    • 实际上我正在尝试将文本 区号 调整为 &lt;?php wp_editor( $content, $editor_id, $settings = array() ); ?&gt; 这样的格式,以便在所见即所得编辑器中显示自定义字段。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-25
    • 1970-01-01
    • 2022-09-27
    • 2019-04-11
    • 2013-12-18
    • 1970-01-01
    相关资源
    最近更新 更多