SMF Support > SMF 2.0.x Support

Changing cursor behaviour when using BBC tags

(1/4) > >>

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.

--- End quote ---


--- 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]

--- End quote ---


--- 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 ...

--- End quote ---

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 :)

K@:

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

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 PM ---Now please can anybody tell me how I remove the first URL button to avoid confusion?  Thanks :)

--- End quote ---

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 :)

K@:
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?

Navigation

[0] Message Index

[#] Next page

Go to full version