• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
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
v3.5.2 Latest
Buy Hosting

Iframe autosize for Mobile/PC browser

Scheduled Pinned Locked Moved NodeBB Development
7 Posts 4 Posters 2.5k Views
    • 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.
  • LLLRHL Offline
    LLLRHL Offline
    LLLRH
    wrote on last edited by
    #1

    I am using Nodebb as a chess forum and user can use "ifrmae" to embed a chessboard into a post. Now I fix the width of the iframe , it's good in PC's browser, but obviously the size is much bigger than the most mobile browser.
    So any suggestion to set autosize for the iframe in Nodebb?
    BTW I can also change the chessboard code if needed

    julianJ 1 Reply Last reply
    1
  • HolyPhoenixH Offline
    HolyPhoenixH Offline
    HolyPhoenix Anime Lovers
    wrote on last edited by
    #2

    I suggest not using an iFrame. Since you have access to the code for the chess board, you should be able to load it into a div pretty easily and make the styling for it responsive.

    Use this.
    http://api.jquery.com/load/

    1 Reply Last reply
    2
  • julianJ Online
    julianJ Online
    julian GNU/Linux
    replied to LLLRH on last edited by
    #3

    @LLLRH Can you share how you're adding in the iframe? Is it via a plugin?

    1 Reply Last reply
    0
  • LLLRHL Offline
    LLLRHL Offline
    LLLRH
    wrote on last edited by
    #4

    @julian

    502 Bad Gateway

    favicon

    (www.lychess.net)

    the post content:

    <iframe width=100% height=420px src="http://www.lychess.net:3001/p/1442924321333" frameborder=0></iframe>

    1 Reply Last reply
    0
  • julianJ Online
    julianJ Online
    julian GNU/Linux
    wrote on last edited by
    #5

    I just want to make sure you didn't disable HTML sanitization to achieve this 😄

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    a_5mith
    replied to julian on last edited by
    #6

    @julian said:

    I just want to make sure you didn't disable HTML sanitization to achieve this 😄

    I would imagine this is the case. I'll write a plugin for this shortly. Just enjoying me some chinese food and sorting my flights out for work next week.

    1 Reply Last reply
    0
  • LLLRHL Offline
    LLLRHL Offline
    LLLRH
    wrote on last edited by
    #7

    @a_5mith if you go to Shanghai , I am happy to buy you some delicious food and coffee !

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development