Pinyin Quicktag
by John Pasden
14 May 2005
I recently stumbled upon a Movable Type hack which creates WordPress-style “quicktags” in the MT blog edit screen. The hack can be modded as well, so I added a pinyin button to automatically wrap selected text with the appropriate span tag and all the necessary attributes (see my entry on Pinyin Tooltips). Then I added some extra CSS to make it look better (and act more like a button).
Now I can add pinyin with this button. Yay!
I’m guessing there will be even less demand for this geekery than there was for the pinyin tooltip method, but if anyone’s interested, I can tell you how to do it. (Beware: if you follow the link to the hack and don’t understand anything, forget it, because you have to further mod the hack to add the pinyin button.)
Like this:
Like Loading...
John Pasden
John is a Shanghai-based linguist and entrepreneur, founder of AllSet Learning.
Hmmmm . . . Just as I thought. Very interesting.
That’s pretty slick… I can think of a lot of quick tags that could be of use (Amazon links, for one).
Eh?
Why not just use WordPress. It’s far better than MT on so many levels.
Cool hack though.
WordPress templating SUCKS, though. Otherwise, I’d have to agree with Adam.
名不正则言不顺。言不顺则事不成。事不成则帖不兴。帖不兴则拍砖不中。拍砖不中则网民无所措手足。
故斑竹名之必可言也。言之必可行也。斑竹于其言无所苟而已矣。
Adam,
I actually WOULD like to switch to a php-based CMS, but I’m holding back for two reasons: (1) template control, and (2) link preservation. My #1 candidate is S9Y, but their templates look like even more hassle than WordPress’s. (They outright discourage customizing the templates.) I’ll just hang in here and wait. Every blogging CMS offers import from MT.
I gotta say, I was surprised to see a comment from you! I’ve been following your new blog for the past month or so, but didn’t think you’d return to commenting in China blogland…
Oh, and one more thing… My main reason for modding MT was to add the pinyin tag, not to make MT more like WP. Initially I wanted to modify MT’s scripts directly, but it turned out that swapping out the quicktag javascript code for the WP-style code was a lot easier.
Damn you, ×Ó! You beat me to the joke!
Anyway, this looks handy. I’ll have to give it a shot if I ever return to blogging.
Nice. I’d love to know how to do that. I’m using WordPress. I haven’t seen a quicktag for this in the wordpress forums yet.