Pasting Code into this forum

Hi, I'm a noob. How do I paste code into a discussion, and have it actually look like code.
Thanks!

The {code} block doesn't wrap long lines, but it does add a scroll bar if the line gets too long (really long).
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 480px;
color: #000000;
background-color: #B5FF6C;
overflow: auto;">
I use an AppleScript that's been tweaked over time to add various formatting</pre>
- it uses an HTML <pre> block. The script has several options, including the color and size of the block (I like to keep messages relatively small) - it is available here.
rccharles also posted a script in the User Tips Library with similar ideas (and a message reply link formatter I borrowed).

Similar Messages

  • Paste code on the forum

    Hi,
    This question is not related to this forum, per se, but many times I face difficulty in asking question where I need to paste some sample code on this forum. How to paste the code so that it gets formatted properly rather than just seeing unformatted code on the screen which makes it difficult to read? Any html tag to be used?
    Thanks

    check this for more format options:
    http://wikis.sun.com/display/Forums/Forums+FAQ
    Edited by: M.Jabr on Apr 6, 2011 1:36 AM

  • Why does the apps store not accept my ID and password, it works fine to log into this forum and it works for the apple store, but not to log in to buy apps, it just keeps telling me that the id or password is wrong, and I know it isn't

    Why does the apps store not accept my ID and password, it works fine to log into this forum and it works for the apple store, but not to log in to buy apps, it just keeps telling me that the id or password is wrong, and I know it isn't

    I Just signed in to find the answer to this too.  I started having the same trouble today.

  • How can I write HTML code in this forums

    Sorry but I didn't know where to post this thread.....
    How can I write HTML code in this forums?

    Hello,
    Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
    In case of the &lt;a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
    When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
    Hope this helps,
    Arie.

  • Embedding screen grab into this forum

    Hi,
    I need to get a couple of screen grabs into a forum message... how do I that as I thought a simple copy and paste would work... but of course it didn't?
    Thank you.

    There are instructions for inserting images in [this user tip|http://discussions.apple.com/thread.jspa?threadID=121950].
    Your post should properly be in the [Feedback About Discussions|http://discussions.apple.com/forum.jspa?forumID=1076] forum, where it has been asked and answered many times. This forum is for questions about file sharing using Mac OS X 10.6 Server Snow Leopard.
    Best of luck.

  • How to post my code in this Forum under a good format?

    can any one tell me how to post the java resource code in here? when i just copy and paste. the format of the output is not so good, i saw some one posted some code under a very good format in this Forum, how to do that?

    If you want to post code that makes it easier on someone else to cut-n-paste, then put the code inside of the [ pre] and [ pre] tags (no blank space in between). If you want code that looks pretty (i.e., with syntax highlight, etc) but hard to cut-n-paste (at least for someone like me who uses Windows WordPad as a source code editor), put the code inside of the [ code] and [ code] tags (again no spaces in between). pre is an abbreviation for preformatted text!
    ;o)
    V.V.

  • Pasting code into Keynote

    Hi - does anyone have any tips on pasting code directly into Keynote from xCode. By simply copying and pasting it seems to screw up all the tabs. Thanks in advance.

    Not sure why it isn't working for you; it's working fine for me. The other thing you could try is converting the tabs to leading whitespaces.
    In Xcode you can set the preferences so that the editor uses leading whitespaces instead of tabs. This makes it much easier to copy and paste code from one app into another. There are two places where you can specify these settings. One is under Preferences>Indentation and the other is under Preferences>Text Editing (deselect the box that says "Editor uses tabs"). You can specify the number of spaces for each tab, etc...
    The above will only apply to any new code you write, so to convert the tabs in an existing document, do a Find/Replace operation within Xcode. Under the Find Options select "Regular Expression" and search for "\t" and replace with " " (four whitespaces or as many as you desire).
    A mixture of whitespaces and tabs can cause funkiness so be sure you replace all tabs before pasting the text into Keyntote.
    Hope that helps.
    Vid

  • Logging into this forum fails

    Hi there!
    First of all I have to apologize that i am posting here a problem and not feedback - but plz take a minute and see why:
    As I am having the problem with Safari that the auto login into forums doesn't work anymore I wanted to login here into the Apple-discussions board to get help. But the bad suprise was, that I am not able to log in here in anymore from my Mac and Safari.
    I am absolutely sure to use the right login data, as i can log in via my father's PC and Internet Explorer - from where I am typing this post here now as well.
    As pictures say more than a thousand words, I made two screenshots from the login-process, so you see how it looks:
    idisk.mac.com/gernot.heissel//Public/Discussions1.tiff
    idisk.mac.com/gernot.heissel//Public/Discussions2.tiff
    The 1st picture shows the dialogue to enter the login data - filled out.
    The 2nd picture shows the site I am led to when then pressing the "Sign In" button.
    As you can see it is the form that is used to create an account. On the right you can see that i am still logged out. And the funny thing is, that there is not even a field to type in an AppleID.
    I would really love to get some official help here, as this issue occurs especially here on this forum. And it is not good, not beeing able to login into the discussions forum from my Mac.
    Here is what i tried so far without success:
    - filling out the form I am led to when i want to login
    - delete all cookies of Safari
    - clearing cache of Safari
    - delete the Safari Library files (.pls or on what they are ending)
    - setting back safari
    Another thing: When I login here via my father's PC, at first i am led to a page where it tells me, that the page I should have been taken doesn't exist, and that contains a link to the discussions-board. But i am loggedin, and when I click that link i can fiew the board an post as usual.
    So.. hope you can help me. It's hard to get help, when access to the help-board is denied...
    greetings
    Gernot

    Hi Gernot!
    No guarantees, but try the procedure that I have posted below.
    Delete Safari's Apple Cookies, and clear the Cache.
    Quit Safari, and then reopen it.
    On the Discussions Sign In Page, do not enter any info in the text fields.
    Instead, under "Did you forget your password?", click on "Click here for assistance".
    On the page that opens, click on "Forget your Apple ID?".
    Enter the required info, and click Continue.
    ali b

  • Trouble signing into this forum

    If I go to this page on this forum (http://community.vzw.com/t5/DROID-RAZR-by-Motorola/bd-p/RAZR) and click on the Sign In right above the list of messages,  the sign in page it takes me to rejects my Username and password, saying the combination are not correct and won't let me sign in.   But if, from this same page on this forum,  I click on the Sign In in upper right corner (in the red header) it works fine except it takes me to page listing other forums but I can navigate back here and post.   This is a pain on my pc but on my RAZR the screen for this forum is different and the sign in acts like the non-red header one and rejects my login.
    Can anyone explain this to me? 

    Was able to sign in. Thanks anyways...
    Sly

  • Pasting code into iWeb

    Hi there. I'm trying to install JSKit Echo (comments) into my webpage, using iWeb through an FTP server. I need to paste an HTML snippet onto the homepage to proceed, but I can't! For some reason it just won't 'stick'. I've pasted other snippets in with no problem. Baffled! Anyone got any thoughts?

    If you paste the code in a HTML Snippet, you will not see anything in the widget. Not with this code. Not in iWeb. Publish, js-kit Echo is displayed on your website.
    You have to enlarge this 'empty' widget before publishing (height ~1500 px. you will have to enlarge more later)
    I use [Js-kit Echo|http://iweb.debutersurmac.com/siteiweb/Blog/Entrees/2009/7/23_Commentaires .html#widget0] and [IntenseDebate|http://iweb.debutersurmac.com/siteiweb/Blog/Entrees/2010/3/21Commentaires_gratuits_surFTP.html] on my (french) website.

  • Pasting code into word

    Hi, I've tried to paste my block diagram into word, but for some unknown reason parts of the diagram go missing and some parts blackout. Is there some technique to doing this where the resolution is good. My block diagram is fairly big, and asking to paste an excellent copy onto A4 may be asking too much. Is there a trick to doing this?
    Please help
    Thanks

    damsin wrote:
     I had a look at the code capture tool, and pardon my ignorance, I'm pretty new to labview, but I cant find the labview project directory. Could someone direct me and advise what to do. Do I add the Code capture tool at the top of the file dialogue window to the project directory, or have I to choose from the list?
    The project folder has nothing to do with a 'LabVIEW project", it is a plain folder in the NI hierarchy. For example under LabVIEW 8.0 in Windows XP, the default would be:
    C:\Program Files\National Instruments\LabVIEW 8.0\project
    Place the files in that folder. That's it!
    LabVIEW Champion . Do more with less code and in less time .

  • Unable to paste code into any files in DW CS6

    I am not having any luck using paste in the latest DW. I have used both the keyboard shortcut and the menu button but alas it just won't let me the bugger.
    I tried to change the keyboard shortcut but then was thrown another loop. As you can see below the buttons on the bottom of the window are 'undefined' - wtf?
    Is it because I am using the Creative Cloud version? Paste is a pretty essential tool in my workflow and any help would be greatly appreciated!
    If the photo doesn't load you can see it here:
    http://tinypic.com/r/290sswl/6

    I am using an iMac on Version 10.7.4
    This happens to all pages on all documents whether they are html, css, php
    I have two sites and set up a third dummy, I tested them and nothing is pasted. If it makes a difference I see the Edit on the Menu bar light up blue when I use the keyboard shortcut but that is as close as it gets.
    I have copied code from within the files that I am working on and exterior files like word, text editor for mac and code from firefox and none of it shows up.
    Did you see the photo that I posted on the website - the undefined buttons?
    I am thinking that I should re-download and re-install dreamweaver.
    Dreamweaver version is 12 build 5808

  • Message to SAP -not possible to enter FMS syntax correctly into this forum

    Please do something about this.
    If I try to enter something like this:
    SELECT CASE WHEN $[$13.10.Number]>0 THEN 'OK' ELSE NULL END
    it is corrupted when I post. You can see what it is supposed to read, but presumably the square brackets are translated as a Link by your editor. This is not very useful, and very annoying when trying to help other users. Square brackets are an integral part of B1 queries so please, either give us a workaround or remove this function. Or ditch the editor. The forum is littered with examples of this.
    Does this annoy anybody else? Make your feelings known.

    Bruce,
    Quick tip to avoid the Forum interface corrupting your script is to use the Code Tag shown next to the Bold, Italics and Underline tag on top of this area with a less than..greater than symbol.
    or use backslash as shown below
    '[%0\]'    $\[OCRD.CardCode]
    Backslash after the first dollar sign and backslash before the last ] (square bracket)
    Suda

  • Suggest me to format code in this forum

    please tell me how to put my code in proper format..
    i tried
    my codebut not work

    just sample to format my code..please ignore
    SQL> ed
    Wrote file afiedt.buf
    1  declare
    2  t t1%rowtype;
    3  begin
    4  t.id:=1;
    5  t.fn:='john';
    6  t.sn:='sn';
    7  insert into t1 values t;
    8  commit;
    9* end;
    You're using PRE tags which works ok and allows you to include other formatting such as bold and italics etc. but it tends to remove blank lines. You can also use the CODE tags which will leave in the blank lines but you can't use other formatting within it.
    This has Pre tags and blank lines and as you can see
    it tends to remove blank lines
      from inside the codeWhereas...
    This has Code tags which
    will leave in the blank lines
    but won't allow other formatting

  • When updating my Apps on my IPhone, it tells me my password is incorrect and wont let me log in.  I came to this site and redid my password, so I know its right (as I had to put it in here to get into this forum) and it still tells me its wrong.

    When I go to updaye my apps on my IPhone it tells me my passowrd is incorrect and wont let me log in.  I changed my passowrd on this site just to be sure I had it correct and it still wont let me log in and still tells me it is incorrect.  What can I do?

    Updating your Apps is different from the Support Communities and use different passwords. Your best bet is to start with the support links here: http://www.apple.com/support/itunes/account/ If one of those suggestions doesn't work, then hit the "Contact Support" link from the list to the left for additional options.

Maybe you are looking for