« 101 英語キーボード ATOK カナキーをロック/解除するキー カナロック | トップページ | TiddlyWiki  Tiddler内でオンライン辞書 IFRAMEの背景色指定 »

2010年6月19日 (土)

TiddlyWiki用のプラグイン作り方。論文から英文コピペするときに余分なスペースや改行を削除!

(バージョンアップのお知らせ。整形済みテキストが自動で選択されるようにJavaScriptを修正しました。これでTrimを押したらすぐにCtrl+Cでコピーできます。2010.12.14)

メモに便利なTiddlyWikiですが、英語の論文は編集者の人が印刷時の見た目がよくなるようにスペースや改行をほいほいいれるので、自分用メモにテキストを引用しようとコピペすると余分なスペースやら改行が入ってこれが気になる!で、いつも思わずぽちぽちと編集してしまう。こういう繰り返しの単純作業のは自動化すべき。そこでjavascriptの勉強がてらプラグインを自作してみた。デモはこちら:

           

左のテキストボックスに整形したいテキサスをペーストしTrimのボタンをクリックすると余分なスペースが取り除かれた整形済みテキストが左にできて、すでに選択された状態になっているのでCtrl+Cでコピーができる。すっきり!

参考:
初心者のためのJavaScript講座
TW.orgのプラグイン作成の記事

先ずはFunctionの制作を。上記のTW.orgの記事にあるように適当に新しいTiddlerを作る。Tiddlerのタイトルは何でもよい。以下の内容をコピペする。systemConfigをタグに入れるのを忘れずに。これを保存してリロードするとバックステージのプラグインから、このTiddlerがすでにプラグインとして認識されるのを確認できるはず。

//{{{
function myTrimSpaces2(){

var txt = document.getElementById("oldText").value;
txt = txt.replace(/^\s+|\s+$/g,'').replace(/\s+/g,' ');
document.getElementById("newText").value = txt;
document.getElementById("newText").focus();
document.getElementById("newText").select();

}
//}}}

次はこのJavaScriptを呼び出して使うため、もう一つのTiddlerをつくりテキスト入出力用のインターフェイスをHTMLで作る。これもタイトル、タグはどうでもよくて、内容は以下の感じでおしまい。うまくいかない場合、 http://hennohito.cocolog-nifty.com/blog/files/plug-in_Okiba3.html  からインポートもできるようにしてみたので最後の2つのTiddlers(TrimSpacesとなまえにあるもの)をインポートしてみてください。

    <html><form>

    <textarea id="oldText" name="oldText" rows="2" cols="26" onclick="javascript:this.form.oldText.focus();this.form.oldText.select();"></textarea>
    <input type="button" value="Trim->" onclick="myTrimSpaces2()">
    <textarea id="newText" name="newText" rows="2" cols="26" onclick="javascript:this.form.newText.focus();this.form.newText.select();"></textarea>

    </form></html>

しかしTiddlyWikiの可能性,拡張性はすごい。JavaScriptでコーディングするのは初めてだし、どうやって実行するの?って感じからTW.orgを参考に始めたが基本的にTiddlerにsystemConfigのタグがあればあとはalert('Hello world')とするだけで実行できる環境がデフォルトであるし、実際にやってみるまで気づかなかったが拡張の敷居の低さは拍子抜けするくらいだ。初心者でも使えるツールが割と簡単に開発できてしまった。

« 101 英語キーボード ATOK カナキーをロック/解除するキー カナロック | トップページ | TiddlyWiki  Tiddler内でオンライン辞書 IFRAMEの背景色指定 »

パソコン・インターネット」カテゴリの記事

TiddlyWiki」カテゴリの記事

コメント

https://www.pandoracharmsbracelet.us.com/
https://pandorabracelets-charms.us.com/
https://www.outletadidasshoes.us.com/
https://www.adidassuperstars.us.com/
https://www.nikeclearancestores.us.com/
https://www.adidasshoesonline.us.com/
https://www.nike-sneakers.us.com/
https://www.nmd.uk.com/
https://www.adidasyeezys.us.com/
https://www.pandoras.uk.com/
https://www.nikeoutletstores.us.com/
https://www.newtrainers.uk.com/
https://www.nikeshoesshop.ca/
https://www.nikeair-force1.us.com/
https://www.offwhite-shoes.us.com/
https://www.officialyeezywebsite.us.com/
https://www.nikepresto.us.org/
https://www.adidasyeezyofficialwebsite.us.com/
https://www.trainerssale.uk.com/
https://www.trainersstore.uk.com/
https://www.nikeclearances.us.com/
https://www.nikesoutlets.us.com/
https://www.nmdsadidas.us.com/
https://www.yeezyshoesboost.us.com/
https://www.adidass.us.com/
https://www.newadidasshoes.us.com/
https://www.nike-onlinecanada.ca/
https://www.pandoracharmsbracelets.us.com/
https://www.jewelrypandora.us.org/
https://www.airforce1s.us.com/
https://www.pandorascharms.uk.com/
https://www.pandorarings.uk.com/
https://www.yeezyshoesadidas.us.com/
https://www.pandorajewelryuk.uk.com/
https://www.adidascom.us.com/
https://www.yeezy350shoes.ca/
https://www.ultraboost.uk.com/
https://www.nikecanada-onlineshopping.ca/
https://www.nikeoutlet--store.us.com/
https://www.nikesstoreoutlet.us.com/
https://www.nike-outletfactory.us.com/
https://www.yeezyboost350v2.us.com/
https://www.nikeoutletstore.ca/
https://www.adidasultraboost.shop/
https://www.nikeshoesoutlets.us.com/
https://www.nikesneakersstore.us.com/
https://www.adidasstoreonline.us.com/
https://www.adidasshoesshop.us.com/
https://www.nike-rosherun.us.com/
https://www.nikeoutletsonline.us.com/
https://www.ultra-boost.us.com/
https://www.adidasoutletshoes.us.com/
https://www.shoesoutletstores.ca/
https://www.yeezy500boost.us.com/
https://www.trainersoutlet.uk.com/
https://www.pandorasjewelry.uk.com/
https://www.yeezyshop.us.com/
https://www.adidasoutletstores.us.com/
https://www.yeezycanadastore.ca/
https://www.adidas-originalssuperstar.us.com/
https://www.nikesrunningshoes.us.com/
https://www.yeezysboost-350.us.com/
https://www.yeezyshoesstore.ca/
https://www.adidas-superstars.us.com/

