Putting Blabbit on Scrapbook?

0 views
Skip to first unread message

Clayburn

unread,
Jun 18, 2009, 3:48:11 PM6/18/09
to LimeBits
Can someone explain how I do this? I tried using an iframe in an HTML
content div on the scrapbook, but that distorts the background for
some reason. Also, it's glitchy when I move it around.

Jonathan A. Marshall

unread,
Jun 18, 2009, 8:30:11 PM6/18/09
to LimeBits forum
Clayburn,

I made an example scrapbook with an iframe containing a blabbit for you: http://jam.limebits.com/scrapbook-iframe-blabbit/

To see the details, you can copy ("Get Bit") it to your workspace, then click the Edit link on the blabbit.  You'll see that it just contains an iframe:
    <iframe height="800" width="700" src="content/blabbit/"></iframe>

The blabbit can go anywhere, but I think it makes sense to put it into the scrapbook's content/ folder.  I created a text file, myblabbit.txt, containing the iframe HTML fragment.  The scrapbook app inserts the .png file and the contents of the .txt file into the page as div elements.  (It skips folders.)  The .txt file, in turn, loads content/blabbit/ into the iframe on the scrapbook.

You can drag the blabbit by the (invisible) handle region which extends a few pixels outside the blabbit box.

Thanks,
--Jonathan

Clayburn

unread,
Jun 23, 2009, 2:18:17 AM6/23/09
to LimeBits
I don't like using iframes. They tend to cause glitches with the
dragging. Sometimes clicking on them sticks them to your mouse when
you try to drag them or sometimes they make part of the screen white,
as though their background is running out of the iframe and alters the
scrapbook page. I especially get this problem when I try iframing a
Blabbit as a content textbox. Would there be a way to have all the
code for it something purely sustainable inside the textbox so I
wouldn't have to use an iframe??



On Jun 18, 8:30 pm, "Jonathan A. Marshall" <jmarsh...@limebits.com>
wrote:
> Clayburn,
>
> I made an example *scrapbook with an iframe containing a blabbit* for
> you:http://jam.limebits.com/scrapbook-iframe-blabbit/
>
> To see the details, you can copy ("Get Bit") it to your workspace, then
> click the Edit link on the blabbit.  You'll see that it just contains an
> iframe:
>     <iframe height="800" width="700" src="content/blabbit/"></iframe>
>
> The blabbit can go anywhere, but I think it makes sense to put it into
> the scrapbook's *content/* folder.  I created a text file,
> myblabbit.txt, containing the iframe HTML fragment.  The scrapbook app
> inserts the .png file and the contents of the .txt file into the page as
> div elements.  (It skips folders.)  The .txt file, in turn, loads
> content/blabbit/ into the iframe on the scrapbook.
>
> You can drag the blabbit by the (invisible) handle region which extends
> a few pixels /outside/ the blabbit box.

Jonathan A. Marshall

unread,
Jun 23, 2009, 11:02:00 AM6/23/09
to LimeBits forum
Hi Clayburn,

Yes, I know what you mean.  Scrapbook is set up to use either DIVs or IFRAMEs.  The iframe method is better when you don't fully trust the code inside, because the browser provides better security isolation.  When you do trust the code (you wrote it or reviewed it), the div method is better because browsers implement it more smoothly, and also communication between components within the same frame is allowed.

We've noticed the dragging slippage problem.  I'm not sure if that's an inherent problem with iframes, or with the way jQuery implements dragging, though.

Check out how the <div id=blabbit> is added in http://bits.limebits.com/bits/blabbit/index.html .  It's just an empty div, plus a blabbit.js script that populates it with content.

There's also an AXIS.js script, but I believe scrapbook.js loads AXIS and you shouldn't load it twice.

Thanks,
--Jonathan

Clayburn wrote:
I don't like using iframes. They tend to cause glitches with the
dragging. Sometimes clicking on them sticks them to your mouse when
you try to drag them or sometimes they make part of the screen white,
as though their background is running out of the iframe and alters the
scrapbook page. I especially get this problem when I try iframing a
Blabbit as a content textbox. Would there be a way to have all the
code for it something purely sustainable inside the textbox so I
wouldn't have to use an iframe??

Reply all
Reply to author
Forward
0 new messages