This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-02-13 22:38:36

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

BB code 'toolbar'

My suggestion is that we add a toolbar to the top of new post entry fields, to make entering BBcode in easier.

Here is a working draft I threw together:

Code:

<html>
<head>

</head>
<body>
<button onclick='document.getElementById("post").value+="[b]"+prompt("Please enter the text you would like bolded:")+"[/b]"'><b>B</b></button>

<button onclick='document.getElementById("post").value+="[i]"+prompt("Please enter the text you would like italicised:")+"[/i]"'><i>I</i></button>

<button onclick='document.getElementById("post").value+="[u]"+prompt("Please enter the text you would like underlined:")+"[/u]"'><u>U</u></button>|

<button onclick='document.getElementById("post").value+="[color="+prompt("Please enter the text you would like colour you would like the text to be:")+"]"+prompt("Please enter the text you would like coloured:")+"[/colour]"'><font color='red'>C</font><font color='orange'>o</font><font color='yellow'>l</font><font color='green'>o</font><font color='blue'>u</font><font color='violet'>r</font></button>

<button onclick='document.getElementById("post").value+="\n[code]\n\n[/code]"'><code>code</code></button>

<button onclick='document.getElementById("post").value+="[url="+prompt("Please enter the web address you would like to link to:")+"]"+prompt("Please enter the text to display:")+"[/url]"'><a href='javascript:void'>link</a></button>

<button onclick='document.getElementById("post").value+="[email]"+prompt("Please enter the email address you would like to link to:")+"[/email]"'><a href='javascript:void'>email</a></button>

<button onclick='document.getElementById("post").value+="[quote="+prompt("Please enter the name of the person you are quoting:")+"]"+prompt("Please enter the quote text:")+"[/quote]"'><q>quote</q></button>

<button onclick='document.getElementById("post").value+="[img]"+prompt("Please enter the URL of the image:")+"[/img]"'><span style='border:1px solid black'>image</span></button>

<button onclick='document.getElementById("smileys").style.display=(document.getElementById("smileys").style.display=="block") ? "none" : "block"'>:)</button>
<br/>
<div id='smileys' style='display:none'>
<img src='http://scratch.mit.edu/forums/img/smilies/smile.png' onclick='document.getElementById("post").value+=":)"'>
<img src='http://scratch.mit.edu/forums/img/smilies/neutral.png' onclick='document.getElementById("post").value+=":|"'>
<img src='http://scratch.mit.edu/forums/img/smilies/sad.png' onclick='document.getElementById("post").value+=":("'>
<img src='http://scratch.mit.edu/forums/img/smilies/big_smile.png' onclick='document.getElementById("post").value+=":D"'>
<img src='http://scratch.mit.edu/forums/img/smilies/yikes.png' onclick='document.getElementById("post").value+=":o"'>
<img src='http://scratch.mit.edu/forums/img/smilies/wink.png' onclick='document.getElementById("post").value+=";)"'>
<img src='http://scratch.mit.edu/forums/img/smilies/hmm.png' onclick='document.getElementById("post").value+=":/"'>
<img src='http://scratch.mit.edu/forums/img/smilies/tongue.png' onclick='document.getElementById("post").value+=":P"'>
<img src='http://scratch.mit.edu/forums/img/smilies/lol.png' onclick='document.getElementById("post").value+=":lol:"'>
<img src='http://scratch.mit.edu/forums/img/smilies/mad.png' onclick='document.getElementById("post").value+=":mad:"'>
<img src='http://scratch.mit.edu/forums/img/smilies/roll.png' onclick='document.getElementById("post").value+=":rolleyes:"'>
<img src='http://scratch.mit.edu/forums/img/smilies/cool.png' onclick='document.getElementById("post").value+=":cool:"'>
</div>

<textarea id='post' style='width:530px;height:200px'></textarea>
</body>
</html>

Of course, it is not polished up enough yet, but it gives the general gist of what I mean.

Any suggestions as to what would be good/bad, and what should and shouldn't be included are greatly appreciated.

P.s. To the scratch team: I would be glad to donate my time to help coding this, if you would like.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#2 2010-02-13 22:53:25

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: BB code 'toolbar'

Yes.
Yes.
Yes.
Yes.
Needed.


~ihaveamac - visit ihaveamac.net

Offline

 

#3 2010-09-03 08:31:16

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: BB code 'toolbar'

I agree! Also, bump!


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#4 2010-09-04 13:02:28

FlexiStudio
Scratcher
Registered: 2010-02-28
Posts: 1000+

Re: BB code 'toolbar'

On my site, it looks like this little quick post box at the bottom. Where you see the links, BBCode: on [img] tag: on Smiles: on, there are images of all the smilies you can enter. When clicked, it inserts the text like : and ) into the text box. Ill get a bit of the code in a second and post it on here....


Hey I'm back!-
FlexiStudio

Offline

 

#5 2010-09-04 14:04:15

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: BB code 'toolbar'

I agree - it would be helpful, and would eliminate the load of posts we get describing how to use BBCode  tongue

Offline

 

#6 2010-09-04 19:29:36

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: BB code 'toolbar'

Hey, that would be really useful!  big_smile


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#7 2010-09-04 22:17:00

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: BB code 'toolbar'

Like what they have on the wiki? I support!  big_smile


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

Board footer