Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Should an article preview parse 'txp:' tags?
etc wrote #338216:
I have added a Tester Egg, to fold/unfold sanitized elements and txp tags in text preview mode. Currently it works by
ctrl+click
onSanitize
button, replacing these elements with abbreviated versions.
Do I have to toggle some setting somewhere?
At present, absolutely nothing special happens with a ctrl+click
on the “sanitise button” – the default action is triggered: show the relevant context menu on both Safari and Firefox.
(I presume by “sanitise button” you mean the label
+ input type=checkbox
combo near the top of the Preview panel…)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Should an article preview parse 'txp:' tags?
No luck:
on a Mac, a click combined with the control key is intercepted by the operating system and used to open a context menu, so ctrlKey is not detectable on click events.
I guess metaKey
is more appropriate on Macs, will test.
Please try again, with ⌘
key.
Offline
Re: Should an article preview parse 'txp:' tags?
etc wrote #338241:
I guess
metaKey
is more appropriate on Macs, will test.Please try again, with
⌘
key.
Yes, metaKey
works as expected (with e.PrevenDefault
… else Safari would not like it I think).
etc wrote #338216:
[…] but it can certainly be improved UX-wise. Testers welcome.
I don’t think you need to do much more. 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?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Should an article preview parse 'txp:' tags?
phiw13 wrote #338250:
Yes,
metaKey
works as expected (withe.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
- They get a title with the full code for a quick glance
- You can fold/unfold them individually, still with ctrl/cmd+click.
Offline
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
- They get a title with the full code for a quick glance
- 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
Offline
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
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
Offline