Text editor strips formatting and styling
-
I’m using frontend text editor for front end submission.
I have setup tinyMCE, and visual editor appears good, with all the buttons I wanted. But when I input text and make it BOLD or anything else, when I echo that content on another page, it is shown as plain text, without any formatting.
This is the code I use at add post page:<?php $settings = array( 'wpautop' => false, 'postContent' => 'content', 'media_buttons' => false, 'editor_css' => '<style>.mceToolba { background-color: #faf9f4; padding: 5px; }</style>', 'tinymce' => array( 'toolbar1' => 'bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,justifyleft,justifycenter,justifyright,undo,redo,link,unlink,fullscreen', 'toolbar2' => 'pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo', 'toolbar3' => '', 'toolbar4' => '' ), 'quicktags' => false ); wp_editor( $postContent, 'postContent', $settings ); ?>
and this one on view page to echo that content:
<?php echo the_content(); ?>
What am I doing wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Text editor strips formatting and styling’ is closed to new replies.