By Ian Shere on Monday, 03 December 2018
Posted in General Issues
Replies 10
Likes 0
Views 497
Votes 0
When using truncation, I understand that the editor strips out HTML to stop there being problems with formatting should a tag get broken during truncation. However, this has a major downside where the truncated text consists of 2 or more paragraphs. You end up with one tun on sentence that is just ugly and not always nice to read.

I understand the why it's done, but we're using computers and code! Surely you can write the code to truncate at [xx] characters except where there's a tag and then include/exclude the tag in the truncation (depending on whether it's an opening or closing tag.

Both the entries on this page suffer from this problem - https://www.norcalpulse.com/redding/blog - the blog is set to use the built-in editor, not JCE.
Hi Ian,
Surely you can write the code to truncate at [xx] characters except where there's a tag and then include/exclude the tag in the truncation (depending on whether it's an opening or closing tag.
It may sound like a simple checking but its just not possible to do that sort of checking currently, we would do it if we know of a way to do this. Not to mention the processing power it takes to do this kind of checking for example on huge posts, which would definitely slow down the performance on the page.

I believe I mentioned using the readmore block before. This block is useful because the content can be separated on individual post basis. Is there a reason you are not using the readmore block?
·
Tuesday, 04 December 2018 11:58
·
0 Likes
·
0 Votes
·
0 Comments
·
The read more block is just another thing for the client to do. I try to make it as easy for clients to write blogs which is why I have the built-in editor always on. However, I understand some of the complexity of trying to compute where to cut off so I'm going to try to teach clients to use the read more.

However, there is one issue I've noticed with read more both having now tried it in EB but also in Joomla, so it may be a Joomla issue. When you click through to the full article the read more inserts an extra <p></p> or <br />. Essentially, from the intro text to the full text there are 2 carriage returns. Look at this test post - https://norcalpulse.com/redding/blog/test-post-using - the read more is between paragraphs 2 & 3 (see attachment). Why is this doing this?
·
Wednesday, 05 December 2018 00:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ian,

I'm not sure if this is a good method for your clients, basically you can create a post template which have a readmore block inside. That way, when the authors start a blog post in that post template, they will already notice the readmore block in case they forgot to add them(http://take.ms/xaNxL).

The spacing that you see is actually not extra p or br tags, but a css styling which is present at the bottom of all blocks(http://take.ms/GDsQX). Readmore does not have any visible content, which is why you are seeing it as an empty space.

If you want, it is possible to apply custom css to remove that margin-bottom from the readmore block specifically.
·
Wednesday, 05 December 2018 11:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Raymond. Yes, I'm going to do what you suggest. I already have a couple of templates that I have saved out which I import on each install already.

Thanks for the heads-up on the readmore padding - never expected this as it doesn't seem to make any sense having it there. I've seen cases where the introtext is in a different font or size, but never padding below it. I'll just add custom CSS to remove it - no reason for it to be there IMHO.

Thanks.
·
Friday, 07 December 2018 01:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright Ian and you're most welcome.

Regards.
·
Friday, 07 December 2018 10:55
·
0 Likes
·
0 Votes
·
0 Comments
·
I looked for the CSS rule to remove the padding but couldn't find it using "Inspect". Can you paste in the rule please so I can modify it?
·
Friday, 07 December 2018 23:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ian,

I am really sorry for the delay of this reply as it is a weekend for us here. May I know which element are you referring to here? Is it possible for you to provide me with a screen shot of the element that you are referring to?
·
Saturday, 08 December 2018 13:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ian,

You can use the following custom css. It will only affect the readmore block.

#eb .eb-entry-article .ebd-block[data-type="readmore"] {
margin-bottom: 0;
}
·
Monday, 10 December 2018 10:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post