Truncate content #1522
ethicalrevolution
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
Phew! I am not sure if it is a good idea to truncate HTML! There are so many things that could break if we would have to take care of the proper nesting of HTML, together with the correct character limits (including HTML elements). |
Beta Was this translation helpful? Give feedback.
0 replies
-
👍 *The goal being to not have long (standard sized) posts hidden behind buttons in certain clients. How about having an ‘IF’ option such as:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way we could set the max amount of characters to be displayed from the content of a post?
At present we can use [ap_excerpt length="400"] to control the length of an excerpt. Ideally I'd like to be able to do the same but with ap_content in place of ap_excerpt. This is because the excerpt strips all tags.
Most blog posts are too long for the standard character limit in Mastodon. Depending on the client/app a user is viewing from this can mean that the entire posts is hidden behind a button (see screenshot 1).
What I'd like to be able to achieve is for a longer post to truncate before the maximum Mastodon character limit so it never goes behind a button like this. When truncated a 'Read more' link to the post on the WP site would then appear. (See screenshot 2.)
Screenshot 1:

Screenshot 2:

Beta Was this translation helpful? Give feedback.
All reactions