You aren't signed in     Sign In    Help

Flickr Rich Edit

Flickr Rich Edit by jrhyley.
Add limited rich editing capabilities to Flickr, in comments and groups.

www.rhyley.org/gm/flickrRichEdit.user.js 

Comments

view profile

leff  Pro User  says:

very nice.
Posted 50 months ago. ( permalink )

view profile

jrhyley says:

leff said:
very nice.
Why, thank you.
Posted 50 months ago. ( permalink )

view profile

leff  Pro User  says:

hahaha
Posted 50 months ago. ( permalink )

view profile

Sunfox says:

And very simple to modify into semantic (strong, em) tags !
Posted 50 months ago. ( permalink )

view profile

jrhyley says:

I suppose, if you're into that sort of thing. ;)
Posted 50 months ago. ( permalink )

view profile

Pip  Pro User  says:

very cute :)
Posted 50 months ago. ( permalink )

view profile

mhusson  Pro User  says:

cool script. i modified it a little so the new links are next to the "(Some html is okay)". good work.
Posted 50 months ago. ( permalink )

view profile

steeev  Pro User  says:

cool hack! btw heres a fix for the scroll "bug" (where after inserting a tag the textarea scrolls back to the top):

add the following line at the start of the window.tagIt and window.linkIt functions

var st = textArray[i].scrollTop;

and the following line to the end of the same 2 functions

textArray[i].scrollTop=st;
Posted 48 months ago. ( permalink )

view profile

jrhyley says:

Good spot. I've fixed this problem, though I had to go about it a different way to get it to work on my end, for whatever reason.
Posted 48 months ago. ( permalink )

view profile

Gertrud K.  Pro User  says:

I used this script with Firefox 1.0.6 and everythig woked fine. Now I changed to Deer Park Alpha 2 and it does not work.
Posted 48 months ago. ( permalink )

view profile

jrhyley says:

Yes, Greasemonkey 0.5 under Deer Park is basically a completely different animal. Quite a few things that worked with older versions of Greasemonkey (and still work with gm 0.5 + firefox 1.0.x) now do not work. See this message from the mailing list for a brief summary of some of these issues.

Right now the prospect of rewriting all of my scripts to work with alpha software does not seem appealing.

Edit: This script was fairly easy to fix, though, so here's a new version that works with Deer Park. (This will not work with GM versions earlier than 0.5 beta)
Posted 48 months ago. ( permalink )

view profile

Gertrud K.  Pro User  says:

Great! Thanks a lot.
Posted 48 months ago. ( permalink )

view profile

Son of Groucho  Pro User  says:

Extremely useful. Many thanks!
Posted 48 months ago. ( permalink )

view profile

MacRonin47 says:

Thank you :-)

I went with the DeerPark version (GM5)
Posted 47 months ago. ( permalink )

Lili D [deleted] says:

you're a genius!! :D
Posted 47 months ago. ( permalink )

view profile

esperantonia  Pro User  says:

this is great. thank you
Posted 39 months ago. ( permalink )

view profile

ryran  Pro User  says:

Love this, by the way.

It seems that the problem where using any of the buttons scrolls the window back to the top, is back, though. :)
Posted 39 months ago. ( permalink )

view profile

jrhyley says:

Dang, it works for me. Any errors in the console?
Posted 39 months ago. ( permalink )

view profile

ryran  Pro User  says:

If you mean the javascript console (which I had never looked at until now) then, no. Hold on 'n I'll see if I can isolote a script conflict.
Posted 39 months ago. ( permalink )

view profile

ryran  Pro User  says:

heh. well that was pretty easy. I disabled everything except for it and it still doesn't work... So I don't know what to tell ya man. :\
Posted 39 months ago. ( permalink )

view profile

jrhyley says:

That code is way old, so I no longer really comprehend it very well. I decided to start fresh with some borrowed code. Does it work now?
Posted 39 months ago. ( permalink )

view profile

steeev  Pro User  says:

i made a small mod to the rich edit script. it basically adds a "userlink" and "grouplink" option

so say you highlighted a username say tom then click "userlink" it will convert it to a link to that flickr users photostream

or say you wanted to make a link to the mutants group, you could highlight the word mutants then click the grouplink link and it will convert it to a link to the mutants group.

