in reply to Re: Functionality to automatically insert <readmore> tags into long posts?
in thread Functionality to automatically insert <readmore> tags into long posts?

I already thought of this, but it's only possible with linear text without nested html structures.

For instance you can't easily break a code-section just somewhere in the middle.

In consequence we are back to the original problem, namely to parse the doc-tree of the post and to decide where to automagically put readmore-tags around.

I thinks it's easier just to count the lines and to force the poster to include <readmore> tags.

OTOH since I'm not motivated to code it, I don't ask others to do it.

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re^2: Functionality to automatically insert <readmore> tags into long posts?
  • Download Code

Replies are listed 'Best First'.
Re^3: Functionality to automatically insert <readmore> tags into long posts?
by Anonymous Monk on Jul 24, 2013 at 03:56 UTC

    I already thought of this, but it's only possible with linear text without nested html structures.

    Huh? I think you're over thinking this, its 100% javascript

    $("tr[@class='reply-body pmnote-708738']/td[@class='reply-body']").hei +ght(200);

    Add a show/hide from one of these Re: Collapsible comments, toggleDisplay

      You're hidding the complete post.

      The idea of the readmore-mechanism is to have a preview of the entry ("readsome lines") before the rest is hidden with "readmore".

      Cheers Rolf

      ( addicted to the Perl Programming Language)

        You're hidding the complete post.

        No, 200px height of post is shown, cause thats exactly what sundialsvc4 described, it doesn't matter whether there is nesting or anything and no actual readmore tags need to be added -- and and its only temporary, fully reversible/togglable