Custom element - editor (TinyMCE) html markup shown as text

Hi guy´s,

I have the following problem: I´ve created a custom element for the cornerstone backend - worked perfectly.
Now I have changed a simple text-input for editing with the tinyMCE. The text is displayed correctly inside the editor but the html markup output for the frontend is shown as Text.

I think these quotes in the last image are causing the error…maybe

Do you have a solution for this problem?
Sorry for the bad english…

Hello There,

Thanks for writing in! How did you display the output? Could you please insert your code in the shortcode.php file in your next reply? Meanwhile, instead of just displaying the output, like this:

<?php echo $content; ?>

Please have it this way:

<?php echo do_shortcode( wpautop( $content ) );  ?>

Hope this helps. Please let us know how it goes.

HiRueNel,

thanks for your reply. I have added your advice as content output.
But unfortunately, the error has not been fixed :-/.

My shortcode.php:

<?php

$class = ( ( '' == $text_align ) ? 'x-text' : 'x-text ' . $text_align ) . ' ' . esc_attr( $class );
$class = implode(' ', ['readmore', esc_attr( $class )]);

$containerAtts = cs_atts( array(
	'id' => $id,
	'class' => trim( $class ),
	'style' => $style
) );

?>

<div <?php echo $containerAtts; ?> >
  <?php echo $description; ?>
  <?php echo do_shortcode( wpautop( $description ) );  ?>
</div>

<script>
  jQuery(function($){
    $('.readmore').readmore();
  });
</script>

Other Ideas?
Many thanks in advance!

Hi there,

Would you mind providing the entire code (files) of that shortcode? All values should be returned to shortcode instead of echo. You’re basically echoing the output to the browser/ajax instead of returning to shortcode for further handling. I can’t verify any of it since the provided code is incomplete.

Thanks.