wp_editor on input changes content

I have a text area using wp_editor

On first input it works great.

Save via text or visual it saves to mysql just fine
this is what is in the text area before I save

<a href="https://wordpress.stackexchange.com/wp-content/uploads/2014/03/Multi_Leaf_2098.jpg"><img class="alignleft size-medium wp-image-555" alt="Drag Multi Leaf" src="/wp-content/uploads/2014/03/Multi_Leaf_2098-199x300.jpg" width="199" height="300" /></a>Designed with a low arch, which promotes weight transfer by lowering the ride height at the rear of the vehicle.
Very high spring rate which aids in transferring weight quicker and planting the rear tires.

bringing it into the textarea I get curly quotes… text chopped (see alt tag).. … picture does not load…

<a href="https://wordpress.stackexchange.com/questions/140085/”/wp-content/uploads/2014/03/Multi_Leaf_2098.jpg”"><img class="”alignleft" alt="”Drag" src="”/wp-content/uploads/2014/03/Multi_Leaf_2098-199×300.jpg”" width="”199″" height="”300″" /></a>Designed with a low arch, which promotes weight transfer by lowering the ride height at the rear of the vehicle.

Very high spring rate which aids in transferring weight quicker and planting the rear tires.

&nbsp;

notice the extra lines and a hardspace and extra line also
Then if save again and come back to double curly quotes.
notice the extra lines and a hardspace and extra line also

Now and unless I fix everything and redo the picture it is no longer working. So you can’t edit you have to redo

So I am pretty sure it is changing when loading to the edit area so I have tried on the wp_editor call

wp_editor(html_entity_decode(stripcslashes($content)), 'content', $settings);
wp_editor(html_entity_decode($content), 'content', $settings);
wp_editor(stripcslashes($content), 'content', $settings);

$settings = array(
    'tinymce'       => array(
        'setup' => 'function (ed) {
            tinymce.documentBaseURL = "' . get_admin_url() . '";
        }',
    ),
    'quicktags'     => TRUE,
    'editor_class'  => 'frontend-article-editor',
    'textarea_rows' => 25,
    'media_buttons' => TRUE,
);

I have tnymce advanced installed. would those setting make this happen.

1 Answer
1

Add these two lines in your functions.php:

remove_filter( 'the_content', 'wpautop' ); 
remove_filter( 'the_content', 'wptexturize' );

Leave a Comment