Shop OBEX P1 Docs P2 Docs Learn Events
tabs for formatting text — Parallax Forums

tabs for formatting text

nick bernardnick bernard Posts: 329
edited 2005-11-20 02:46 in General Discussion
how do i insert tabs in post to format pasted code?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]

Comments

  • Jim EwaldJim Ewald Posts: 733
    edited 2005-10-02 03:01
    In most browsers, the tab keystroke is interpreted as a navigation command to move to the next field or link on the page. The browser steals the keystroke before it ever gets to a text field on the page. The next best thing is to select a mono-space font, such as courier, and then use spaces to set column positions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim

    Parallax IT Dept.
  • PJMontyPJMonty Posts: 983
    edited 2005-11-07 05:17
    Jim,

    Except for the fact that no matter how many spaces you put in, the forum software strips out all but one space from the final message. I always double space between sentences, but it always shows up as a single space. Similarly, the only way for me to indent my closing below is to use the "List" formatting option which automatically indents. I could live with the lack of tabs if the forum didn't play "space" Nazi and only allow a single one in any location.
      Thanks, PeterM

    PS - I have ten spaces in between these two arrows: > < but all you see is one space.
  • Jim EwaldJim Ewald Posts: 733
    edited 2005-11-07 05:38
    I'm actually (finally?) working on the forums again. I'll take a look at why the spaces are getting truncated and report back in a few minutes....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim

    Parallax IT Dept.
  • Jim EwaldJim Ewald Posts: 733
    edited 2005-11-07 05:47
    The spaces appear to be truncated only when one uses the quick reply. If one uses the rich text editor, one··· should··· be··· able··· to··· space·· things··· out.....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim

    Parallax IT Dept.
  • Jim EwaldJim Ewald Posts: 733
    edited 2005-11-07 05:51
    Let's try some code:

    begin
    ··· while(true)
    ······· x = x + 1

    ··· // comment
    ··· writeline "this is an endless loop"
    ··· x = x - 1
    ··· for (y=0; y < 10; y++)
    ······· writeline "for loop"
    ······· next
    end



    // This was submitted in the rich text editor. I'll dig into the quick reply code and see why spaces get no respect there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim

    Parallax IT Dept.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-07 17:12
    Also code windows in rich text editor do not mess with the formating inside, I always use them when trying to do ASCII pictures.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-07 17:20
    This is a test of the Tab broadcast system, this is only a test.
    ·1 Tab
    ··2 Tabs
    ···3 Tabs
    ····4 Tabs
    This concludes the test of the Tab broadcast system, we now return you to your regularly scheduled programming.
    This is a test of the Tab broadcast system, this is only a test.
     1 Tab
      2 Tabs
       3 Tabs
        4 Tabs
    This concludes the test of the Tab broadcast system, we now return you to your regularly scheduled programming.
     
    

    Ok Tabs are translated to spaces when pasting into the rich text editor, even in formatted code windows.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • PJMontyPJMonty Posts: 983
    edited 2005-11-08 00:55
    Hey Folks,

    Just a guess here, but you're probably using Internet Explorer, right? Well, I use FireFox. I am reply using the standard reply text editor that allows me to make things bold, or italicized, or underlined, etc, etc. The one thing it won't let me do is type a message that displays with more than one space.

    Once more for those who care, I have put ten spaces between these arrows: > <

    Looks like one to me!
      Thanks, PeterM

    PS - I have attached an image that shows this message being composed and previewed. Note the difference in the number of spaces between the arrows in the composition area and in the preview.
    788 x 553 - 83K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-08 01:02
    Peter,

    ·· I'm just amazed at how different our screens look...Here's what I see using IE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
    582 x 375 - 39K
  • Jim EwaldJim Ewald Posts: 733
    edited 2005-11-08 01:03
    I use both here so tracking this one down shouldn't be too difficult [noparse][[/noparse]he says while pouring over pages of cryptic VB code]. It's tougher when you spend your life with C and it's various dialects.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim

    Parallax IT Dept.
  • PARPAR Posts: 285
    edited 2005-11-08 04:05
    Interesting. If you examine the html source code that the web browser (in my case, MSIE) shows, the ten SPACE characters are indeed present, but the rendered text shows only one SPACE??

    Here's a cut/paste of the relevant HTML source from PJM's posting:

    "I have put ten spaces between these arrows: >········· <<br><br>Looks like one to me!"

    Just in case the source code above·got mangled by whatever is interpreting this reply, that's:

    "I have put ten spaces between these arrows: & g t ;·[noparse][[/noparse]ten SPACES here]·& l t ; < b r > < b r> Looks like one to me!"

    What's this look like?:· |   &nbps;|· That should be 4 SPACEs between two vertical bars.

    [noparse][[/noparse]EDIT by PAR]: Well, I see ten spaces in the excerpted source code above. And, I see "&nbsp" instead of SPACEs in my own test text.· How about these?:

    |········· |· (ten SPACEs between two vertical bars)

    <········· > (ten SPACEs between a LT and a GT symbol)

    >········· <·(ten SPACEs between a GT and a LT symbol, like PJM's original text) PAR

    PAR
    PJMonty said...
    ...cut, cut...
    Once more for those who care, I have put ten spaces between these arrows: > <

    Looks like one to me!

    ...cut.cut...

    Post Edited (PAR) : 11/8/2005 4:11:12 AM GMT
  • Jim EwaldJim Ewald Posts: 733
    edited 2005-11-08 05:30
    I should just slap my forehead now and get it over with. The hard spaces should be converted to the '·' sequence. Based on your observations, I'm now wondering if what we are seeing is simply a case of how the data is presented to the server when a post is made. I just assumed that the data was getting there as intended. I'll run more tests on the FireFox browser. It's possible that it is condensing the spaces before the test is sent off to the server.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim

    Parallax IT Dept.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-11-08 05:48
    Gents -

    Call this a warning, or a reminder, as appropriate, but many applications programs permit or allow the following user option:

    Convert TABS to SPACES?

    For the purposes here, the respective browsers are the applications programs; thus the system (the server in this case) sees what was choosen to be CONVERTED and SENT per the users SETTINGS. I know of no such setting within IE but that doesn't mean one doesn't exist in some obscure, little-used USER Options cubbyhole, usually visited by only Gates' most devious programmers!

    Regards,

    Bruce Bates
  • TD-LinuxTD-Linux Posts: 33
    edited 2005-11-20 02:46
    I see the space problem.

    HTML condenses multiple spaces into one.
    > < is what the plain old JS editor sends. (You can't see the spaces)
    >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp< is what the ActiveX editor creates.

    In HTML, &nbsp is replaced by a space, which is not condensed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SX-Key + SX52 + Proto Board + SX-Key Software + Computer + USB to Serial Adapter + LED = Blinky LED!
Sign In or Register to comment.