Javascript 如何在Yii2中启用所见即所得的redactor完整的html支持(html、头、体、元标记等)?

Javascript 如何在Yii2中启用所见即所得的redactor完整的html支持(html、头、体、元标记等)?,javascript,html,tags,yii2,redactor.js,Javascript,Html,Tags,Yii2,Redactor.js,Yii2 redactor是否有机会使用完整的html支持,包括html、头、体、元标记等。?或者,可能还有另一个WYSIWYG编辑器允许使用这些标记?您可以使用它来放置完整的html内容,请看以下示例: <?= $form->field($model, 'description')->widget(TinyMce::className(), [ 'options' => ['rows' => 6], 'language' => 'ar',

Yii2 redactor是否有机会使用完整的html支持,包括html、头、体、元标记等。?或者,可能还有另一个WYSIWYG编辑器允许使用这些标记?

您可以使用它来放置完整的html内容,请看以下示例:

<?= $form->field($model, 'description')->widget(TinyMce::className(), [
    'options' => ['rows' => 6],
    'language' => 'ar',
    'clientOptions' => [
        'plugins' => [],
        'toolbar' => "forecolor | undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
    ]
]);?>

查找以下功能:。

为什么不能将它们写入redactor?如何处理来自redactor的输入取决于您。净化输入时只允许这些标记?
<?= $form->field($model, 'description')->widget(CKEditor::className(), [
        'options' => ['rows' => 6],
        'preset' => 'full',
        'clientOptions' => ['allowedContent' => true]
    ]) ?>
$R('#content', {
    source: {
        codemirror: {
            lineNumbers: true
        }
    }
});