Load the_editor in Single Pages
-
Hello,
I have an article directory that uses wordpress.
Before I used (the_editor) to load the visual editor for the users but it’s not working properly.
I loads the editor but the tabs “Visual” and “HTML” do not work then I click on them. Also the “Add media” buttons do not work
here is my code:
<script src="<?php echo get_bloginfo('wpurl'); ?>/wp-admin/load-scripts.php?c=1&load=jquery,utils,editor,quicktags"></script> <?php if ($options['show_editor'] == '1') { ?> <script>window.onload = function() { document.getElementById('quicktags').style.display = '<?php if ($options["default_editor"] == "html") echo "block"; else echo "none"; ?>'; }</script> <?php wp_print_scripts('quicktags'); require_once(ABSPATH . '/wp-admin/includes/post.php'); function richedit() { return true; } add_filter('user_can_richedit', 'richedit'); wp_tiny_mce( false, array( 'height' => '370' ) ); if ($options['default_editor'] == 'html') { add_filter( 'wp_default_editor', create_function('', 'return "html";') ); } else { add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') ); } the_editor($_POST['post'], 'post' , '', false); } else { echo '<style type="text/css">#quicktags {display:none}</style>'; the_editor($_POST['post'], 'post' , '', false); } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Load the_editor in Single Pages’ is closed to new replies.