1. Javascript: Insert text at the cursor point

    jake on 2005.05.22
    at 11:34 pm

    One of the things that’s more difficult than it ought to be around here is adding images to posts. At least when it comes to remembering the steps.

    What I worked up the other day is some javascript to make it a little simpler. First I added a little call to only show the alt and title fields when adding images. And I added a little link to put the correct image tag into the textarea.

    The only problem was the simplest script can only throw the element in at the end of the text or replace the text completely. Through good old Google I found a script that Alex King discovered and posted to do exactly what I wanted. So now we have a script to insert the image element where your cursor is.

    But I had already built a variable along with adding in onfocus=";" to all the textareas to set the variable. In this case the main article and the excerpt. So I modified the javascript to use the variable and getElementById to paste the code into the correct textarea.

    It’s not a very complex little group of scripts but it adds in a nice little feature to our home grown system. And hopefully this can help someone else out there.

    Posted in: Web

    Talk Bubble 3 Comments

  2. Republicans Attempt to Break Congress

    brian on 2005.05.22
    at 10:55 pm

    I’ve tried to keep politics to a minimum here, save for the truly horrific. This is truly horrific.

    The Republicans are attempting to change the way Congress works by removing the long standing “filibuster.” Quite simply, the Democrats are going to filibuster to right-wing extremist judicial nominees, and the Republicans don’t appreciate that they do not have the power to work around a filibuster. So since they can’t play by the rules, they are attempting to change them, with a tactic they call “The Nuclear Option.”

    What can you do to prevent the Republicans from breaking our important system of checks and balances? Write your Congressperson! Here’s a link to a petition where you may state your opposition to the nuclear option, and it will be hand delivered to the appropriate parties. Do not wait. The vote is Tuesday May 24th.

    Act now.

    Posted in: Politics

    Talk Bubble 1 Comments

by date

« May 2005 »
Sun Mon Tue Wed Thu Fri Sat
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