-
AuthorPosts
-
May 18, 2016 at 4:19 pm #634612
No matter how hard I try, neither
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, 7 months ago by GabrielSenn.
May 19, 2016 at 10:10 am #635091Hey 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,
VinayMay 19, 2016 at 7:12 pm #635429Hello 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.
May 19, 2016 at 7:53 pm #635447Hey!
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,
BasilisMay 19, 2016 at 9:26 pm #635547Hello 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.
May 19, 2016 at 9:27 pm #635548PS. I will revert the changes to the php file to avoid future conflict.
May 20, 2016 at 12:09 am #635610Hi,
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,
VinayMay 20, 2016 at 2:19 am #635622Hi Vinay,
I will give the plugin a try and report the results. Thank you!
May 20, 2016 at 2:25 am #635623Hi,
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,
VinayMay 20, 2016 at 4:20 am #635661Hi 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 :(
May 23, 2016 at 3:41 am #636488Hi,
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,
IsmaelMay 23, 2016 at 4:38 am #636517I 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!
May 24, 2016 at 6:25 am #637274 -
AuthorPosts
- You must be logged in to reply to this topic.