I just posted a response to an inquiry in SoPW and forgot to include the post-tag </readmore> in my response. Hence, all of the code in my example ended up polluting my posted response.

I always use the "preview"...usually multiple times...before posting to ensure, like all good Monk guidance recommends, that what I am posting is really what I intended.

However, the <readmore> pre- and post-tags do not show in the preview, so I don't know how I can check to be sure that I got the tags balanced, and that when I use the pre-tag <readmore title="blah blah blah..."> That I didn't misspell or mistype the title portion.

Is there a way to have "preview" do a real preview?

ack Albuquerque, NM

Replies are listed 'Best First'.
Re: "readmore" tags in "preview"
by alexm (Chaplain) on Aug 17, 2009 at 19:05 UTC

    I find the following options from the Display Settings nodelet quite useful:

    • Enforce proper nesting of HTML: checked
    • HTML error reporting level: 3
    • HTML error reporting during Preview: 4

      Thanks, alexm, I'll try that.

      ack Albuquerque, NM
Re: "readmore" tags in "preview"
by ikegami (Patriarch) on Aug 17, 2009 at 18:25 UTC

    The effect of readmore tags *is* visible in preview. I believe readmore text shows in a grey background by default. You can always adjust your personal style if you want something else.

    Is there a way to have "preview" do a real preview?

    When viewing a node with readmore tags, the contents of the readmore *are* showed. Same goes for preview. I guess you want a *fake* preview of some sort. Any suggestions?

    and that when I use the pre-tag <readmore title="blah blah blah..."> That I didn't misspell or mistype the title portion.

    Well, you could look in the text box. My problem is that I always forget the name of the attribute.

      Thanks, ikegami, for your reply. I really appreciate it.

      For reasons I'm not entirely sure of, the <readmore> text in my "preview" does not show any signs of "different" formatting (e.g., grey background). Hence, for example in my post to SoPW where I forgot the post-tag </readmore>, there was nothing that gave me any clue in the "preview" that I'd made that mistake. All the text looks the same whether I have <readmore> tags or not.

      When I inquired Is there a way to have "preview" do a real preview? I was simply meaning that it would be nice if the "preview" showed exactly what would appear in the post...e.g, <readmore> tags would be collapsed, exacly like it would appear in the final, created, post.

      Unfortunately, of course, I think it would probably be too complex and cumbersome to be able to click on the collapsed <readmore> and get it to expand like it does in the posted version.

      So I guess the way it works today is probably the best solution. The only other thing I can think of would be some sort of "preview" choice that would either "show" or "not show" the collapsed version of what one wrote. That would be, IMHO, a lot of extra extra work and complexity that just isn't really worth it.

      Having the text in the <readmore> look "different" (e.g, different color or whatever) between the <readmore> tags as it is implemented today and as ikegami suggested in his response, is probably the best solution.

      Now if I could just get my "preview" to show such text as "different". Thanks, again, ikegami.

      ack Albuquerque, NM

        For reasons I'm not entirely sure of, the <readmore> text in my "preview" does not show any signs of "different" formatting

        I logged out and previewed a post containing the following:

        foo <readmore> bar </readmore> baz

        "bar" had a (very) light grey background. You have changed to a theme that doesn't do that, your personal CSS overrides it, or your monitor's calibration is off.

        I was simply meaning that it would be nice if the "preview" showed exactly what would appear in the post.

        Again, it already does that, ...

        e.g, <readmore> tags would be collapsed,

        ...readmore sections are expanded (not collapsed) when you view a post with readmore tags. Readmore secions are collapsed when embedding the post in another post.

        Now if I could just get my "preview" to show such text as "different".

        I think I mentioned you could change your personal CSS. Specifically, do something with the "readmore" CSS class.

        .readmore { border: solid red 0.5em; }