Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(WYSIWYG Editor) Images without <p>
#1
Hello!

I have a problem.

I have to give the text on the page a padding of 10px.
On the head of the content part there is an image which should not get the padding.

So if I go in the editor, click source and delete the <p> and update then some text, the editor makes automatically a new <p> around it.

How to avoid that on images?

I had the idea to solve this problem with css, but it does not work:
Code:
#content p{
padding:10px;
}


#content p img{
padding:0px;
}

Please help me Smile

Thanks,
Martin


/edit:
Screenshot:
[Image: screenzf7b.png]
Reply
#2
I didn't try it myself, but I have found some ways out in Russian Inet, I guess it will help you out. As long as I understand it, you should manually change some lines in some files of the ckeditor

Do it at your own risk :-))
Then it might be useful for you to visit Drupal forums. Drupal guys bump into this problem as well, they could have solved the problem already
=====================

in fckconfig.js

FCKConfig.EnterMode = 'p' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br


change for

FCKConfig.EnterMode = 'br' ; // p | div | br
FCKConfig.ShiftEnterMode = 'p' ; // p | div | br

=========================================
Reply
#3
Just to add
if you use STRICT <!DOCTYPE> <img> tag must be enclosed into block-level elements like <p> or <div>.
Reply




Users browsing this thread: 1 Guest(s)