Mariette
  • Posts: 63
  • Joined: 07/06/2004
Hello,
When I enter some text a <br> is always entered between paragraphs like this:

<div id="117" class="selectionQuoteable"><p>Euismod atras vulputate iltricies etri elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla nunc dui, tristique in semper vel, congue sed ligula. Nam dolor ligula, faucibus id sodales in, auctor fringilla libero. Pellentesque pellentesque tempor tellus eget hendrerit. Morbi id aliquam ligula. Aliquam id dui sem. Proin rhoncus consequat nisl, eu ornare mauris tincidunt vitae. [...]</p><br>
<p>Euismod atras vulputate iltricies etri elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla nunc dui, tristique in semper vel, congue sed ligula. Nam dolor ligula, faucibus id sodales in, auctor fringilla libero. Pellentesque pellentesque tempor tellus eget hendrerit. Morbi id aliquam ligula. Aliquam id dui sem. Proin rhoncus consequat nisl, eu ornare mauris tincidunt vitae. [...] </p></div>


Where does the extra BR come from and what can I do to prevent this from happening
MJK
Sponsor
Ordinary Nimda
  • Posts: 37
  • Joined: 08/02/2016
There is another "not so cool" bug in this part of the forum. If you use any of the standard skins (Themes), there will always be smaller text (using a smaller font), when you quote somebody, than when you don't quote. Mitigation to this is this: when you quote, you should press ENTER before you write your text. Then the <p></p> section will be applied properly, resulting in the proper rendering of the font.

I suspect such errors, including your complaint, is done by JavaScript code in the editor, so there's the place to look, if you have the time & nerves of steel. 😃
Mariette
  • Posts: 63
  • Joined: 07/06/2004
You can make nice quotes with CSS and with tinymcs the trouble with extra line breaks is gone.

165

166
MJK
Ordinary Nimda
  • Posts: 37
  • Joined: 08/02/2016
I agree, CSS offers mighty functionality, and I am doing this also on my current web.

But the "bug" in the JavaScript code output is still there. If you Quote, and then immediately start typing, and SAVE, and then check the output HTML source code in the browser, you will se an empty <p></p> section, followed by the text you entered. If you do NOT quote, your text is inside the <p></p> section, as is expected. Your example looks really neat, but what you did here is a work-around, and might not look beautiful in all sorts of browsers. 🙂

Mariette
  • Posts: 63
  • Joined: 07/06/2004
It works in any browser. Just tested it
MJK
Ordinary Nimda
  • Posts: 37
  • Joined: 08/02/2016
Very good. Quality fiddling with CSS is an art in its own right! 🙂

So what did you do, just put the whole quote plus reply text in a <p></p> wrapper?
Ordinary Nimda
  • Posts: 37
  • Joined: 08/02/2016
Originally Posted by: Mariette

It works in any browser. Just tested it


I think you are right!

I just tried the newest TinyMCE editor, and it works in YAF, as expected. However, it has the same problem -- when Quoting and replying immediately. Without a line-break before typing, the text in the pages is smaller, than normal. So, now I finally believe you, this is a problem, which is outside of the editor, somewhere in YAF proper. Will get there in a day, and if not, in a week. :D

Mariette
  • Posts: 63
  • Joined: 07/06/2004
Yes, this extra br is a problem for any editor except the BBeditor. Ingo, how can I help with this? Should I put this problem in Github?
MJK
tha_watcha
  • Posts: 4108
  • Joined: 06/03/2010
Originally Posted by: Mariette

Yes, this extra br is a problem for any editor except the BBeditor. Ingo, how can I help with this? Should I put this problem in Github?



Ok i try to reproduce this as soon as i have time. i understand correctly this issue occurs with the CKEditor Provider and also when use the CKEditor Html. and next you enter to paragraphs there is one extra br tag?
UserPostedImage
Mariette
  • Posts: 63
  • Joined: 07/06/2004
Yes, it ads one <br>. If you need access to my site let me know and i'll set something up for you. Good to see that more DNN users jump on the YAF train now and that only after my message in the closed Facebook group 🙄
MJK
Ordinary Nimda
  • Posts: 37
  • Joined: 08/02/2016
Yes! Getting rid of that extra <br/> after each <p></p> would be just great.

PS.
I did manage to hack the CSSs enough, so all the font sizes are now the same, if the text is in <div class=selectionQuotable>, or if it is enclosed a level deeper inside a <p>. The extra <br/> however cannot be masked over by CSS styles, because one never knows, if a user pressed <br/>, or it came from the engine itself.:)

EDIT:
The unneeded <br/> is in the quoted section also, and there seems to be some invalid HTML (interweaved tags). I have a quick demo, if this is not well known...
tha_watcha
  • Posts: 4108
  • Joined: 06/03/2010
Ok this issue will be fixed in 2.2.3. We are getting close to the release of 2.2.3
UserPostedImage
Mariette
  • Posts: 63
  • Joined: 07/06/2004
Wonderful! Thanks Ingo
MJK
Mariette
  • Posts: 63
  • Joined: 07/06/2004
In 2.2.3 it seems fixed if you set editor to TinyMCE, CKEditor or the default DNN editor but as soon as you switch to the default BBeditor all p or br are stripped out...

Strange
MJK
Ordinary Nimda
  • Posts: 37
  • Joined: 08/02/2016
There are other strangeities. I noticed, that the default DNN Editor does not always generate <a href /> around a http or https URL in the text, whereas the BB Editor does (always). And this is probably not solveable in a simple and unique way.
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

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