Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2024-11-17 08:57:42

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: Should an article preview parse 'txp:' tags?

phiw13 wrote #338250:

Yes, metaKey works as expected (with e.PrevenDefault… else Safari would not like it I think).

I don’t think you need to do much more.

I don’t like preventing defaults in such cases, a dedicated trigger would be better. But let it be.

Your sample <txp:php /> block collapses as indicated, as do all the other <txp:…/>, one liners such as <txp:image id=“xx” />or multi-line blocks. I would certainly not hide them completely, else what is the point of previewing with sanitising?

One-liners can be very long, and blocks might need to be previewed too. But

  1. They get a title with the full code for a quick glance
  2. You can fold/unfold them individually, still with ctrl/cmd+click.

Offline

#17 2024-11-17 09:29:00

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,637
Website

Re: Should an article preview parse 'txp:' tags?

etc wrote #338256:

One-liners can be very long, and blocks might need to be previewed too. But

  1. They get a title with the full code for a quick glance
  2. You can fold/unfold them individually, still with ctrl/cmd+click.

I wasn’t referring to collapsing or not collapsing but you mentioning fully hiding with some CSS (part which I accidentally deleted from the quoted text).

You can (un)fold them individually ? I will need to test that… that might be much more useful than folding everything at once.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#18 2024-11-17 09:53:18

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: Should an article preview parse 'txp:' tags?

phiw13 wrote #338259:

I wasn’t referring to collapsing or not collapsing but you mentioning fully hiding with some CSS (part which I accidentally deleted from the quoted text).

That’s what I have understood later, sorry.

You can (un)fold them individually ? I will need to test that… that might be much more useful than folding everything at once.

Unless Safari intervenes :-)

Offline

#19 2024-11-17 09:59:10

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,637
Website

Re: Should an article preview parse 'txp:' tags?

etc wrote #338261:

Unless Safari intervenes :-)

Safari does what is asked: fold a 3 line <txp:php>…</txp:php> into a short <txp:php…>.

Last edited by phiw13 (2024-11-17 09:59:26)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB