Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_textile_bar: Simple Textile insertion for the Write panel
etc wrote #322733:
If needed, we could add
textileformat 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.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
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
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
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.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
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:
- Store the selected form so it remembers next time you use an article.
- Possibly truncate the form names if they are long.
- Do a similar kind of dropdown affair (perhaps) for the heading Hx button ‘start point’, or use a straight dropdown.
- 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.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
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 ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: smd_textile_bar: Simple Textile insertion for the Write panel
phiw13 wrote #322801:
Does that
selectwidget construct for forms need to be in a nestedui-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.
Hire 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: 76
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
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.
Hire 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: 76
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
Re: smd_textile_bar: Simple Textile insertion for the Write panel
I’ve pushed a few commits recently including one for inserting shortcodes as containers. So now you can highlight some text and wrap your shortcode around it. Handy for situations where you want to use <txp:yield/> inside them to render user-defined content. Check the commit message for usage and current caveats.
If anybody has time to download the .php plugin code and give it a whirl, I’d be grateful for some more feedback before I make an official release out of it.
I suspect if anybody has really long shortcode names(!) the bar will do some horrible wrap thing, but I guess that’s an edge case since the whole point of them is to make them, well, short.
Still not sure how to handle the nested combo-box thing around the form selector either. If anybody has any ideas on how to successfully render such things and make them accessible, I’m all eyes. Thank you.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#42 2021-02-17 14:08:16
- marios2
- Member

- From: Germany
- Registered: 2019-07-31
- Posts: 76
Re: smd_textile_bar: Simple Textile insertion for the Write panel
The plugin works fine, if I view my own login, which is the highest user rights, but the textile bar does not show up for the second user, which is the second highest user rights,…
… any suggestions?
( Using TXP 4.8.1 )
rgrds, marios
Last edited by marios2 (2021-02-17 14:09:03)
Offline
#43 2021-02-18 15:26:37
- marios2
- Member

- From: Germany
- Registered: 2019-07-31
- Posts: 76
Re: smd_textile_bar: Simple Textile insertion for the Write panel
I tried to uninstall and install again from the second user account, with no success.
rgrds, marios
Offline
Re: smd_textile_bar: Simple Textile insertion for the Write panel
Weird. Works for me on my second test account with Freelancer privs. Check your database txp_prefs table. Does it show that:
- All the prefs with event
smd_textile_bar.smd_textile_bar_featuresare set global (i.e. nothing in the ‘user_name’ column). - All the prefs with event
smd_textile_bar.smd_textile_bar_layoutare set local (i.e. contain one set per user in the ‘user_name’ column). - The pref
smd_textile_bar_bodyfor the user in question is set to 1 so it shows up.
Further, can you visit the prefs and alter the Textile bar settings for this new user?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#45 2021-02-18 16:15:33
- marios2
- Member

- From: Germany
- Registered: 2019-07-31
- Posts: 76
Re: smd_textile_bar: Simple Textile insertion for the Write panel
Hmmm, … I’ve looked and I can see that the name fields are all empty except for the
smd_textile_bar_body
and
smd_textile_bar_excerpt
name fields where it says admin.
And then further down, I have:
smd_textile_bar.smd_textile_bar_layout
yesnoradio
253
admin
smd_textile_bar.smd_textile_bar_layout
yesnoradio
254
admin
smd_textile_bar.smd_textile_bar_layout
yesnoradio
255
admin
What do I have to insert regarding your second question, a 1, and in which column ?
I was thinking first, that it maybe clashes with smd_user_manager, which I have disabled for now.
rgrds, marios
Last edited by marios2 (2021-02-18 16:31:40)
Offline