Embed GitHub Gist
Gist height (7 posts)

  1. archon810
    Posted 3 years ago #

    I wanted to add a gist height for really long gists that would result in a scrollbar for the embed. Here's the patch to achieve this for the current trunk using a height parameter to the shortcode: https://gist.github.com/3200265.

    I haven't tested it without json_decode, and it may not be fully compatible with strict HTML, but it does the job. It'd be cool if you added this functionality (perhaps rewritten) to core.


  2. dflydev
    Plugin Author

    Posted 2 years ago #

    Would you be interested in forking this project on GitHub and submitting this as a PR?


  3. archon810
    Posted 2 years ago #

    @dflydev I'm not sure that's the best way to do it, so I'll just let you use the diff above if you want. Plus, it'd be great if you could make an option to have the long lines wrap while you're at it, if it's not too much trouble.

    Also, it seems like the vertical scroll bar is not in the right place with my patch - you need to scroll all the way down to see the horizontal one if the lines are too long.

  4. archon810
    Posted 2 years ago #

    OK, fixed the vertical scrollbar and updated the gist.

    Not really sure how to get text wrapping to work though. Check it out on this example: http://www.androidpolice.com/2012/10/09/heres-whats-new-in-android-4-1-2-at-the-low-level-developer-commit-logs.

  5. dflydev
    Plugin Author

    Posted 2 years ago #

    I'm not sure how wise it would be to do anything with the text wrapping. Even if you visit the gist in its raw form at https://gist.github.com/3861583 you'll see that there is no text wrapping.

    Thanks for the updated gist. I assume that that blog is running your patched version of this plugin?

  6. archon810
    Posted 2 years ago #

    Correct, it's running the latest version.

    Well, wrapping would be nice, it's really not very friendly not to wrap long lines for narrow embeds. If there's any way at all, it'd be great to at least try.

  7. archon810
    Posted 2 years ago #

    Hi @dflydev,

    I've updated the height code for the latest version of the plugin in trunk . Can you please integrate https://gist.github.com/3200265 so that it stops breaking with updates?

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Embed GitHub Gist
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.