Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Bug or intended?

Quote Reply
Bug or intended?
Hi,

When clicking the smilie images to insert the code automatically into posts (and the other markup), the code is forced to the bottom of the message no matter where your cursor is.

I think it would be better to insert the code at the cursors position.

This code should do that:

Code:
function storeCaret (html)
{
if (html.createTextRange)
html.caretPos = document.selection.createRange().duplicate();
}
function insertAtCaret (text) {
if (document.Sign.html.caretPos)
{
var caretPos = document.Sign.html.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
}
else
alert("You must click in the text area before you can insert html");
}

.......then you want something like:

Code:
<input type="button" onclick="insertAtCaret(' ');" value="Bold">


Last edited by:

jagerman: Sep 14, 2001, 2:46 PM
Quote Reply
Re: [PaulWilson] Bug or intended? In reply to
Paul

Works fine with me!

Altough I don't understand half the faces.

I think in a forum like this; they could do away with the Icons, and the smileys. No need for them. IMO. Blush

Wil

- wil
Quote Reply
Re: [PaulWilson] Bug or intended? In reply to
happens to me too (I clicked here and it went there -> to the last of my returns / line breaks. )



Frown

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [wil] Bug or intended? In reply to
Wil it can't work for you - check the javascript code:

document.post.post_message.value += "[" + tag + "]";

That adds the tag to the end of the textarea.

Quote Reply
Re: [PaulWilson] Bug or intended? In reply to
Paul

Yes it does. Aha, wait a minute. Now I get you.

I've always written a line and then entered a Blush smiley and therefore it works fine. With no line breaks or whatever. Straight after the text.

But if you are working backwards and go back to insert a smiley, I can see your problem.

But why would you want to work backwards? Tongue

PS <= that guy looks well scary!!!!

Cheers

- wil

Last edited by:

wil: Sep 12, 2001, 7:14 AM
Quote Reply
Re: [wil] Bug or intended? In reply to
Who's working backwards?

It should just insert the smilie/markup where the cursor is and not at the bottom.

Maybe you read a post and wish to insert a smile or markup and the buttons become useless as you aren't going to want the markup at the very bottom so you end up having to type it.


Last edited by:

PaulWilson: Sep 12, 2001, 7:21 AM
Quote Reply
Re: [PaulWilson] Bug or intended? In reply to
Paul

What I was saying is that it should insert smileys at the end of the line, like so Blush instead of a few lines downa s you're trying to suggest?

You could always just use cut & paste?

Anyway, IMO, I'd get rid of all smileys and icons. I just don't see the need for icons at all. Sorry.

Wil

And can we have an option to turn "Send e-mail notification on reply" to OFF in the user profile. Kinda starting to annoy me all these emails coming in...

SmileWinkFrownTongueCoolBlush[sarcastic]CrazyMadShockedLaughUnsureUnimpressedSlyPirate

Who did these graphics? Mad, aren't they!

- wil
Quote Reply
Re: [wil] Bug or intended? In reply to
Quote:
And can we have an option to turn "Send e-mail notification on reply" to OFF in the user profile.

Um already there.
Quote Reply
Re: [PaulWilson] Bug or intended? In reply to
Well spotted, batman!

Ugh. This is really annoying me now. I can't help put throw in a Blush. The little face looks so cute, it'd be a shame to waste it Blush.

Thanks.

- wil
Quote Reply
Re: [wil] Bug or intended? In reply to
Ahuh hummm...........

Quote:
Anyway, IMO, I'd get rid of all smileys and icons. I just don't see the need for icons at all. Sorry.

Quote Reply
Re: [PaulWilson] Bug or intended? In reply to
Ah excellent - I was looking for a way to do that but I couldn't find any!

Thanks!

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Bug or intended? In reply to
Im sure you know this but forgot to mention that Sign.html needs to be changed to your form name and textarea name.