you can get my modified version of the script here: steeev.f2o.org/flickr/flickrrichedit.user.js
Posted 39 months ago. ( permalink )

view profile

jrhyley says:

Go creative commons! I have no idea why anyone would need a script to do that, but if you do, go right ahead wit' yo' bad self.
Posted 39 months ago. ( permalink )

view profile

ryran  Pro User  says:

Still doesn't work [properly] for me.. it does for you? How weird...
Posted 39 months ago. ( permalink )

view profile

Kevin Severud  Pro User  says:

ryran, have you tried disabling all extensions except for greasemonkey or just user scripts? I too had a problem and believe I've found a conflict with Google toolbar v2 (although I have another machine that has no problem with Google toolbar). Go figure.
Posted 39 months ago. ( permalink )

view profile

jrhyley says:

I think the conflict with google toolbar is a known issue, but it would effect every greasemonkey script, not just this one.

Update: I think I finally have this bastard licked. Anyone who was having problems with the scrolling issue, install the latest version and it should work for you now.
Posted 39 months ago. ( permalink )

view profile

Remiss63  Pro User  says:

i love this hack. i use it constantly, all the time, every day.

a question: is there a reason why you don't have the ability to underline as one of the rich text edit features?
Posted 33 months ago. ( permalink )

view profile

jrhyley says:

Because nobody ever asked for that before. ;)

Try it now.
Posted 33 months ago. ( permalink )

view profile

Shari DeAngelo  Pro User  says:

Now this is cool! Thanks, much!

--
Seen in a discussion of Utata. (?)
Posted 31 months ago. ( permalink )

view profile

Kathy~  Pro User  says:

what about colors..... it would be nice to write in different colors

--
Seen in a discussion of Flickr Hacks. (?)
Posted 31 months ago. ( permalink )

view profile

josue salazar  Pro User  says:

yeah, thanks
Posted 30 months ago. ( permalink )

view profile

CláudiaM  Pro User  says:

Oh wowI didn´t know

THIS
existed
Thanks!Cláudia
Posted 29 months ago. ( permalink )

view profile

nailuj.., says:

Exelent thanx
Posted 29 months ago. ( permalink )

view profile

Linda B (Wine Diva)  Pro User  says:

I use this script religiously. I love it! Now with the new Flickr group updates, I see an extra set of edit tools below the comment box. Any way to get rid of those?
Posted 29 months ago. ( permalink )

view profile

apurdam (Andrew)  Pro User  says:

Linda said:

I use this script religiously. I love it! Now with the new Flickr group updates, I see an extra set of edit tools below the comment box. Any way to get rid of those?


And I say so too.
I get a new set of italic bold quote link
underneath, just before the
Invite this photo to

line. This may only be an issue for folks who are groupo admins.
Posted 29 months ago. ( permalink )

view profile

jrhyley says:

Fixed. The new 'add to group' thing uses a hidden textarea for some reason, was throwing the script off. (flickr folks, a hint: <input type="hidden">)
Posted 29 months ago. ( permalink )

view profile

Linda B (Wine Diva)  Pro User  says:

Thanks! That was quick :-D
Posted 29 months ago. ( permalink )

view profile

jrhyley says:

Glad to be of service. I love the new email alerts thing. I have mine routed to my phone. :)
Posted 29 months ago. ( permalink )

view profile

UBopp says:

I have used this script every time I make a comment since I found it. Thank you!

I wish the script would open the linked page in a new browser window (I really mean a new tab in Firefox, but I think it's the same thing).

Could you consider making this change to your script (which I think people would like), or tell me how to do it?

PS: I don't usually use anywhere near this much formatting, but it is your script.

Posted 28 months ago. ( permalink )

view profile

jrhyley says:

I think it's fair to say that a larger number of people would absolutely detest that. I, for instance, become quite annoyed when a link doesn't behave in the way it is supposed to -- if i want it to open a new tab, I'll hold the CTRL key when I click it.

That said, here you go.
Posted 28 months ago. ( permalink )

view profile

UBopp says:

Oops. Sorry, I guess you do know your own incredibly popular add-on and its users better than I do!

And thanks for customizing it for me.
Posted 28 months ago. ( permalink )

view profile

hidden side  Pro User  says:

Just what I'm looking for!

Posted 28 months ago. ( permalink )

view profile

Shari DeAngelo  Pro User  says:

I use this all the time and is easily my most used tool. I have a question though-- Is it possible to adapt this script to work on the photo description (in the photo page) box? I tend to do lots of linking and find myself wishing this tool was up there as well.

Either way, thank you.... much much appreciated tool!
Posted 28 months ago. ( permalink )

view profile

jrhyley says:

I've looked at that several times, but haven't yet seen a way to do so. The text box doesn't exist until you click to make changes, and all greasemonkey scripts run before the page finishes loading. I'd really like for the script to do this, but I just don't see a robust way to do it. :(
Posted 28 months ago. ( permalink )

view profile

leff  Pro User  says:

could you add a function* to the page, then change the onclick to point to it? I'm not sure if it's possible. It's certainly way farther than I've ever taken greasemonkey.

* this function would be a wrapper around the existing function, but would add the links too.
Posted 28 months ago. ( permalink )

view profile

jrhyley says:

Good luck even finding the onclick, or where it is defined. Have you seen flickr's code lately? Horrors. Horrors. I just spent 3 hours wading through it and have less idea where to start than I did before I started. I officially renounce all programming languages save BASIC. 10 GOTO 10

Edit: all that bitching is basically me saying I'm going to look at it later when my brain un-melts. Take heart, Shari and all you others who want this feature, I haven't turned down a user request yet.
Posted 28 months ago. ( permalink )

view profile

GÜLŞAH  Pro User  says:

bence çok güzel
Posted 27 months ago. ( permalink )

view profile

Shari DeAngelo  Pro User  says:

OK, then, I'll just hang out and cheer ya on. :-)

Seriously... thanks.
Posted 27 months ago. ( permalink )

view profile

hangglide  Pro User  says:

@jrhyley. I love your script. I see a number of users have already requested the feature that I just logged on to request. :-) That is, make this work on the photo description field. I also read your reply about the field not existing until it is clicked. I thought you may find this script interesting. It adds a button after the photo description is activated. You may be able to see how ElusiveByte did it and implement it in your script.

I hope that helps. :-)
Posted 27 months ago. ( permalink )

view profile

Todd Moon  Pro User  says:

Hi there. I like your script. It's simple and does neat stuff. I made it work with the photo description editor.

If you examine the source you'll see that I eliminated the global variables you were using. I like to avoid them when possible. It also would have been slightly cumbersome to use the array of text areas when I was manually adding one to it. Instead I record the target text area as a property of each link itself. (Yay for expando!). I tried recording it in the access bar div, but for some reason trying to get a handle on the text area from a link by using this.parentNode.targetTextArea was just not working.

I created functions for each of the edit operations. Each operation is wired up with my addEvent function which, when the event fires, allows the handler to reference the source of the event with a handy "this.". Each event handler calls the tagIt or linkIt functions. I also made those functions local and not on the unsafeWindow. With my changes they didn't need to be public, and it's better to keep them private when possible.

I made other minor changes.

www.toddmoon.com/GreaseMonkey/flickrrichedit. user.js

Feel free to use it as you wish.

If you're curious, you can read all about the onclick and where it's defined in my thread in Flickr Hacks. (Hey, I just used this script to make that link. :) )

--
Seen in a discussion of Flickr Hacks. (?)
Posted 27 months ago. ( permalink )

view profile

jrhyley says:

Indescribably awesome! This was basically the direction I was going, but I was having a hard time with the flickr side of things -- the code, she burns.

I'll go ahead and 'check this in', as it were, but one thing I'd like to fix is the in-situ editing in places other than a photo page, namely the photostream. I'll have to look at it after I get home from work.

Again, thanks so much for saving me from that horribly obfuscated flickr-code!
Posted 27 months ago. ( permalink )

view profile

Todd Moon  Pro User  says:

Hey, no problem. This is the fourth GM script I've worked on in the past two weeks. I think I'm developing a problem. (oh geeze, no pun intended).

I just rewrote much of the script. I renamed the "access bar" to "control bar" and made a ControlBar type. When constructing a ControlBar you pass in the target text area and four boolean values that control the visibility of the four controls. You see, the Blockquote tag is unsupported in a photo description, so now it won't show that control above the description editor.

