Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. Tab size do not match in editors and final rendering

Tab size do not match in editors and final rendering

Scheduled Pinned Locked Moved Site Bugs / Suggestions
regex
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Patrice T
    wrote on last edited by
    #1

    Tabs (ASCII code= 9) in editors are set to 8 spaces, but are 4 spaces rendered pages. When pasting pieces of code indented with tabs, it make things complicated Article wizard editor is 8 spaces for a tab, but rendered articles are using 4 spaces for a tab. Same in Q&A and other places I checked. Paste this in an editor (CP Wizard Editor) to see:

    Number TD_SR TD_SREF TD_SRW TD_SRLPW Delta
    1,009 30 16 11 11 0
    2,003 43 22 14 14 0
    3,001 53 27 17 16 1
    4,001 62 32 19 18 1
    5,003 69 35 20 19 1
    6,007 76 39 23 21 2
    7,001 82 42 25 23 2
    8,009 88 45 26 24 2
    9,001 93 47 27 24 3
    10,007 99 50 28 25 3
    20,011 140 71 40 34 6
    30,011 172 87 49 40 9
    40,009 199 100 56 46 10
    49,999 222 112 62 48 14
    1,000,003 999 500 268 168 100
    4,000,021 1,800 901 483 279 204
    9,000,011 2,999 1,500 802 430 372
    16,000,057 3,999 2,000 1,068 550 518
    25,000,009 4,999 2,500 1,336 669 667
    36,000,007 5,999 3,000 1,602 783 819
    49,000,027 6,999 3,500 1,868 900 968
    64,000,031 7,999 4,000 2,136 1,007 1,129
    81,000,001 8,999 4,500 2,402 1,117 1,285
    100,000,007 9,999 5,000 2,668 1,229 1,439
    121,000,003 10,999 5,500 2,936 1,335 1,601
    144,000,001 11,999 6,000 3,202 1,438 1,764
    169,000,033 12,999 6,500 3,468 1,547 1,921
    196,000,001 13,999 7,000 3,736 1,652 2,084
    225,000,011 14,999 7,500 4,002 1,754 2,248
    256,000,001 15,999 8,000 4,268 1,862 2,406
    289,000,001 16,999 8,500 4,536 1,960 2,576
    10,000,000,019 99,999 50,000 26,668 9,592 17,076
    1,000,000,000,039 999,999 500,000 266,668 78,498 188,170

    Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

    C 1 Reply Last reply
    0
    • P Patrice T

      Tabs (ASCII code= 9) in editors are set to 8 spaces, but are 4 spaces rendered pages. When pasting pieces of code indented with tabs, it make things complicated Article wizard editor is 8 spaces for a tab, but rendered articles are using 4 spaces for a tab. Same in Q&A and other places I checked. Paste this in an editor (CP Wizard Editor) to see:

      Number TD_SR TD_SREF TD_SRW TD_SRLPW Delta
      1,009 30 16 11 11 0
      2,003 43 22 14 14 0
      3,001 53 27 17 16 1
      4,001 62 32 19 18 1
      5,003 69 35 20 19 1
      6,007 76 39 23 21 2
      7,001 82 42 25 23 2
      8,009 88 45 26 24 2
      9,001 93 47 27 24 3
      10,007 99 50 28 25 3
      20,011 140 71 40 34 6
      30,011 172 87 49 40 9
      40,009 199 100 56 46 10
      49,999 222 112 62 48 14
      1,000,003 999 500 268 168 100
      4,000,021 1,800 901 483 279 204
      9,000,011 2,999 1,500 802 430 372
      16,000,057 3,999 2,000 1,068 550 518
      25,000,009 4,999 2,500 1,336 669 667
      36,000,007 5,999 3,000 1,602 783 819
      49,000,027 6,999 3,500 1,868 900 968
      64,000,031 7,999 4,000 2,136 1,007 1,129
      81,000,001 8,999 4,500 2,402 1,117 1,285
      100,000,007 9,999 5,000 2,668 1,229 1,439
      121,000,003 10,999 5,500 2,936 1,335 1,601
      144,000,001 11,999 6,000 3,202 1,438 1,764
      169,000,033 12,999 6,500 3,468 1,547 1,921
      196,000,001 13,999 7,000 3,736 1,652 2,084
      225,000,011 14,999 7,500 4,002 1,754 2,248
      256,000,001 15,999 8,000 4,268 1,862 2,406
      289,000,001 16,999 8,500 4,536 1,960 2,576
      10,000,000,019 99,999 50,000 26,668 9,592 17,076
      1,000,000,000,039 999,999 500,000 266,668 78,498 188,170

      Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #2

      This is in Firefox, right? All fixed.

      cheers Chris Maunder

      P 1 Reply Last reply
      0
      • C Chris Maunder

        This is in Firefox, right? All fixed.

        cheers Chris Maunder

        P Offline
        P Offline
        Patrice T
        wrote on last edited by
        #3

        Yes :) Is it specific to FF ?

        Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

        C 1 Reply Last reply
        0
        • P Patrice T

          Yes :) Is it specific to FF ?

          Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

          C Offline
          C Offline
          Chris Maunder
          wrote on last edited by
          #4

          Kinda. Mozilla still doesn't support the standard tab-size. One needs to use -moz-tab-size.

          cheers Chris Maunder

          P 1 Reply Last reply
          0
          • C Chris Maunder

            Kinda. Mozilla still doesn't support the standard tab-size. One needs to use -moz-tab-size.

            cheers Chris Maunder

            P Offline
            P Offline
            Patrice T
            wrote on last edited by
            #5

            Looks like I have to moderate my claim. Looks like it works in textarea So in Article Wizard Editor: - in Render mode, it don't work, tabs are 8 spaces. - In Source mode, tabs are 4 spaces. On FF :) Looks even more complicated:

            Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

            C 1 Reply Last reply
            0
            • P Patrice T

              Looks like I have to moderate my claim. Looks like it works in textarea So in Article Wizard Editor: - in Render mode, it don't work, tabs are 8 spaces. - In Source mode, tabs are 4 spaces. On FF :) Looks even more complicated:

              Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

              C Offline
              C Offline
              Chris Maunder
              wrote on last edited by
              #6

              Have you tried Ctrl+F5? I'm not seeing the issue my end.

              cheers Chris Maunder

              P 1 Reply Last reply
              0
              • C Chris Maunder

                Have you tried Ctrl+F5? I'm not seeing the issue my end.

                cheers Chris Maunder

                P Offline
                P Offline
                Patrice T
                wrote on last edited by
                #7

                Thank you for your time searching. It happen that Suddenly, I see a change of behavior. My understanding so far is that in some conditions that I am investigating further, there is a problem with the css. I am using FF since years. For years, I have taken the habit to convert tabs to spaces before pasting in CP editor or textarea. Then I recently understood that CP pages where rendering tabs with 4 spaces. So I started to paste code formatted with tabs set to 4 spaces, prepared in my editor. Then today - textarea started to render the tabs with 4 spaces, I don't remember seeing this before. Article Wizard Editor: - before today, I don't remember seeing the <pre> background being applied in rendered contain of articles, and tabs were 8 spaces. - Then today, wizard started to render correctly while opening the page, then after clicking 'Source' button 2 times, new rendering lost the background and 4 spaces. - then now everything look fixed. Is it possible that someone fixed some kind of css override today ? [Update] or it is FF weird behavior.

                Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

                C 1 Reply Last reply
                0
                • P Patrice T

                  Thank you for your time searching. It happen that Suddenly, I see a change of behavior. My understanding so far is that in some conditions that I am investigating further, there is a problem with the css. I am using FF since years. For years, I have taken the habit to convert tabs to spaces before pasting in CP editor or textarea. Then I recently understood that CP pages where rendering tabs with 4 spaces. So I started to paste code formatted with tabs set to 4 spaces, prepared in my editor. Then today - textarea started to render the tabs with 4 spaces, I don't remember seeing this before. Article Wizard Editor: - before today, I don't remember seeing the <pre> background being applied in rendered contain of articles, and tabs were 8 spaces. - Then today, wizard started to render correctly while opening the page, then after clicking 'Source' button 2 times, new rendering lost the background and 4 spaces. - then now everything look fixed. Is it possible that someone fixed some kind of css override today ? [Update] or it is FF weird behavior.

                  Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein

                  C Offline
                  C Offline
                  Chris Maunder
                  wrote on last edited by
                  #8

                  Patrice T wrote:

                  Is it possible that someone fixed some kind of css override today ?

                  Yeah - I did :) One bit you're missing is that we actually replace tabs with spaces on the backend.

                  cheers Chris Maunder

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups