• I’m trying to use this to post Windows registry editor code but it seems that it doesn’t have the option to limit or define a total number of lines shown and add a vertical scroll bar.

    I ask this because posting hundreds of lines worth of code make it difficult for the user to see all the post until scrolling way down the code to read the rest, which follow after the code.

Viewing 1 replies (of 1 total)
  • Each code block is wrapped on output in a div with the class wp_syntax. Therefore, you could edit your template appropriately and simply specify a max-height and overflow:

    div.wp_syntax {
    max-height: 300px!important;
    overflow: auto;
    }

    You can get this pretty close if you set a specific line height within wp_syntax. For example, if you want to ensure that, say, 20 lines of code are shown in the block, you can do this:

    div.wp_syntax {
    max-height: 300px!important;
    overflow: auto;
    line-height: 15px;
    }

    Since 300 / 15 = 20, the box should show about 20 lines of code.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Syntax] Is there a way to limit the size or total number of lines shown?’ is closed to new replies.