alexking.org

Main Navigation

  • Blog
  • Projects
  • Sports
  • About
  • Contact

JS Quicktags Under LGPL

June 3, 2004

I’ve released my JavaScript Quicktags under the LGPL license as planned. This means that anyone (open source projects, closed source, commercial, etc.) can use them.

Here is an example page so you can see how they work, and here is the download.

69 Replies

Categories Development

  • 69 Replies
  • 55 Comments
  • 0 Tweets
  • 0 Facebook
  • 7 Pingbacks
Last reply was 806 days ago
  1. Geof
    View 2804 days ago

    Any chance you’d add acronym to that? ;)

    Reply
  2. Alex
    View 2804 days ago

    I think you’re capable of copying the 5 lines to add it. :)

    Reply
  3. Christian
    View 2804 days ago

    Well, I just had a look at it and I wondered where the difference between the new js and the phpmyadmin function insertAtCursor() you posted on your site was. (Besides the fact that the new one looks much more difficult to understand, the output seems to be pretty similar to me.)
    Christian

    Reply
  4. Alex
    View 2804 days ago

    There isn’t much difference, this is an implementation of it for HTML quicktags.

    Reply
  5. Geof
    View 2804 days ago

    Alex: you are right, of course. But you know that someone had to start asking for features … might as well be someone whose ears you can box with abandon! ;)

    Reply
  6. scriptygoddess.com
    View 2804 days ago

    Javascript Quick Tags (GPL)
    Matt posted a link to Alex’s javascript quick tags. I’ll need to update my “deCoder” javascript using that (if I can) – since Alex’s javascript DOES work with Firefox – and my (current) deCoder does not….

    Reply
  7. Phil
    View 2803 days ago

    Is it me, or does the ‘cursor-awareness’ not function in Safari? Works lovely in Firefox.

    Reply
  8. Alex
    View 2803 days ago

    Nope, they aren’t cursor aware in Safari and won’t be until Safari supports getting the cursor position in a textarea. This is actually noted in the comments at the top of the file.

    Reply
  9. Andrew
    View 2801 days ago

    After finding your fantastic site while looking for WordPress hacks I came across this great post, which is just what I was in the middle of making for an intranet site. No point reinventing the wheel… Thanks! :D

    Reply
  10. Alex
    View 2801 days ago

    Excellent!

    Reply
  11. Tim
    View 2801 days ago

    Alex, thanks a a lot. I just integrated this with a cmsimple site I am working on, and it works like a charm.

    I wrote up instructions for other cmsimple users at http://www.cmsimple.[...]ic.php?t=869

    Reply
  12. Jennifer
    View 2798 days ago

    Alex – I start to gloss over when I read the license text. I modified your code mostly to simplify it to the most “popular” tags people use in comments – that is: bold, italic, link. (I also added h3 since that’s what I use to stylize code on scriptygoddess). I’d like to offer the code for download with instructions on how to include it on wp-comments (obviously with credit to you for the script itself). Does the license allow me to do this?

    Reply
  13. Alex
    View 2798 days ago

    The short answer is yes, you just need to abide by the rules in the license. See #2 in the license for more details of what you need to do (commenting your changes, etc.).

    Reply
  14. evilabmonkey.org
    View 2787 days ago

    design notes, pt. 2
    welcome back to today’s last design notes. as you can easily see, nothing changed too drastically anymore. i’m very happy with the color scheme and the handling of the whole site. i really get along well with movable type. i…

    Reply
  15. Mama Write's Sideblog
    View 2770 days ago

    Safari Friendly Buttons
    JS Quicktags Under LGPL – Safari-friendly buttons for WordPress…

    Reply
  16. 99 shades of grey
    View 2728 days ago

    Customising Quicktags II
    A quick update to the Quicktag customisation : I just incorporated Scriptygoddess’ decodeIt function, which neatly translates ‘ into ‘>’. The original version of the function was IE-friendly only, however an update sees it working quite happ…

    Reply
  17. alexking.org: Blog
    View 2709 days ago

    JavaScript Quicktags Updated
    I’ve updated the JavaScript Quicktags to version 1.1. This includes a small change that keeps Mozilla from jumping to the top of the textarea when a tag is inserted.

    Thanks to Chris Snell who did the research to find the Mozilla bug and submit th…

    Reply
  18. Movable type resourses
    View 2686 days ago

    JS Quicktags Under LGPL

    Reply
  19. CEIT
    View 2665 days ago

    Thank you!!!!!! This is cool!

    Reply
  20. Julie
    View 2626 days ago

    Oh my gosh – I searched for so long to find a tutorial on how to do this. Imagine my joy to find your code. This is fantastic. More than fantastic. Thank you so much.

    Reply
  21. Schoschie
    View 2573 days ago

    Thank you very much. I didn’t think this was possible, either. I knew insertion at the cursor was possible using proprietary JS extensions (?) in MSIE only, but not anywhere else. And now this. Very cool. On Mac OS X, the code works fine with Firefox and other Gecko-based browsers like Netscape 7.x. It does NOT apparently work in MSIE on OS X, however (text inserted at end only). Like you said, it does not work in Safari either, which is a pity since it’s my browser of choice, but anyway.

    I will probably add this to my “homebrew” blog software Blogoid and use it for some code patched into our University’s pinboards (http://www.uni-weimar.de/pinnwand/). Thanks again.

    Reply
  22. ysu
    View 2554 days ago

    Nice script!
    a question: do you know of any way to achieve this cursor awareness in Opeara, or know it’s not possible at all?

    Reply
  23. Alex
    View 2554 days ago

    Opera doesn’t support it. One more reason not to use Opera. ;)

    Reply
  24. Carl
    View 2546 days ago

    Very nicely done!
    i’d tip my hat if i had one.

    Reply
  25. Jonathan
    View 2522 days ago

    Just what I needed.
    Excellent bit of coding.

    Now where’s that tip jar…

    Reply
  26. Alex
    View 2522 days ago

    Right over here. :)

    Reply
  27. Lw
    View 2514 days ago

    Has anyone made quicktags work for 2 distinct textarea fields on the same page?

    Thank you Alex King….

    Reply
  28. Eric J.
    View 2490 days ago

    decidedly cool. This is the closest to 1 to what I need for adding into aether. all I need now is to modify the tag definitions

    http://www.logarithm[...]ction=manual

    adding some sub tags would be interesting as well but given the fact that JavaScript is not easy to manipulate when 1) you don’t know it and 2) when you’re disabled and use speech recognition. speech recognition and programming in JavaScript just don’t get along.

    anyway, I will pick out the problem as fast as my hands permit.

    Alex, I’m hoping you will answer one question which is why don’t people put search/replace capability into these editors and why don’t they use keystroke commands for navigation/editing by character, word, sentence, paragraph (yes I’m an Emacs user) so that one can write speech recognition macros to let you navigate/edit by speech.

    by the way, I am speaking at a conference at the end of the month hosted by the open source speech recognition initiative and it would be wonderful to be able to dropping note to them on someone willing to support us (hint hint) :-)

    Reply
  29. Rudolf
    View 2427 days ago

    Alex, this is fantastic, especially the JS quickstart! This saves me a lot of time. It took me 5 hours to get to half of this and it only worked in IExplorer. Tha

    Reply
  30. alexking.org: Blog
    View 2411 days ago

    JavaScript Quicktags 1.2

    I’ve released a new version of my JavaScript Quicktags. I’ve been using this version for a while now, just hadn’t gotten around to packaging it up for release.

    This version has a changes:

    A few additional tags, including an “External Link…

    Reply
  31. Dan Parnell
    View 2279 days ago

    Works just dandily in Opera 8.5, just FYI. I only skimmed the comments list, so you may have already said this.

    Saved me about an hour, since I hate writing JavaScript. Then again, perhaps this is not such a good thing, because I could have been paid for that hour of clicking around and looking silly. ;-)

    Reply
  32. Karl Bishop
    View 2269 days ago

    Nice script!
    a question: do you know of any way to achieve this cursor awareness in Opeara, or know it’s not possible at all?

    Reply
  33. Alex
    View 2269 days ago

    Please post support questions in the forum, not in the blog comments.

    Reply
  34. Eric Tohanson
    View 2263 days ago

    Is it me, or does the ‘cursor-awareness’ not function in Safari? Works lovely in Firefox.

    Reply
  35. Alex
    View 2263 days ago

    Perhaps you could read this page more carefully.

    Reply
  36. Aslak
    View 2224 days ago

    Really, really nice, man. I’ve been looking all over for something like this. I love it :) . Thank you for doing this for us javascript analphabets.

    Reply
  37. Helmut
    View 2212 days ago

    Is it me, or does the ‘cursor-awareness’ not function in Safari? Works lovely in Firefox.

    Reply
  38. Dennis
    View 2204 days ago

    Nice work champ! – I’m using your brilliant script on my own website!

    Reply
  39. eric
    View 2172 days ago

    Hey man, this thing is awesome. I was looking all over the place, and had almost settled on an overly large and annoying rich text editor, but a small script that I can use to mark up entries is all I need. Awesome man!

    Reply
  40. cc
    View 2148 days ago

    Works fine in Safari 1.3. Thanks!

    Reply
  41. Florian
    View 2133 days ago

    Great stuff! And it _does_ work in Opera (8.52 / Linux).
    Florian

    Reply
  42. Tournesol
    View 2065 days ago

    Is it possible to change the buttons to graphics?

    Reply
  43. Juglar :: Comentarios: la conversación de los bloggers :: March :: 2006
    View 2055 days ago

    [...] En mi blog comentan: Quicktags: Comando Javascript para crear un menú de botones que permitan a tus comentaristas incorporar fácilmente etiquetas HTML en sus comentarios. [...]

    Reply
  44. 3stripe
    View 2054 days ago

    Looking good :)

    I’m going to try and impliment Quicktags as a plugin for the Vanilla forum I think….

    Reply
  45. 3stripe » Blog Archive » My first extension… Quicktags for Vanilla
    View 2052 days ago

    [...] Having used the Quicktags on WordPress for quite some while, I figured they would make a good add-on for the Vanilla forum, as they allow you to quickly apply HTML formatting to the contents of any textarea. You can also use keyboard shortcuts to apply them, and easily add your own Quicktags, which is an added bonus. [...]

    Reply
  46. Mark
    View 2021 days ago

    Good stuff! … just a quick note though that, at least with the sample page… in the Dict lookup, if you hit cancel when it pormpts you for a word, it still proceeded to lookup “null” on the dictionary website :)

    I have a knack for finding little bugs like this (if that’s in fact what it is). It’s the very first thing I clicked on that page.

    Reply
  47. Alex
    View 2021 days ago

    Thanks. If that isn’t fixed in the current downloadable version I need to put out a more decent version. That was fixed a long while back.

    Please use the forums for future bug reports.

    Reply
  48. Andy
    View 1987 days ago

    Coincidence!: I’ve just been trying to do this; remembered PHPadmin’s Query page; looked at the code; didn’t recognise the selectionStart property; didn’t find it in ‘JavaScript Bible’; did a Google search and there you are at number1!!
    So thanks Alex, for saving me hours of Javascript webcrawling.
    BTW, it works fine on Safari 1.3.2 on insertion AND replacement.

    Reply
  49. Eliah
    View 1966 days ago

    Very useful code. And it works almost excellent in Opera 9, I tested it.

    Reply
  50. mctk
    View 1938 days ago

    Stumbled across this. Just what I was looking for. Simple to implement. Thanks very much!

    Reply
  51. Nicolas
    View 1882 days ago

    Thanks a lot Alex!

    This is just what i was trying to do for a website! I was looking for cursor position in textarea and I found your website! It works so good!

    Many thanks!

    Reply
  52. Garth
    View 1838 days ago

    Alex, thanks so much for sharing this invaluable asset with us. I have spent several hours on and off over the last few months attempting to rectify the Mozilla problem, but to no avail. This is exactly the core code I need to build off of.

    Thanks so much for your willingness to share with the development community!

    Reply
  53. Joey
    View 1819 days ago

    Wow what a big help. I had just finished writing my version with just basic tags, but this pretty much replaces that. I am thrilled to find this when I did.

    Reply
  54. n3z
    View 1814 days ago

    Hi, please forgive me if I’m missing it, I really would love to use this plugin, but I can’t find your original documentation, and there is no readme file with the download. I’m happy to donate for it, but while I am a graphic designer and have built my entire blog and customized it, it is all at great pains and slowly and with much reading. I am no developer or code writer, and am just lokoing for basic instructions on how to install this (where to put it), if I need to tweak my config file, etc.

    Is there a document somewhere I am missing? I have searched your site and read many pages, so I am asking you last as I know how it is to be asked dumb questions by those not willing to expend effort.

    I am using MT 3.34.

    Thank you in advance for any help.

    Reply
  55. Gareth
    View 1726 days ago

    Alex thanks for this script, it is exactly what we have been looking for.

    Reply
  56. Mark
    View 1720 days ago

    Alex this is great, thanks. When I started searching for a way to find a cursor position I never thought I’d find something that did exactly what I was trying to achieve with very little development needed.
    I’ll add you a link on my new site when its up and running as you’ve saved me hours of work.
    cheers.

    Reply
  57. (a different) Alex
    View 1696 days ago

    Thank you.

    Reply
  58. Geoff
    View 1667 days ago

    Many thanks Alex,

    My two day search has eventually lead me to your door. This is a fantastic script. Imagine my suprise when I first clicked on the little arrow button at the end of the toolbar to reveal even more buttons :) Absolutely top notch work, even cross-browser compatible. I will be using this bit of essential code in an upcoming website of mine. Please let me know if there is anything I/We all can do to help make this code even better known (assuming you would like that;))

    Thanks again

    Geoff

    Reply
  59. kb-one
    View 1629 days ago

    I am trying to figure out how to implement this. I am familiart with ASP, but totally clueless when it comes to JS. I have a textarea in a form and all I need is a button that will insert a line break at the cursor position. Can anyone help in posting code for this. Thank you very much JS GODS!!!

    Reply
  60. NBA
    View 1601 days ago

    Thanks so much for your willingness to share with the development community!

    Reply
  61. Dj Tiesto
    View 1601 days ago

    This is just what i was trying to do for a website! I was looking for cursor position in textarea and I found your website! It works so good!

    Many thanks!

    Reply
  62. Alonzo Mourning
    View 1601 days ago

    Just what I needed.
    Excellent bit of coding.
    keep up the your great work.
    thank you.

    Reply
  63. zichzach
    View 1392 days ago

    Thanks this great.

    Reply
  64. Nuevas herramientas y apartados en el blog — WydBlog
    View 1274 days ago

    [...] que no están muy familiarizadas con el Html. [Demo: en el formulario de comentarios del blog] [Página Oficial] *Nota: Muy facil y rapido de instalar, “No hace falta wordpress”, en próximos post explicare [...]

    Reply
  65. Rin - Broken Kode Test
    View 1259 days ago

    [...] buttons (code courtesy of Alex King) incorporated into the original [...]

    Reply
  66. Manji - Broken Kode Test
    View 1258 days ago

    [...] buttons (code courtesy of Alex King) incorporated into the original [...]

    Reply
  67. Manji - Broken Kode
    View 1163 days ago

    [...] buttons (code courtesy of Alex King) incorporated into the [...]

    Reply
  68. Bene
    View 958 days ago

    thanks, very useful!!!

    Reply
  69. Broken Kode . No8 by Khaled Abou Alfa
    View 806 days ago

    [...] buttons (code courtesy of Alex King) incorporated into the original [...]

    Reply
Logging In...

Profile cancel

Sign in with Twitter Sign in with Facebook
or

Not published

June 3, 2004 » « Photos 4.1b1 released
wcsea-speakinggolf-swingsxswwcsfPhotographing Big Ben
prev next

Alex King, Web Developer

I live in Denver, CO where I founded Crowd Favorite. We enjoy building cool web stuff – especially with WordPress and Open Source.

I was an original contributor to WordPress, creator of ShareThis, and I am the co-founder of CloudMoxie and BackupMoxie.

  • Twitter
  • Facebook
  • GitHub
  • Flickr
  • Pinboard
  • WordPress
  • Stellar
  • Untappd
  • LinkedIn
  • Crowd Favorite

Recent Blog Posts

  • http_build_query() Separator Tip
  • Twitter Tools 3.0 beta 2
  • WP_Query by “Standard” Post Format
  • WordPress Core Contributions
  • Goals for 2012
  • 2011 in Review
  • Popularity Contest is Dead (and on GitHub)
  • Domain Registrar with DNS and Migration?
  • A Couple of Core Submissions
  • WordPress Plugins and Symlinks

Archives

Categories

Powered by WordPress  ·  FavePersonal by Crowd Favorite

Copyright © 2002-2012 Alex King. All Rights Reserved.