Changes between Version 2 and Version 5 of Ticket #6855


Ignore:
Timestamp:
09/11/09 17:55:21 (11 years ago)
Author:
mpatel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6855 – Description

    v2 v5  
    111. A Sage Embed API for loading cells or worksheets easily in external web pages, could be useful.  For example,
    22{{{
    3 [...]
    4   <link rel="stylesheet" type="text/css" href="sage_embed.css" />
    5   <script src="sage_embed.js"></script>
    6   <script>
    7     var initialize = function () {
    8         var cell = new SageCell(); // empty by default
    9         cell.init(document.getElementById('cell1'));
     3#!text/html
     4<html>
     5  <head>
     6    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     7    <title>Sage Embed API demo</title>
     8    <link rel="stylesheet" type="text/css" href="sage_embed.css" />
     9    <script src="sage_embed.js"></script>
     10    <script>
     11}}}
     12{{{
     13#!js
     14      var initialize = function () {
     15          var cell = new SageCell(); // empty by default
     16          cell.init(document.getElementById('cell1'));
    1017
    11         var ws = new SageWorksheet();
    12         ws.load('http://sagenb.org/url/to/worksheet/');
    13         ws.init(document.getElementById('worksheet1'));
    14     };
    15   </script>
    16 </head>
    17 <body onload="initialize();">
    18   <div id="cell1" style="height: 10.0em; width: 20.0em;"></div>
    19   Blah, blah, blah.
    20   <div id="worksheet1" style="height: 600px; width: 100%;"></div>
    21 [...]
     18          var ws = new SageWorksheet();
     19          ws.load('http://sagenb.org/url/to/worksheet/');
     20          ws.init(document.getElementById('worksheet1'));
     21      };
     22}}}
     23{{{
     24#!text/html
     25    </script>
     26  </head>
     27  <body onload="initialize();">
     28    <div id="cell1" style="height: 10.0em; width: 20.0em;"></div>
     29    Blah, blah, blah.
     30    <div id="worksheet1" style="height: 600px; width: 100%;"></div>
     31  </body>
     32</html>
    2233}}}
    2334See, e.g., the [http://code.google.com/apis/wave/embed/guide.html Google Wave Embed API] for inspiration.