Skip Navigation

[Closed] Using several wysiwyg fields but these do not accept p tags

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 10 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

This topic contains 21 replies, has 5 voices.

Last updated by katrina 10 years, 1 month ago.

Assisted by: Srdjan.

Author
Posts
#192719

Hi

i Have created several wysiwig fields in wp types

all is working great , except the fact that when i type text into these fields all p tags seem to get stripped out...

The default wordpress wysiwig field does not have this problem, just the wysiwyg fields created by types

all other tags seem to work fine like h2, h3, h4

Just not the P

when i manually type the p tags (and same goes for <br> tags upon saving these are lost

How can that be fixed so that when i type a paragraph the p tags are automatically added, just like default wordpress?

Hope you can help as i have searched the internet but couldn't find a clear solution

#192732

Dear Carlo,

Do you mean in this area e.g.?

Keuken
Argentijns, grill

Openingstijden
Dinsdag t/m Zondag van 11.30 - 22.00 uur Maandag gesloten

Gemiddelde menuprijs
€ 18,95

Can you attach an image showing the edit post page?

Please enable the debugging mode as well and let me know if you can see some error: wp-types.com/documentation/user-guides/debugging-types-and-views/

We also need to know if there is some compatibility problem, try to disable all plugins except Toolset and choose a default wordpress theme.

#192771
Schermafbeelding 2014-01-29 om 17.32.36.png
Schermafbeelding 2014-01-29 om 17.25.15.png
Schermafbeelding 2014-01-29 om 17.07.03.png
Schermafbeelding 2014-01-29 om 17.06.41.png

Hi Adriano

I also send you a reply by mail, but maybe that's not the correct way to respond, so here it is again

Yep that's what i meant...

i have disabled all plugins (i have only 3 + types) , went back to default theme, used the debugging (nothing came up) and problem stays the same

I just updated to the latest version for which the update message just came in my WP install

still the same

some screenshots to show that although paragraph is selected, there are no p tags not in text and not when checking elements (in chrome)

when i manually add the p tags, which should not be necessary as the default wordpress doesn't need it either and i save and check back they are gone

in the last image (schermafbeelding 2014-01-29 om 17.32.36.png i show you that the p tags from the default wordpress wysiwyg editor are present

Hope there is a solution

cheers carlo

#192818

Dear Carlo,

Unfortunatelly I can not reproduce it on my localhost, all of my pugins are up to date.

I would ask you to reproduce it in a Discover site (discover-wp.com), and share credentials with me.

#192824

i'll see if i can manage to do that... i'm not a coder or something it's just that p tags and br tags get stripped...

when you are enabled to use a wysiwyg editor and you want to add a paragraph you should be able to do so no? 😉

I have searched a bit more and more people seem to experience this issue

seems to have something to do with TinyMCE? and wpautop() not being executed for these fields

i read a solution somewhere but don't know how i should change that to the types variation since that was for another plugin which has same issues

**** this was one answer:

apply_filters('the_content', get_post_meta($ID, 'text', true))

***** this was another answer

Guys, guys... there's a simple fix, no need for bug tracking, modular core, global settings etc...

just apply filters in the template when you print the_content
<?php print apply_filters('the_content',get_custom_field('clientCustomWysiwygEditor')); ?>

The real question is why this wasn't this added to the sample templates in "CCTM" ages ago?

What do you think?

#193014

I have the same problem.
It seems this started happening when I updated to 1.5.3 but, I can't be certain about that.
Quite annoying.

Jeff

#193146

It certainly is annoying

I just found out that when i would use "left align" (alt+shift+l) for the text parts that need to be paragraphs, the p tags ARE added...

unfortunately this means inline styling which is not so great as each p tag gets : style="text-align: left;"

It's just not good that this problem exists and even worse that there seems not to be a solution or something...

#193149

i also read this post here on Toolset forum:

*************

After reading the API a few times and trying several arrays values. I found out my problem. I was echoing the field like this: "raw"=>"true", "output"=>"html"

Then I tried just "output"=>"html" by it's self and it worked. Sorry I'm a newbie! I hope this can help someone else!

The types plugin is amazing! Thanks!

******************

I'd like to try this, but where would i need to put this?

#193582

Dear Carlov,
I tested and cannot see any different behavior between Types WYSIWYG and WP editor
when editing text in post edit screen.
Also when rendered using shortcode - looks fine.

About RAW and OUTPUT parameters:
[types field="editor" raw="true"][/types] - will not use wpautop() and other content filters
[types field="editor"][/types] - will render with wpautop(), other content filters applied and filtering from other plugins
[types field="editor" output="html"][/types] - same as above AND wrapped output like in old Types versions
[types field="editor" suppress_filters="true"][/types] - will use wpautop() and other DEFAULT WP content filters BUT no filtering from other plugins

Tell me if this helps.

#194114

"I tested and cannot see any different behavior between Types WYSIWYG and WP editor"

Well good for you, but i still keep having this problem... when i enter the text in the text window of wysiwyg field of types custom field i can add p tags and they are there when it is saved, but if i switch to wysiwyg the p tags are gone

This problem is NOT with the wordpress text editor, only with the types editors

so the problem exists already when typing the text in the editor.

the parameters don't work for me, maybe i'm using it in the wrong spot?

i have kinda solved my problem by putting the whole field in a div and set a padding for that so i have my left space...

Still i feel it's a shortcoming of the otherwise fabulous plugin... and i hope it will be resolved in the future

#194287

Sorry if I'm missing something, at all tests we performed
WP editor removes [P] tags when switching from 'Text' to 'Visual'.
Same as WYSIWYG. Default settings for both WP editor and WYSIWYG are used.
Types WYSIWYG field uses same settings and calls as default WP editor.

Is there possibility that some of settings are different at your WP installation?

#194323

Hi,

I just use the default settings and i do not have any custom php which might interfere

And correct... wp editor also removes the p tags when switching

BUT

when you check the site in the browser than you can see that the text entered in the wp editor still has the (p) tags whilst the text entered in the types wysiwyg edito has NO (p) tags

So that's why i turned to you guys, because i would really like it to work out as it should

#194564

I still have the same problem as carlov.
I have spent more than 4 hours on this problem and I am about to give up on Toolset altogether. I was supposed to release a beta last Friday and this and another Types problem is holding me up.

Earlier today, I tried it on a fresh WP install and had the same problem.

Jeff Safire
Director,
IEEE - CNSV
------------

#195815

Dear Carlov,
can you please explain this:
'when you check the site in the browser than you can see that the text entered in the wp editor still has the (p) tags whilst the text entered in the types wysiwyg edito has NO (p) tags'.
I'm not sure that I understand how to check that.
Thank you.

@jeff
Dear Jeff, I do not want to encourage you to 'hijack' Carlov's topic,
but please if you can explain how to check this issue and describe what is exactly error,
and how to re-produce it - please do so.

#196127

well let's say you open the site in google chrome

when you scroll down you see 3 custom posts... choose the 1st one since that contains all completed fields on detail page

it brings you to this page: hidden link

when you scroll down a bit at left side there is 3 sections (over 'about' , algemeen 'general' , faciliteiten 'facilities')

the 1st one 'about' is created in default wp editor, the other 2 in Types wysiwyg fields

when you right click in each field you can select from popup chrome : inspect element

if you do so you can see in the inspector that the default wp part text has p tags and the types wysiwyg text has not

The topic ‘[Closed] Using several wysiwyg fields but these do not accept p tags’ is closed to new replies.