Resumen de la IA
Introducción
¿Te gustaría desactivar el editor WYSIWYG que aparece en la configuración de confirmación? Por defecto, cuando estás en el generador de formularios, verás el editor WYSIWYG estándar que utiliza WordPress. Pero si deseas desactivar este campo, puedes hacerlo fácilmente añadiendo unas pocas líneas de código PHP. En este tutorial, te guiaremos paso a paso para que sepas cómo desactivar este editor.
¿Qué es un editor WYSIWYG? Es lo que típicamente se conoce como Editor Visual o Campo de texto enriquecido. Cuando acceda por primera vez a la pestaña de configuración de la Confirmación desde el constructor de formularios, normalmente verá dos pestañas. Una es para el editor de texto visual (WYSIWYG) y la otra es una pestaña de texto sin formato.

El editor de texto plano suele ser más utilizado por los usuarios que se sienten cómodos escribiendo HTML.
Añadir el fragmento para desactivar el editor WYSIWYG
Antes de crear el formulario, vamos a añadir el fragmento que desactivará este editor. Para ello, basta con copiar y pegar este fragmento en su sitio.
Si necesita ayuda para añadir fragmentos a su sitio, consulte este tutorial.
/**
Disable the WYSIWYG editor in the Confirmation settings.
@link https://wpforms.com/developers/how-to-disable-the-wysiwyg-editor-inside-the-confirmation-settings/
*/
function wpf_dev_builder_enqueues( $view ) {
wp_add_inline_script(
'wpforms-builder',
'(function( $ ) {
// Prevent crash: module reads tinymceDefaults.tinymce.toolbar1 before
// calling wp.editor.initialize — needs a valid object, not false.
// This runs synchronously so WPFormsBuilder is guaranteed to exist.
if ( typeof WPFormsBuilder !== "undefined" && WPFormsBuilder.settings ) {
WPFormsBuilder.settings.tinymceDefaults.tinymce = { toolbar1: "" };
}
$( document ).ready( function() {
// Layer 1: wp.editor.initialize intercept.
// Prevents tmce-active class + TinyMCE init flow for confirmation editors.
if ( typeof wp !== "undefined" && wp.editor && wp.editor.initialize && ! wp.editor.initialize.wpfPatched ) {
var wpInit = wp.editor.initialize;
wp.editor.initialize = function( id, settings ) {
if ( typeof id === "string" && /^wpforms[-]panel[-]field[_-]confirmations/.test( id ) ) {
settings = Object.assign( {}, settings, { tinymce: false } );
}
return _wpInit.call( this, id, settings );
};
wp.editor.initialize.wpfPatched = true;
}
// Layer 2: tinymce.init intercept.
// Belt-and-suspenders — catches TinyMCE even if wp.editor.initialize
// is called from a path our Layer 1 missed.
if ( typeof tinymce !== "undefined" && ! tinymce.init.wpfPatched ) {
var mceInit = tinymce.init;
tinymce.init = function( settings ) {
if ( settings && settings.selector && /wpforms[-]panel[-]field[-]confirmations/.test( settings.selector ) ) {
return;
}
return _mceInit.apply( this, arguments );
};
tinymce.init._wpfPatched = true;
}
// Layer 3: event fallback — re-init any editor that slipped through.
$( "#wpforms-builder" ).on( "wpformsBuilderConfirmationsReady", function() {
if ( typeof wp === "undefined" || ! wp.editor ) return;
$( ".wpforms-panel-field-confirmations-message" ).each( function() {
var id = $( this ).attr( "id" );
if ( ! id ) return;
wp.editor.remove( id );
wp.editor.initialize( id, { tinymce: false, quicktags: true } );
} );
} );
} );
} )( jQuery );'
);
}
add_action( 'wpforms_builder_enqueues', 'wpf_dev_builder_enqueues', 10, 1 );
Esto desactivará por completo el editor visual (el editor WYSIWYG) y solo verás el editor de texto.

¿Quieres desactivar también el desplazamiento automático cuando hay errores en el formulario? Echa un vistazo a nuestro artículo sobre Cómo desactivar el efecto de desplazamiento en los errores de validación de campo.