@crazycells thanks!
Iframe autosize for Mobile/PC browser
-
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 -
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.
-
@LLLRH Can you share how you're adding in the iframe? Is it via a plugin?
-
http://www.lychess.net/topic/164/daily-puzzle
the post content:
<iframe width=100% height=420px src="http://www.lychess.net:3001/p/1442924321333" frameborder=0></iframe>
-
I just want to make sure you didn't disable HTML sanitization to achieve this
-
@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.
-
@a_5mith if you go to Shanghai , I am happy to buy you some delicious food and coffee !