Remove p tags from around images pulse3

Hello,
I have been searching for this topic, because I thought this was already discussed, but I can’t find it…
So I post it again. Is there a way to remove those p tags whenever you upload an image? I have been looking at plupload.php line 396…
Would be graet if anyone has the solution to this!
Thanks!
Mary

If I am correct information Redactor 10.2.5 is OK.
See the website:
https://github.com/search?utf8=✓&q=redactor.
Probably appropriate link:
https://github.com/yiiext/imperavi-redactor-widget.

You can also look Redactor2: Search Redactor2

…>>> Can config to disable auto add paragraph on blocks

Redactor Help

See also other sites.
https://www.modmore.com/extras/redactor/documentation/configuration/#denied+tags
Paragraphy:
When enabled, all stuff will be put inside<p> tags (paragraphs). Note that if you enable the Linebreaks setting, the paragraphy mode will be disabled.

1 Like

Thanks! I already downloaded redactor.min.js 10.2.5, and set
linebreaks to true.
Now I wanted to test it om my own testpulse, but somehow I can’t get in anymore…so I have to find another way to test this out…:sob: What the … did I do wrong…

Hi Mary,

I had the same requirement since the extra <p> and </p> were causing thumbnail misalignment on my blog list page.

My simple solution was to get rid of<p> and</p> from the thumbnail before showing it. This can be done in /inc/blog.php:

$thumbnail = $lines[4];
$thumbnail=str_ireplace('<p>','',$thumbnail);
$thumbnail=str_ireplace('</p>','',$thumbnail);
$lines[4] = $thumbnail;

Put those lines before this line:

$lines = array_slice($lines,3);

Hope this helps.
Judhi P

3 Likes

This topic was automatically closed after 2 hours. New replies are no longer allowed.