I also added a small margin between the control bar and the text area. At some point I also added margins between the various controls. They needed some breathing room.

I made it object-oriented because I could, and I had never done that before with javascript. :)

The javascript beautifier I used worked wonders on the flickr scripts. The variable names were still unintelligible, but the important ones weren't too hard to figure out from the context. Also, _ge() is flickr's getElementById function.

Figuring out the code for the other in situ editors shouldn't be too hard. I'm sure they all follow the same pattern.
--
Seen in a discussion of Equirectangular. (?)
Posted 27 months ago. ( permalink )

view profile

Todd Moon  Pro User  says:

Hello, again.

I started a new thread in Flickr Hacks for my version of the script. I did an almost complete rewrite of this script. I added support for the in situ editors in a photo stream. Adding support for sets and collections should be easy, but I wanted to release this new version for now.

I added some header info in the script and credited you in the copyright for the ideas and code I borrowed. I also licensed the script with the GPL.

I'll probably keep hosting a copy of it, and if you want to mirror it, or make your own changes or whatever you'd like, feel free!

Thanks for the inspiration and code!

Differences you might notice:

I fixed a bug restoring the selection after inserting a tag. You can now select text and press Bold then Italic and you will get what you expect.

Inserting the tag is now a single text replacement, so if you press Undo, it will undo the entire tag insertion. Previously that would only undo the end tag and you had to hit undo again to undo the start tag.

I removed the default "http://" in the link prompt to make it easier to paste in a full link you already have in the clipboard.

--
Seen in a discussion of Flickr Hacks. (?)
Posted 27 months ago. ( permalink )

view profile

jrhyley says:

Wow, great job! Didn't mean to fall off of the earth for two weeks, but sometimes these things can't be avoided. ;) I've updated the copies hosted at my site and userscripts.org, so that users stand at least a passing chance of noticing that there's a new version. Really, capital job, my good man!
Posted 26 months ago. ( permalink )

view profile

kiki follettosa  Pro User  says:

Hi, I'm an admin for a group called Let's Screenshot!, and we'd love to have your photo added to the group.
Posted 24 months ago. ( permalink )

view profile

ULTRALAW  Pro User  says:

What kind of link can I put on the link code?
Because all those I put seem to be erroneous.
Why is that?
Posted 22 months ago. ( permalink )

view profile

mixmagtmb says:



Great job! Didn't mean to fall off of the earth for two weeks, but sometimes these things can't be avoided. ;)




Posted 18 months ago. ( permalink )

view profile

Miguel Netto  Pro User  says:

great job
"Luz de velas (Candle light)" by Miguel Netto [?]
Luz de velas (Candle light)
Posted 15 months ago. ( permalink )

view profile

Newaccount-flickr/THEACIDSCREEN says:

test
Posted 15 months ago. ( permalink )

view profile

Newaccount-flickr/THEACIDSCREEN says:

Sweet works with OPERA ftw
Posted 15 months ago. ( permalink )

view profile

bruce grant  Pro User  says:

Script still works under FF3, but it smushes the controls all together, like...

italicboldquotelink
Posted 13 months ago. ( permalink )

view profile

*----------------------------* says:

Very Very Good
Posted 13 months ago. ( permalink )

view profile

switchback studios says:

great stuff
Posted 10 months ago. ( permalink )

view profile

Fran.Marchena  Pro User  says:

It is a very nive Eeh, sorry... a very nice...eeh, no, no...

a very nice script!

Posted 10 months ago. ( permalink )

view profile

sea kay  Pro User  says:

very nice!
Posted 9 months ago. ( permalink )

view profile

CláudiaM  Pro User  says:

Thank you!

Cláudia
--
Seen in a discussion of the group "Flickr Hacks" (?)
Posted 7 months ago. ( permalink )

view profile

Priom says:

thankyou!
Posted 4 months ago. ( permalink )

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).

[?]
view photos Uploaded on May 28, 2005
by jrhyley

jrhyley's photostream

200
uploads

This photo also belongs to:

Stuff I Made (Set)

14
items

Flickr Hacks (Pool)

Tags

Additional Information

AttributionNoncommercialShare Alike Some rights reserved Anyone can see this photo

Add to your map