removed wpautop filter not persistent in Customizer Editor #127
Comments
@bsusala to clarify, the issue is that Customize Posts forces the visual editor to be used initially as opposed to the text editor, and so when switching from visual to text the content is corrupted? |
@bsusala From your support forum comment:
|
The exact behaviour is:
|
OK, I didn't realize you were referring to a plugin called “WP Edit”. |
@westonruter sorry, yes, it's the Plugin. But this behaviour is also present if I remove the filter through functions.php, I just mentioned the actual environment (if it's of any worth). |
@bsusala It sounds like the issue is rooted in this line: editor.setContent( wp.editor.autop( newPostData.post_content ) ); And the converse lines that call I tried commenting out from add_filter( 'the_content', 'wpautop' ); And I added two line breaks in the editor and confirmed that paragraphs weren't added on the frontend. Nevertheless, the paragraphs were still automatically getting added in the normal visual editor. Is this a feature of WP Edit to disable the autop functionality in the core visual editor? |
@bsusala ok, so this is a plugin-specific feature that they'll need to add support for in the Customizer. To start, they can add to add_action( 'customize_controls_enqueue_scripts', array($this, 'admin_scripts') );
add_action( 'customize_controls_enqueue_scripts', array($this, 'admin_styles') ); But then they'll need to add a UI for toggling whether to disable |
Ok, but just an opinion: couldn't this be something coded by YOUR plugin? It's true that WP Edit is commonplace for trying to mimic code-editors in WP, but, actually, the most important feature is that wpautop (and line numbers, okay :) ). Couldn't implement yourself that? I think will help alot, in the direction of trying to edit as much as possible in Customizer. |
I think it is out of scope for Customize Posts. I've personally never come across turning off |
Hi, I'm the author of WP Edit. I have been absent a few days; but will give this issue some attention and see if we can't find a simple fix. @bsusala, please refer to the thread on the WP forums for further info. We will come back here once we know more about the issue. Thank you. |
Using WP Edit Plugin for editing html in Text Mode in Edit Post/Page, with the setting disable wpautop, globally and/or per Page/Post.
But when editing the Page/Post in Customizer, it sanitizes the content, making the process unusable.
The text was updated successfully, but these errors were encountered: