Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #634612

    No matter how hard I try, neither &nbsp; nor <br> tags are kept when used in the text editor.

    I’ve read in a closed thread in this forum that this would be addressed on a future update, but this was posted several versions ago. Is there ANY solution to this problem you can recommend?

    • This topic was modified 8 years, 6 months ago by GabrielSenn.
    #635091

    Hey GabrielSenn,

    I think you are adding the html tags in visual mode in the text editor? In that case WordPress will filter it out. On the text editor switch to text mode and try adding the html tags.

    If you still have any issue please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • the URL to the login screen
    • a valid username (with full administration capabilities)
    • as well as a password for that username
    • precise links where we can see the issue

    Best regards,
    Vinay

    #635429

    Hello Vinay,

    I run a few tests and sure enough, it is not something that happens all the time.

    I duplicated the page where it happens and called it TEST so that you can full around with it (just in that page, please)

    I have also made a movie so that you can see me doing the change and how it is not kept: http://dev2.mediabox.ca/test.mov

    The other info you requested under “Private Content” attached.

    #635447

    Hey!

    Please add the following to the functions.php file

    function allow_nbsp_in_tinymce( $mceInit ) {
    	$mceInit['entities'] = '160,nbsp,38,amp,60,lt,62,gt';	
    	return $mceInit;
    }
    add_filter( 'tiny_mce_before_init', 'allow_nbsp_in_tinymce' );

    let us know if that fixed your issues

    Regards,
    Basilis

    #635547

    Hello Basilis,

    I spend a few minutes trying that and it does not work.

    Now, I don’t mean to be rude, but you guys have asked me for admin rights and I gave them to you. I have even made a movie to show you the problem! Can you please test your propose solution before you ask me to do it? Otherwise we are just wasting time.

    PS. I do appreciate you are trying to help, but please don’t ask me to create an account and send you specific info and links to the problem if you are going to ignore the work.

    #635548

    PS. I will revert the changes to the php file to avoid future conflict.

    #635610

    Hi,

    Thank you for the video of the issue. The purpose of posting the code was i think the code will help others who are looking for solution :)

    I checked the issue and as mentioned earlier it is wordpress filtering the extra br and p tags automatically. i would go ahead and install this plugin but i need your permission .

    You can try and install this plugin https://wordpress.org/plugins/tinymce-advanced/ and in Settings > advance

    There should be an option to stop wordpress auto remove the tags.

    Best regards,
    Vinay

    #635622

    Hi Vinay,

    I will give the plugin a try and report the results. Thank you!

    #635623

    Hi,

    Thank you for the permission, I tried to install the plugin for you but the site is down for maintenance please let us know when we can access the site again.

    Best regards,
    Vinay

    #635661

    Hi Vinay,

    I fear the plugin does not do the trick. I can make another movie to show you if you like, but the results are identical whether I insert th code my hand or using the plugin :(

    #636488

    Hi,

    The wpautop is a default WP feature which prevents html tags like br and p tags from being added manually. They will be added automatically if necessary. If you really like to add the br tags manually, add a custom class attribute to it.

    Click here to add your own text]
    <br class="someclass" />Click here to add your own text]
    <br class="someclass" />Click here to add your own text]
    <br class="someclass" />Click here to add your own text]
    

    Best regards,
    Ismael

    #636517

    I see Ismael. That would make sense, but what gets me is that WP is not handling it consistently. Some times the BRs stick and sometimes they don’t (same with the non-braking-space).

    Yes, using a random class works. Thank you!

    #637274

    Hi,

    Glad it is working. :)

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.