Forums Support Bug Reports Extra height when embedding code

Tagged: 

Up
0
Down
  • Creator
    Topic
  • #375
    Up
    0
    Down
    Ahmed Waleed
    Student
    @ahmed

    When using the embed short-code [code lang="lang"] the height of the embedded frame does not fit the code, this is very likely to happen when the code has many wide lines. Example:

Viewing 0 reply threads
  • Author
    Replies
    • #376
      admin
      Keymaster
      @admin

      To avoid the horizontal scrolling the editor wraps the lines, calculating the numbers of lines for the wrapped text isn’t an easy task (especially when embedding code is not connected with the content inside the frame) … the calculations have been altered to give more accurate predicted height. But sometimes this is not enough to fit tightly, so an optional argument was added to the short-code to work around this problem.

      [code lang="html" trunc=n]
      ...
      [/code]

      where n is an integer between 0 and 5, and it is very restricted to make sure it does not break the embed if misused.

Viewing 0 reply threads
  • You must be logged in to reply to this topic.