Support » Fixing WordPress » When edit pages it messes it all up.

  • Hi all,

    When I edit my page, click Save. The page appears ok. When I click edit and save again, it slams everything on the page together. When I look at the code, it has thrown out all the and . So I have to go add them by hand. How do I get the page to stop throwing the tags and slamming everything together?

    I have tried <div> but that doesn’t give me the space in between the lines like I want.

    Thank you for the help. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • If you are comfortable just using html, turn off
    Use the visual rich editor when writing
    In your profile options.

    If not comfy with html, then the TinyMCE scripts have to be edited.

    I’m currently working on editing mine and will post more when I’ve tested it out.

    Until then, I’m using this page Configuration reference as reference to edit the /wp-includes/js/tinymce/tiny_mce.js file.

    You’ll edit the file around line 90 after the comment // Set default values on settings

    But, I’m not sure of the relationship between the tiny_mce.js file and the tiny_mce_gzip.php file b/c the tiny_mce_gzip.php has similar variables and is heavily edited to work with WP.

    Thread Starter grmweb

    (@grmweb)

    Thanks! I’ll give it a try. 🙂

    Thread Starter grmweb

    (@grmweb)

    Well I tried the visual rich editor and for some reason it still kicked the p tags. ( And I probably have the wrong idea of what you mean) Plus I would be more comfortable using the editor and so would my boss when he adds to the page. 🙂

    I am trying to change the Tiny_MCE file as you mentioned, but my knowledge of java and php is very limited ( I am working to change this). What exactly do I change? I don’t want to mistep and have a huge problem. 🙂

    Thank you for your help. I really appreciate it. 🙂

    wysiwyg editor is rather buggy. I’m looking into using fckeditor, myself.

    D.

    Thread Starter grmweb

    (@grmweb)

    Sorry to be daft. How do I use the fckeditor?

    Thank you. 🙂

    Go check out EditorMonkey at http://www.rajprasad.net/plugins/editormonkey/

    This is a WP plugin that comes with the latest TinyMCE release as well as FCKEditor. Be sure to grab the 2.5 version. with 3.0 the plugin is being split into a TinyMCE version and a FCKEditor version.

    I also tried Editor Monkey and Advanced WSYIWG plugins and both didn’t play nice witht the Image Manager plugin I’m using. Which uses, Owen Winkler’s Buttonsnap functionality to add additional buttons to the RTE and non-RTE.

    So, I edited the tiny_mce_gzip.php file that I mentioned above. It seems to overide the tiny_mce.js file.
    So far so good. I also created a small plugin to add additional functionality to the default TinyMCE editor, ie, colors, font families, etc.

    Following are the edits I made in tiny_mce_gzip.php to try to solve the bad handling of br and p elements.(I made the same edits in tiny_mce.js)
    In Bold:
    initArray = {
    mode : "specific_textareas",
    textarea_trigger : "title",
    width : "100%",
    theme : "advanced",
    theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>",
    theme_advanced_buttons2 : "<?php echo $mce_buttons_2; ?>",
    theme_advanced_buttons3 : "<?php echo $mce_buttons_3; ?>",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_path_location : "bottom",
    theme_advanced_resizing : true,
    browsers : "<?php echo $mce_browsers; ?>",
    dialog_type : "modal",
    theme_advanced_resize_horizontal : false,
    entity_encoding : "raw",
    relative_urls : false,
    remove_script_host : false,
    <strong>force_p_newlines : false,
    force_br_newlines : false,
    convert_newlines_to_brs : false,
    remove_linebreaks : false,</strong>
    save_callback : "wp_save_callback",
    document_base_url : "<?php echo trailingslashit(get_bloginfo('home')); ?>",

    I also modified the
    else // Use a much smaller set
    $valid_elements =

    around line 120, because it seemed that the changes I made to the full list didn’t help.
    (You’ll see a very lengthy list of elements located around line 113)
    // Set up init variables
    if ( current_user_can('unfiltered_html') ) // Use the full XHTML set provided in the docs
    $valid_elements =

    Here’s a text file that can be downloaded that shows the elments I used. It’s too lengthy to post here. http://mainewebworks.com/wordpress/TinyMCE_valid_elements.htm

    I used the same list of elements in the tiny_mce.js.

    I’m not sure if this will completely solve your problem, but it helped to prevent
    closing tags overwriting the tags I hand coded.

    Thread Starter grmweb

    (@grmweb)

    Thank you. When I get a chance, I’ll try it out. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘When edit pages it messes it all up.’ is closed to new replies.