https://www.wholesaleshoesclothing.us/
https://www.mlbjerseysshop.ca/
https://www.jordan16.us/
https://www.nikeblackfridaycybermonday.us.org/
https://www.nikeairforce1.us.org/
https://www.nikeshops.us.com/
https://www.jordans12.us/
https://www.nikeairforceones.us.org/
https://www.wholesalejordansfactory.us/
https://www.jordan35.us/
https://www.adidasoutletstore.us.org/
https://www.pandora-jewelrysite.us/
https://www.airforce1s.us.org/
https://www.nikecortezshox.us.org/
https://www.pandorajewelryofficialsites.us/
https://www.jordan-12.us.org/
https://www.jordans28.us/
https://www.nikeairhuaraches.us.com/
https://www.nikeoutletstoreonlines.us.org/
https://www.cheapadidasshoes.us.org/
https://www.pandorasbracelets.us/
https://www.nikejordan1.us.com/
https://www.jordan27.us/
https://www.jordan24.us/
https://www.jordan29.us/
https://www.nikesnew.us.com/
https://www.nikeairmax270s.us.com/
https://www.jerseysstore.ca/
https://www.nikesneakerss.us.com/
https://www.airjordans11retro.us/
https://www.nikewholesale.us.org/
https://www.cheapshoeswholesalefromchina.us/
https://www.nikeshoescheap.us.org/
https://www.jordan17.us/
https://www.officialpandorajewelry.us/
https://www.nikeshoeswholesale.us.com/
https://www.nikeairmaxs-270.us.com/
https://www.shoesshop.ca/
https://www.nike-runningshoes.us.org/
https://www.huaraches.us.org/
https://www.lebronsjamesshoes.us.com/
https://www.nikezoomshoes.us.com/
https://www.fjallravenkankenbackpack.us.org/
https://www.nike-clearance.us.org/
https://www.nikeairforces.us.com/
https://www.adidasstoreoutlet.us.com/
https://www.wholesaleshoescheap.us/
https://www.wholesalenikeshoesclothing.us.com/
https://www.newjordans.us.org/
https://www.wholesalejordans.us.org/
https://www.airmax720.us.org/
https://www.jordan5whatthe.us/
https://www.retro12.us/
https://www.nikeshoesstores.us.com/
https://www.nflshoponline.ca/
https://www.nikesoutlet.us.org/
https://www.nbastorecanada.ca/
https://www.foamposites.us.org/
https://www.jordans33.us/
https://www.cheapshoeswholesalefreeshipping.us/
https://www.airjordans13.us/
https://www.cheapjordanshoessuppliers.us.org/
https://www.toddlerbabyinfantjordans.us/
https://www.nikeairforce1s.us.org/
https://www.yeezyadidas.com.co/
https://www.yeezysboost350v2.us.org/
https://www.jordan22.us/
https://www.jordan20.us/
https://www.jordan31.us/
https://www.nikeoffwhite.us.org/
https://www.christianslouboutin.us.org/
https://www.nikewomensshoes.us.com/
https://www.nikeairzoom.us.com/
https://www.nikestoresfactory.us.com/
https://www.nikeairmaxs.us.org/
https://www.cheapjordansshoessale.us/
https://www.jordans34.us/
https://www.jordan4.us.org/
https://www.nikeshoesoutletstoreonlineshopping.us.com/
https://www.airjordan33.us/
https://www.pandorajewelrycz.us/
https://www.jordan18.us/
https://www.pandora-jewelry-charms.us/
https://www.adidasyeezywebsite.us.org/
https://www.cheapjerseyswholesale.ca/
https://www.jordan25.us/
https://www.airjordanretro.us.org/
https://www.wholesalenikeshoesonline.us.com/
https://www.wholesalejerseyscheap.us.org/
https://www.nikeair-force1.us.org/
https://www.nikefoampositeacghyperdunk.us.com/
https://www.canadashoesoutlet.ca/
https://www.nhljerseysstore.ca/
https://www.air-max2019.us.org/
https://www.huaracheshoes.us.com/
https://www.christianlouboutinshoess.us.com/
https://www.cheapjordansshoeswholesale.us.org/
https://www.jordan21.us/
https://www.jordan26.us/
https://www.airmaxs.us.org/
https://www.nmdr1.us.com/
https://www.jordan6s.us/
https://www.airjordan-retros.us/
https://www.diorjordans.us/
https://www.wholesaleadidas.us.com/
https://www.shoesstores.ca/
https://www.jordan-aj1.us/
https://www.jordan2s.us/
https://www.nikeshoesformens.us.com/
https://www.shoeswholesalesuppliers.us/
https://www.jordans13shoes.us/
https://www.nikeoutlet-store.us.org/
https://www.ringspandora.us/
https://www.jordans32.us/
https://www.jordanswholesale.us.org/
https://www.nikeepicreactuptempo.us.org/
https://www.pandorajewelrycharmscanada.ca/
https://www.nikeoutletshoes.us.org/
https://www.nhlshops.ca/
https://www.nike-outlets.us.com/
https://www.jordanshoess.us.org/
https://www.jordan11s.us.org/
https://www.newnikesshoes.us.org/
https://www.nikesbdunk.us.com/
https://www.redbottomslouboutinshoes.us.org/
https://www.officialpandorarings.us/
https://www.nikerosheblazer.us.org/
https://www.nikeshoesdeals.us.com/
https://www.kidsjordans.us/
https://www.nikefree.us.org/
https://www.jordan1.us.org/
https://www.jordan19.us/
https://www.nikecanadashoesshop.ca/
https://www.nikeslidessandalsslipers.us.com/
https://www.nikeairjordan.us.org/
https://www.michaeljordan-shoes.us/
https://www.jordan15.us/
https://www.newnikesneakers.us.org/
https://www.nikeshoessale.us.org/
https://www.nikerunningshoesforwomen.us.com/
https://www.nikemetcons.us.com/
https://www.jordan11concordshoes.us/
https://www.jordans14.us/
https://www.cheapjordanswholesalefreeshipping.us/
https://www.nikess.us.com/
https://www.pandoraa.us/
https://www.nikesoutletstore.us.com/
https://www.wholesaleshoessneakers.us/
https://www.jordans23.us/
https://www.jordan30.us/
https://www.nikerunningshoes.us.org/
https://www.jordan33.us.org/
https://www.nikewholesalesuppliers.us.com/
https://www.nikerosheblazers.us.com/
https://www.jordan11lowretro.us/

