Underground
2011-03-05T14:13:50Z
When you use the ckeditor bbcode and add an image, change the size and add a border, this is not used in the post. There only the image is added without the formatting the user did. Is this a known problem or do I something wrong (setting or so)?
My site containing the YAF forum: Globalcaching.eu 
Sponsor
tha_watcha
2011-03-05T14:25:39Z
In BBCode Mode you can only use image url and alt text
UserPostedImage
Underground
2011-03-05T14:29:44Z
Thanks for the quick reply.
The user can select the editor it wishes and it might be confusing to them. Anyway, I will set the HTML edition as default then.

I have to say: GREAT editors. And the option for the user to select the editor it pleases is also great!
Just curiuos...
You stick to the default YAF BBcode editor. Any reason why you don't switch to the CKEditor HTML?
Is there any disadventage that I have overlooked and that I might reconsider moving to the CKEditor HTML?

edit:
noticed that the HTML editors place the text between <p> </p>
This causes the text within the post to start with a huge amount of white space. Maybe the stylesheet can be adjusted for the <p> element.
(or remove the <p>)

I have no problem changing the .css files for this, but I am a no no regarding stylesheet. How should I change the p tag without affecting other <p> outside the posts? And how should I cange it so it won't result in rows of whitespace?
My site containing the YAF forum: Globalcaching.eu 
tha_watcha
2011-03-05T15:19:18Z
Quote:

The user can select the editor it wishes and it might be confusing to them.



I know i already customized the ckeditor as much as possible (For Example the YAF BBCode Selector). I have to modify the image dialog for that.

Quote:

You stick to the default YAF BBcode editor. Any reason why you don't switch to the CKEditor HTML?



What you mean with I stick to YAF BBCode, did you mean on this forum?

Quote:

noticed that the HTML editors place the text between <p> </p>
This causes the text within the post to start with a huge amount of white space. Maybe the stylesheet can be adjusted for the <p> element.



That cannot be removed its a feature of that editor
UserPostedImage
Underground
2011-03-05T15:32:04Z
Originally Posted by: tha_watcha 

What you mean with I stick to YAF BBCode, did you mean on this forum?


Yes. Any reason why YAF forum (so, this forum) is not switching to the more ritch ckeditor?


Originally Posted by: tha_watcha 

That cannot be removed its a feature of that editor


Well, it can, but you have to parse the result html (I do this for my site). But I won't suggest that for YAF, because it is an uggly way to go.
I will change the .css file then. But I was hoping someone can point me out in the right direction. I don't want to change all the <theme>.css files, so I want to change the forum.css file to alter the <p> tag. But this should only apply to the posts.
Any suggestion?
My site containing the YAF forum: Globalcaching.eu 
tha_watcha
2011-03-05T15:41:54Z
Quote:

Well, it can, but you have to parse the result html (I do this for my site). But I won't suggest that for YAF, because it is an uggly way to go.
I will change the .css file then. But I was hoping someone can point me out in the right direction. I don't want to change all the <theme>.css files, so I want to change the forum.css file to alter the <p> tag. But this should only apply to the posts.
Any suggestion?



Look at the html source.

The css selector should be


.yafnet .postdiv div div p {

}

UserPostedImage
Underground
2011-03-05T15:46:01Z
I did this:

.yafnet div.postdiv p{
	padding: 0px;
	margin-top: 0px;
}

I see in Chrome that it is applying this style, but the empty space is still there.
I will add the to div as you mentioned, but I guess the style shout be different.

edit:
changed to: .yafnet div.postdiv div div p
But how can I change it, so it would be treated the same as a <br />?

edit2:
I see what is happening. An extra <br /> is added before the <p>
This is not something I can resolve. Too bad.
This means an extra empty line is always there at the beginning of the post.
My site containing the YAF forum: Globalcaching.eu 
tha_watcha
2011-03-05T16:02:26Z
Try

.yafnet .postdiv div div p { 
 display:inline;
}

UserPostedImage
Underground
2011-03-05T16:08:26Z
I did,, but the problem cannot be solved within the .css I guess.
Because a <p> is always preceeded with a <br />
I have no idea why.
My site containing the YAF forum: Globalcaching.eu 
tha_watcha
2011-03-05T16:09:13Z
Ok i found a solution add this to the config.js inside the YAFROOT\editors\ckeditor


CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
	config.enterMode = CKEDITOR.ENTER_BR;
};

UserPostedImage
Underground
2011-03-05T16:15:44Z
strange, stil get the <p>
Might be the cache (.js cached) I will continu with this and report back the result.
So far, thanks for the great support!
My site containing the YAF forum: Globalcaching.eu 
Underground
2011-03-05T16:36:43Z
OK, it didn't work due to caching. Now I see that <p> is not used anymore.
However (oh oh...), an [enter] now results in 2 line breaks.
Does the average user know it has to hit <shift><enter> if it wants the next line just below the other without an empty space?

But other than that, your solution does the trick. Thanks!
My site containing the YAF forum: Globalcaching.eu 
Underground
2011-03-05T17:18:28Z
I did some searching on the internet regarding this extra <br> within the <p> (and the user doen not do that.)
See picture.

Also, some say they have solved it. I don't know if it is solved within the most recent version of the ckeditor, but can I just replace the ckeditor with a new version of it? Or has the YAF team made some custom changes?
Underground attached the following image(s):

My site containing the YAF forum: Globalcaching.eu 
tha_watcha
2011-03-05T18:52:43Z
Originally Posted by: Underground 

I did some searching on the internet regarding this extra <br> within the <p> (and the user doen not do that.)
See picture.

Also, some say they have solved it. I don't know if it is solved within the most recent version of the ckeditor, but can I just replace the ckeditor with a new version of it? Or has the YAF team made some custom changes?



You can update it, only the plugins are customized. But YAF already uses the latest version.

Strangly when i press enter i only getting one br as it should be.

UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved