Created
August 15, 2010 13:39
-
-
Save audreyt/525498 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
au pasted "for danb ": | |
var initialCoord = '__UP_initial_coord__'; | |
var sview = new SocialCalc.SpreadsheetViewer(); | |
if (initialCoord != 'A1' && /^[A-Z]+\d+$/.test(initialCoord)) { | |
sview.editor.StatusCallback.Socialtext = { | |
func: function (editor, status, arg) { | |
if (status == 'doneposcalc') { | |
var cr = SocialCalc.coordToCr(initialCoord); | |
editor.ScrollRelativeBoth( | |
cr.row - editor.lastnonscrollingrow - 1, | |
cr.col - editor.lastnonscrollingcol - 1 | |
); | |
editor.MoveECell(initialCoord); | |
delete editor.StatusCallback.Socialtext; | |
} | |
} | |
}; | |
} | |
var sizes = SocialCalc.GetViewportInfo(); | |
sview.InitializeSpreadsheetViewer("content", sizes.height - 24, sizes.width, 0); | |
sview.LoadSave(response.data.wikitext.replace(/\necell:\w+\n/, "\necell:A1\n")); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment