Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2020-04-28 09:23:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,796
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

etc wrote #322733:

If needed, we could add textile format for images insertion. This would enable their admin-side ‘in article’ previewing.

*drools* Yes! Could that be an option somehow? Not sure how, without complicating the plugin or adding prefs. Note to self: add the ability to parse Textile-inserted images into smd_imagery.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#32 2020-04-28 10:04:41

etc
Developer
Registered: 2010-11-11
Posts: 3,940
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Bloke wrote #322735:

drools Yes! Could that be an option somehow? Not sure how, without complicating the plugin or adding prefs.

It actually already has two prefs (named abc_file, dunno why): the number of selectable images on the side bar (12) and the image(s) insertion format, like e.g. <txp:image id="{#}" />. Here {#} will be replaced with the inserted image id, and {##} with the list of ids. It looks straightforward to add some !#! format and treat it as textile link.

Offline

#33 2020-04-28 12:13:31

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,396
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Regarding the dropdown for selecting a heading level – you know we have jQuery UI controlgroup already, right? Basically designed for exactly this kind of widget…

design-patterns.textpattern.com/docs/#ui-doc-jquery-ui—controlgroup

I’ve already converted the plugin to use the CSS from controlgroup and pull-requested back to your repo. It wouldn’t be a great stretch to do the dropdown.

Offline

#34 2020-04-28 15:15:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,796
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

philwareham wrote #322737:

Regarding the dropdown for selecting a heading level – you know we have jQuery UI controlgroup already, right?

I instantiated one yesterday in my dev code, but it looked like the search widget. Probably because I copied the markup from the search box and kept the txp-search-options class. Looking at the design pattern, it seems there are no specific override classes in Txp for this grouping, so maybe if I remove that search class it’ll just work and I can style the dropdown to suit. Seems perfect, thank you.

And thanks a tonne for the PR. I’ll merge that with my current dev version and go from there.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#35 2020-05-02 13:50:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,796
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

This commit adds the ability to choose a starting point for the Form insertion button. Pick one of your forms from the dropdown and then each click will cycle from that point forward. This means if you use a form often, you can preset the widget to start from there.

It also uses the new widgets proposed by Phil, which improves dark mode support.

Things to do:

  1. Store the selected form so it remembers next time you use an article.
  2. Possibly truncate the form names if they are long.
  3. Do a similar kind of dropdown affair (perhaps) for the heading Hx button ‘start point’, or use a straight dropdown.
  4. Fold in some more changes to tweak the look of the toolbar.

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#36 2020-05-03 12:09:16

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,147
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Bloke wrote #322794:

… adds the ability to choose a starting point for the Form insertion button. Pick one of your forms from the dropdown and then each click will cycle from that point forward. This means if you use a form often, you can preset the widget to start from there.

Does that select widget construct for forms need to be in a nested ui-controlgroup ? I am a bit worried how that behaves as far as accessibility is concerned (nested role=toolbar and so on).
That said it is certainly much more useable than the previous implementation. So that is a huge improvement.


Where is that emoji for a solar powered submarine when you need it ?

Online

#37 2020-05-03 12:19:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,796
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

phiw13 wrote #322801:

Does that select widget construct for forms need to be in a nested ui-controlgroup ?

Honestly I don’t know. To set up a related group of icons, I call some jquery ui combobox() function and it adds all the class junk to it. Maybe the extra HTML furniture is not required.

If we can get away without it, great. It would also fix those silly extra rounded corners too. More investigation will be conducted. Thanks for testing. Glad it’s at least a half step up.

Last edited by Bloke (2020-05-03 12:24:15)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#38 2020-05-21 12:58:58

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 35

Re: smd_textile_bar: Simple Textile insertion for the Write panel

When you press the header or block quote, block code buttons, the curser jumps 2 lines further down after placing the textile code.

Not sure, why that is.

Offline

#39 2020-05-21 13:08:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,796
Website

Re: smd_textile_bar: Simple Textile insertion for the Write panel

marios2 wrote #323094:

When you press the header or block quote, block code buttons, the curser jumps 2 lines further down after placing the textile code.

I’ve noticed this. It only does it if you use it on its own line. If you go back and place the cursor on the line that already contains (e.g.) a header and click one of the buttons, the cursor stays where it should be.

Honestly can’t see a reason why it should jump and it was on my list of things to figure out in the JavaScript, along with finding a way of moving the cursor ‘between’ the markup symbols when you click bold, italic, superscript, etc and don’t have a selection already.

Last edited by Bloke (2020-05-21 13:09:31)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#40 2020-05-21 13:15:12

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 35

Re: smd_textile_bar: Simple Textile insertion for the Write panel

Bloke wrote #323095:

I’ve noticed this. It only does it if you use it on its own line. If you go back and place the cursor on the line that already contains (e.g.) a header and click one of the buttons, the cursor stays where it should be.

Honestly can’t see a reason why it should jump and it was on my list of things to figure out in the JavaScript, along with finding a way of moving the cursor ‘between’ the markup symbols when you click bold, italic, superscript, etc and don’t have a selection already.

Oh, … I see, Javascript again.

Offline

Board footer

Powered by FluxBB