Jump to content

CKEditor unwrap inserted images


ngrmm
 Share

Recommended Posts

i am using CKEditor and want the design to be like the image below

is there a way to get rid auf the <p>-tag around ther inserted image and also keep the <p>-tag around the text?

<p>text</p>

<p><img></p>

<p>text</p>

to

<p></p>

<img>

<p></p>

post-3649-0-49774200-1438683291_thumb.pn

Link to comment
Share on other sites

I think your solution is the best option here. You could also add a class to that <p> instead and use it in your advantage on the css:

$('p img').parent().addClass('image-inside');

--

.image-inside {
    display: inline;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...