News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Changing cursor behaviour when using BBC tags

Started by Chalky, March 30, 2012, 01:45:35 PM

Previous topic - Next topic

Chalky

Sorry, I don't know if this is in the right section and I don't even really know what I'm asking, but is there a way to change where the cursor lands after adding a BBC url or img tag?

To help explain what I'm asking, I'll quote the exchange I have just had with my co-admin.  I'm hoping somebody here will understand what she wants better than I do and point me in the right direction.  Thanks

Quote from: Co-Admin
When we insert a link, whether for a URL or a picture, or even a quote, the formatting is inserted in the post but the cursor remains outside it. Can we have it so that when we have a formatting instance, the cursor automatically goes into the right place.

For example, if I click now on the insert URL icon, I get this in the text box:

[url][/url] ... but the cursor comes after the final ], which means fiddling about to get the cursor back between the ] and [ to paste the link. Same applies with quote and img formatting.

Quote from: Sabrinova
I'm not sure I know what you mean...   I know it takes a bit of fiddling to make a live link because you have to go back and add the = sign and URL in the first tag, but if I just hit the link button I get the cursor between the tags like so: [url]cursor here[/url]

If I type the text first then select it and hit the URL button, it puts the whole thing inside the tags for you leaving it all selected blue.

So where do you want the cursor to be automatically?

Have you tried toggling to WYSIWYG with the button and then doing it?  Try it with both Opera and Chrome and see if there's any difference?

Same thing with the [img] tag, I press the button and the cursor lands between the tags [img]here[/img]

Quote from: Co-Admin
it's the fiddling about putting the "=" in and adding the URL that's the problem ... my cursor always ends up outside the end of the tags regardless of browser ...

If I type HERE, for example, and then click the img or hyperlink button, it puts it inside the tags, but the cursor jumps to the end of the tag, i.e. right after the last ], regardless of whether it's an img or hyperlink button ...

Chalky

Update:  I have made this modification and she's happy  :laugh:

Now please can anybody tell me how I remove the first URL button to avoid confusion?  Thanks :)

kat

Quote from: Sabrinova on March 31, 2012, 06:55:49 PM
Update:  I have made this modification and she's happy  :laugh:

If she inserts the link, highlights it, then hits the BBC button, it does the same thing.

Women, huh? ;)

Quote from: Sabrinova on March 31, 2012, 06:55:49 PMNow please can anybody tell me how I remove the first URL button to avoid confusion?  Thanks :)

You mean the icon you hit, to get the code to show in the post?

Chalky

Sorry, K@, Ricky has just solved it for me here.

Watch it with the women remarks LOL  :laugh:  No, just selecting the text and hitting the URL button, you still have to faff about if you want the kind of URL I've used above of the form: [url=http://www.simplemachines.org/community/index.php?topic=472784.msg3304448#msg3304448]here[/url].  Now we have a nice little pop-up box for the URL that makes a "live link" automatically before dropping your cursor neatly in the right place to carry on.

The button I then wanted to remove is the SMF default URL button which is redundant now I have the fancy pop-up URL button  ;)

Anyway, she's happy now, and I admit it is much better/easier.  So I'll mark this as solved.  Thank you :)

kat

Ah, yeah, that you do. :(

I know that you know that I know that you know that... something....

Oh, yeah! Knew I was larkin'. :) (About women)

I'll have to look at Ricky's solution, coz I always thought that was a pain in the arse, too. It worked OK with SMF v1, oddly enough.

I like the word "Faffing". Do only us English use that, or do others, too?


Chalky

LOL it's a good word isn't it  :laugh:  I've only ever heard Brits say it, but that doesn't mean others don't...

So yes, we're happy now, we have the IMG Pop-up mod for the IMG tag, Bot Chatterbox's solution for the URL pop-up and thanks to Ricky the now-redundant default button has been removed to avoid confusion.  It's looking good  :D  I can't wait until I can make my little forum public to share, but for now we have to keep it closed  :'(

kat

Just remember my sig, from now on, won't you? ;)

Chalky

I backed up yesterday hon, 'cos I'm a good girl :D  Once a week I'm backing up the database in phpMyAdmin, then exporting the SQL file to my hard drive, and using my FileZilla to copy all my files onto my computer, then I'm putting it all neatly together in a folder called "Backup" with the date :D

What I don't know is how to restore if I should ever need to LOL, but then I'm also keeping local copies of each version of each file as I pull it from my server to edit code, so if I do have a whoopsie I can just switch it back again :D

Ooh I wanted to reply to you somewhere else... where was it....?

kat

I do all that from CPanel>Files>Backups, coz you can backup both the database and the home directory, there.

From the same place, you can restore both, too!

Talking about odd English sayings, you even notice it when you move from the civilised south, up here to the north.

They sure talk weird, up here. ;)

Quote from: Sabrinova on April 01, 2012, 01:08:06 PMOoh I wanted to reply to you somewhere else... where was it....?

Over there --->  ;)

Chalky

LOL by weird, you mean we talk proper!  How far north are you?  There's nowt weird about how we talk in Cheshire where I'm from LOL  (actually that was my Lancashire blood showing there  ;))

kat

Oddly enough...

CHESHIRE!

Just outside Altrincham.

How weird is THAT?!?!?!?

Chalky

Wow!  I'm from the Northwich side of Knutsford, about 20 minutes from you  :D :D

I'm not there anymore though, I'm somewhere much warmer and sunnier   8)

kat

Not really. Where I am has it's own little micro-climate. When everywhere had snow, we had sun! Kinda weird, here...

Been along the A56 to Northwich, past all the funny little villages, along there, then down to Nantwich.

Northwich seems kinda groovy, itself, apart from all the traffic. We're out in Oldfield Brow, which is quite countrified, near Dunham Massey, which is about five minute's walk away.

Chalky

Oh lovely, it is nice round there :)  Heehee, cool coincidence!!  :laugh:

I've lived just outside Northwich all my life, but I moved to Tenerife five years ago.  It's 21 degrees here right now, not that it affects me of course, I've been inside on my computer all day  :laugh: :laugh:

kat

Bit warmer than here, today.

It's been sunny, but still a bit chilly.

I had a chance to move to the British Virgin Islands, some years back.

My ex-wife didn't want to go.

Why not?

Coz they don't have a McDonald's nor a KFC...

Maybe that's part of why she's "Ex", huh?

Chalky

Oh no!!  LOL, she'd love it here, there are loads of the damn things  ::)

kat

Yeah, I know! My current wife's been there. She loves the place, apart from that kinda crap.

Advertisement: