Text selected stays after using YaBB code button

Started by camelwalk, September 21, 2004, 05:52:13 PM

Previous topic - Next topic

camelwalk

I don't know if anyone has mentioned this, but in YaBB SE you could highlight some text and quickly add multiple YaBB codes to it using the buttons above. For example, I post a lot of articles, and I bold, size, and url the title. In YaBB SE the text stayed selected even after you added the first code, but in SMF 1.0 it does not.


[Unknown]

You sure?  It didn't do that to me, that I can remember... can you point me to a YaBB SE forum that does it?

I just tested it with a 100% genuine YaBB SE forum and it didn't.

-[Unknown]

Saint_3k

I agree with Canelwalk, YabbSE and virtually ANY other forum software allows you to quickly add tags to highlighted text without having to rehighlight the text between adding tags. SMF doesnt work this way, however, which is a crying shame. I have reported this on several occasions.

[Unknown]

Something must be broken with your browser if they behave that differently.  Everything works fine for me here, better than ever with YaBB SE.

-[Unknown]

Anguz

#4
[s][u][i][b]test[/b][/i][/u][/s]

Just did that selecting only once and clicking on the code buttons one after the other...

I'm using Firefox, what browser are you using, camelwalk?
Cristián Lávaque http://cristianlavaque.com

Peter Duggan


Jerry



- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Trekkie101

Testing in IE

Doesnt work, hmm there correct in what they said atleast in IE.

QuoteVersion: 6.0.2900.2180.xpsp_sp2_rtm.040803-2158IS
Cipher Strength: 128-bit
Product ID:76477-OEM-0011903-00109
Update Versions:; SP2;


Jerry

I think there was a fix for this posted awhile ago, but I cant remember the topic name or or how to fix it. ... it was to do with the script.js. . .


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Trekkie101


smd


[Unknown]

Quote from: Trekkie101 on December 31, 2004, 07:21:40 PM
Testing in IE

Doesnt work, hmm there correct in what they said atleast in IE.

QuoteVersion: 6.0.2900.2180.xpsp_sp2_rtm.040803-2158IS
Cipher Strength: 128-bit
Product ID:76477-OEM-0011903-00109
Update Versions:; SP2;

Like I said in another topic, it seems as if something was changed in Internet Explorer 6 or SP1 because it stops working around there *HOWEVER*, it also doesn't work for YaBB SE forums.

-[Unknown]

Anno

#12
The fix:

In /Themes/default/script.js in the function surroundText, as a second if option(in the IE part), insert this:

if (temp_length > 0){
    n = text1.length + text2.length + temp_length;
    caretPos.moveStart("character", -n);
    caretPos.select();
   }



www.fungifun.org [nofollow]

Peter Duggan

Quote from: Anno on January 01, 2005, 03:07:49 PM
n = text1.length + text2.length + lenght;

Haven't looked at this code, but I'm guessing that last should be 'length'?

Anno

#14
actually it should be caretPos.text.length

no, the function changed here in the last few days.
The variable previously named length  is now named temp_length , I edited it above.
www.fungifun.org [nofollow]

Elijah Bliss

I tried this out in FireFox and this is cool!

here's what I get in firefox when I highlight the text and click the "bold" button...
[b]works in FireFox[/b]

unfortunately this doesn't work in Safari, I get this instead:
works in FireFox[b][/b]

Is there any way to make this work in Safari?

[Unknown]

No.  It may be possible in later versions of Safari, but the necessary JavaScript just isn't available in the current version.  Same with Opera, if I remember right.

-[Unknown]

Elijah Bliss

Quote from: [Unknown] on January 01, 2005, 10:56:38 PM
No.  It may be possible in later versions of Safari, but the necessary JavaScript just isn't available in the current version.  Same with Opera, if I remember right.

-[Unknown]

that sucks.

If I were to submit a bug report/feature request to Apple (Safari has a bug report feature built in) what would I call this shortcoming so i could report it properly?

[Unknown]

In JavaSscript, the "textarea" object does not have either the properties selectionStart/selectionEnd/setSelectionRange or createTextRange.  Because of this, changing (or detecting) the current selection within a textarea is impossible.

-[Unknown]

Advertisement: