Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2005-10-27 15:58:24

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

I have tried to move all to custom.js, but I failed to make it work.
This is what I did: <ol> <li>I moved the “edInsertAcronym” function to custom.js</li> <li>I copied the “edShowButton” and “edShowImgButton” function to custom.js and removed all unnecesary parts, leaving only the “if… qt-acronym” chunk that calls “edInsertAcronym”</li> <li>uploaded my custom.js</li> <li>CTRL + F5 to clean cache</li>
</ol>

Nothing happens when I click the acronyn button.

I also tested hakjoon suggestion (thanks, hakjoon!) but when clicking “acronym” button I only get a page refresh.

Meanwhile, I will keep the acronym mods in quicktags.js.

Last edited by maniqui (2005-10-27 17:18:04)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#98 2005-10-27 17:14:14

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

Maybe area is not passed through the way I expected I’ll take a closer look. I’ll try to get a method that works and try do a little write up on it. I haven’t actually played with custom.js, since most of what I’ve needed was just new buttons.


Shoving is the answer – pusher robot

Offline

#99 2005-10-27 19:45:08

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

Patrick’s code does work, I just didn’t assign it to a variable to be used, which was an oversight. I’ll update the plugin again, in a minute or two, so area will be available.

Offline

#100 2005-10-30 01:14:19

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

Did someone manage to insert a non-breaking space with a shiny little button ? It worked fine with any glyphs, characters or anything really but non-breaking space I can’t get it (or TXP) to handle it…

Edit: I meant another way but inserting a & #160; , which is a little scarry to nongeek people.

Last edited by Jeremie (2005-10-30 01:15:04)

Offline

#101 2005-10-30 01:17:37

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

v.0.4.3 is here if you didn’t notice.

Jeremie: just checking to make sure I understand, so you want the button to insert the text &nbsp; into the textarea?

Last edited by Mary (2005-10-30 03:41:33)

Offline

#102 2005-10-30 01:26:22

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

Yep. I try to copy&paste using your tool in the plugin help, but it was always converted to a u0020 code. I try the u00A0 one by hand, but it seems to be converted by TXP as a regular space too.

I don’t blame your plugin :) , as I recall having some talks with Zem about TXP and nonbreaking spaces. I was just curious if someone manage to did it ?

Last edited by Jeremie (2005-10-30 01:30:26)

Offline

#103 2005-10-30 03:42:18

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

You only need to use unicode for the button label (a dom requirement, not my own), not what you want it to insert. For that, you just use plain text, i.e:

edButtons[edButtons.length] = new edButton('qt-nbsp','nbsp','&nbsp;','','Non-breaking space');

Offline

#104 2005-10-30 10:15:39

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

Thank you for this plugin Mary (all your plugins are great !).

I see that the link insertion is still in xhtml, there is no textile button for that (or if I missed it, I apologize and please ignore this message). As I’m using this plugin almost for educational purpose (“Hey : click and see how textile is simple”) I won’t use the default xhtml button.

I hope there will be a textile button in a next version. Meanwhile, I’ve add this incomplete (the link as to be pasted) but textile-friendly button :

<code>
edButtons[edButtons.length] = new edButton(‘qt-quote’,‘Link’,’\u0021’,’\u0021\u003ahttp\u003a\u002f\u002fpaste-your-link-here.com’,‘Textile link’);
</code>

Last edited by Niconemo (2005-10-30 10:27:23)


Nico

Offline

#105 2005-10-30 19:23:27

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

mary wrote:
You only need to use unicode for the button label (a dom requirement, not my own), not what you want it to insert. For that, you just use plain text, i.e:
edButtons[edButtons.length] = new edButton('qt-nbsp','nbsp','&nbsp;','','Non-breaking space');

That’s my point. I don’t want to insert entity (which will scare non-geek writers), I want to insert directly the non-breaking space unicode character.

Offline

#106 2005-10-30 20:07:19

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

> Niconemo wrote:
I hope there will be a textile button in a next version.

I wrote the textile extension so any shortcomings are my fault not Mary’s. I just piggyback on her great work.

I’ve been meaning to do a new version that will output textile for links and images. They just need special functions written and I wasn’t 100% sure how to approach it when I released it the first time. I’ll see if I can get to that soon.


Shoving is the answer – pusher robot

Offline

#107 2005-10-30 23:08:38

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

Jeremie

Oh, now I understand. I don’t know if that can be worked around either. I tried entering the entity in regular html, then copy and pasting the result, but that still gave back the incorrect &#32;. Maybe its because its actually a special character, not really a space, so you’re expected to enter in the named/numeric entity value.

Offline

#108 2005-10-30 23:40:27

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] upm_quicktags: Implement Alex King’s Quicktags

The strange this though, it’s it work for any other character. For example: <code>edButtons[edButtons.length] = new edButton(‘qt-eaiguemaj’,’\u00c9’,’\u00c9’,’‘,’\u00c9’);</code> do output a É, no problem.

Offline

Board footer

Powered by FluxBB