https://www.pandora-charmssaleclearance.us/
https://www.pandoraoutletsonline.us.com/
https://www.nikeonline-canada.ca/
https://www.monclersale.com.co/
https://www.pumashoess.us.com/
https://www.goyardhandbagsoutlet.us.com/
https://www.pandoracharmsstore.us.com/
https://www.yeezys350.ca/
https://www.pandora-store.us.com/
https://www.nmd.us.com/
https://www.pandorasjewelrycharms.us.com/
https://www.airjordan1low.us/
https://www.goyardbagsoutlet.us.com/
https://www.trainersshop.uk.com/
https://www.jordan1low.us.com/
https://www.sneakersadidas.us.com/
https://www.monclerjacket.com.co/
https://www.nikeshoeswomen.us.com/
https://www.balenciagashoesstore.us.com/
https://www.monclercoatsjacketsoutlet.us.com/
https://www.pandorass.us/
https://www.pandorabraceletsjewelry.us.com/
https://www.airjordan1s.us.com/
https://www.jewelryspandora.us/
https://www.pandorajewelrywebsites.us.com/
https://www.shoesasicsoutlet.us.com/
https://www.outletasics.us.com/
https://www.pandora-outletcharms.us.com/
https://www.wholesalejordanshoes.us/
https://www.jordanretro1.us.com/
https://www.asicsshoess.us.com/
https://www.nikesstore.us.com/
https://www.monclercoat.com.co/
https://www.monclersfactory.us.com/
https://www.balenciagastores.us.com/
https://www.adidasshoescheap.us.com/
https://www.adidasstoreoutlets.us.com/
https://www.diorjordan1.us.com/
https://www.nikeoutlets.ca/
https://www.nikesneakersformen.us.com/
https://www.nikesnkrs.ca/
https://www.adidasshoesfactory.us.com/
https://www.pandorajewelrysblackfriday.us.com/
https://www.nikescanadaonlineshopping.ca/
https://www.pandora-jewellery.us.com/
https://www.asicssneakers.us.com/
https://www.pandorajewelrysofficialsite.us.com/
https://www.pandorabraceletsclearance.us.com/
https://www.pandorajewelry-officialsites.us/
https://www.pandoraofficialsites.us.com/
https://www.shoesferragamo.us.com/
https://www.pandorajewelryoff.us.com/
https://www.pandorasrings.us.com/
https://www.cheapmoncler.com.co/
https://www.wholesalejordanshoes.us.org/
https://www.pandoracharms-bracelets.us.com/
https://www.adidass.ca/
https://www.pandora-jewelryoutlets.us.com/
https://www.balenciagasneakersoutlet.us.com/
https://www.pandoras-outlet.us.com/
https://www.outletsmonclerjackets.us.com/
https://www.airjordans1.us.com/
https://www.yeezycanadashop.ca/
https://www.adidasshoesmen.us.com/
https://www.nikestoreoutlets.us.com/
https://www.pandoracharmss.us.com/
https://www.monclersjacketsoutlet.us.com/
https://www.nikeoutletstoreonlineshopping.us.com/
https://www.nikerunningshoessale.us.com/
https://www.asicsoutletshoes.us.com/
https://www.pandoras-charms.us.com/
https://www.airmax720.us.com/
https://www.pandorasoutlet.us.com/
https://www.outletstoreonlineshopping.com.co/
https://www.pandoraringsjewelry.us.com/
https://www.balenciagasneakerssales.us.com/
https://www.pandorasjewelrys.us.com/
https://www.pandorasjewelryoff.us.com/
https://www.nikeshoes-forwomen.us.com/
https://www.ferragamocom.us/
https://www.pandoraoutletscharms.us.com/
https://www.jordan1shoes.us.com/
https://www.pandoracharms-bracelets.us/
https://www.nikecanada-shoes.ca/
https://www.jordanones.us/
https://www.balenciagatriplessneakers.us.com/
https://www.cheapjordanshoeswholesale.us/
https://www.jordan1high.us/
https://www.adidasshoes-canada.ca/
https://www.pandorasjewelryofficialsite.us.com/
https://www.pandorajewelryshop.us.com/
https://www.pandoraoutlet-online.us.com/
https://www.charmspandoras.us/
https://www.nikeoutletstore-onlineshopping.us.com/
https://www.nikeshoesnew.us.com/
https://www.nikeairjordan1.us.com/
https://www.adidascanadaonline.ca/
https://www.pandorabraceletscharms.us.com/
https://www.wholesaleairjordanscheap.us/
https://www.pandorashops.us.com/
https://www.nikecanadaonlineshopping.ca/
https://www.pandoraoutletjewelry.us.com/
https://www.jordan1retro.us.com/
https://www.cheapshoesoutletonlines.us/
https://www.asicsrunningshoess.us.com/
https://www.nikesneakersforwomen.us.com/
https://www.pandorasofficialsite.us.com/
https://www.pandoracharmsjewelrys.us/
https://www.nikestorefactorys.us.com/
https://www.trainersforsale.uk.com/
https://www.asicsgel-kayano.us.com/
https://www.newshoes2021.us/
https://www.airjordan1retro.us.com/
https://www.monclersaleoutlets.us.com/
https://www.ferragamosbelt.us.com/
https://www.adidasshoeswomen.us.com/
https://www.salvatoreferragamos.us.com/
https://www.ferragamosbelts.us.com/
https://www.balenciagashoess.us.com/
https://www.nikeshoes-formen.us.com/
https://www.pandoraoutletscharms.us/
https://www.balenciagastore.us.com/
https://www.bestbasketballshoes.us/
https://www.pandorastores.us.com/
https://www.pandorasjewelrysite.us.com/
https://www.pandorasstore.us.com/
https://www.pandorasjewellery.us.com/
https://www.nike--shoes.ca/
https://www.adidassale.us.com/
https://www.adidasofficialwebsite.us.com/
https://www.yeezysshoes.ca/
https://www.nikeshoess.ca/
https://www.pandorajewelrysbracelets.us.com/
https://www.airjordan1shoes.us.com/
https://www.pandorasjewelry-officialsite.us.com/
https://www.pandorashops.us/
https://www.nikemensshoes.us.com/
https://www.pandorasbraceletcharms.us.com/
https://www.pandorajewelrybracelets.us.com/
https://www.nikecanadaonlines.ca/
https://www.pandorascom.us.com/
https://www.pandorashop.us.com/
https://www.adidas-runningshoes.us.com/
https://www.yeezycom.us/
https://www.nikecom.ca/
https://www.adidasnewshoes.us.com/

コメントを書く

(ウェブ上には掲載しません)

« 101 英語キーボード ATOK カナキーをロック/解除するキー カナロック | トップページ | TiddlyWiki  Tiddler内でオンライン辞書 IFRAMEの背景色指定 »

しろののツイッタータイムライン

  • ツイッターは5つ目も凍結されました。6つ目での復活も不可能。なのでnoteに注力しています。

    と思ったら、イーロン・マスクの買収が公になってアカウントが復活できました。ありがとうマスク。

    トランプ関連記事の一覧リスト

オススメたち

2024年1月
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

はてブ

無料ブログはココログ