{"action":"created","issue":{"url":"https://api.github.com/repos/audreyt/ethercalc/issues/470","repository_url":"https://api.github.com/repos/audreyt/ethercalc","labels_url":"https://api.github.com/repos/audreyt/ethercalc/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/audreyt/ethercalc/issues/470/comments","events_url":"https://api.github.com/repos/audreyt/ethercalc/issues/470/events","html_url":"https://github.com/audreyt/ethercalc/issues/470","id":195927459,"number":470,"title":"Force a value into a cell from JS","user":{"login":"CarbonMan","id":5210833,"avatar_url":"https://avatars.githubusercontent.com/u/5210833?v=3","gravatar_id":"","url":"https://api.github.com/users/CarbonMan","html_url":"https://github.com/CarbonMan","followers_url":"https://api.github.com/users/CarbonMan/followers","following_url":"https://api.github.com/users/CarbonMan/following{/other_user}","gists_url":"https://api.github.com/users/CarbonMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CarbonMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarbonMan/subscriptions","organizations_url":"https://api.github.com/users/CarbonMan/orgs","repos_url":"https://api.github.com/users/CarbonMan/repos","events_url":"https://api.github.com/users/CarbonMan/events{/privacy}","received_events_url":"https://api.github.com/users/CarbonMan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-15T22:00:13Z","updated_at":"2016-12-15T23:55:55Z","closed_at":null,"body":"I am just testing an idea and would like to see how I can force a value into a cell using JS from the console.  What is the correct method to force a value into a cell?\r\n\r\nI was able to execute;\r\n    SocialCalc.Callbacks.broadcast(\"execute\", {cmdstr: 'set K33 value n 33', saveundo: true, room: EtherCalc._room})\r\nThough the value only appeared in the cell once the page was refreshed.\r\n\r\nI really need to find a way to have the cell UI updated, all formulas executed and the backend updated from a JS call.\r\n\r\nEvidently the value for a cell is held like this;\r\n    SocialCalc.CurrentSpreadsheetControlObject.sheet.cells.K33.datavalue\r\n\r\nUpdating the value there does not update the display and changes are not stored on the server. It looks like the updating is controlled through SocialCalc.CurrentSpreadsheetControlObject.sheet.RecalcSheet()\r\n but when I call it nothing happens. \r\nIs there any documentation for the client side of how ethercalc manages cell state?"},"comment":{"url":"https://api.github.com/repos/audreyt/ethercalc/issues/comments/267479816","html_url":"https://github.com/audreyt/ethercalc/issues/470#issuecomment-267479816","issue_url":"https://api.github.com/repos/audreyt/ethercalc/issues/470","id":267479816,"user":{"login":"CarbonMan","id":5210833,"avatar_url":"https://avatars.githubusercontent.com/u/5210833?v=3","gravatar_id":"","url":"https://api.github.com/users/CarbonMan","html_url":"https://github.com/CarbonMan","followers_url":"https://api.github.com/users/CarbonMan/followers","following_url":"https://api.github.com/users/CarbonMan/following{/other_user}","gists_url":"https://api.github.com/users/CarbonMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CarbonMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarbonMan/subscriptions","organizations_url":"https://api.github.com/users/CarbonMan/orgs","repos_url":"https://api.github.com/users/CarbonMan/repos","events_url":"https://api.github.com/users/CarbonMan/events{/privacy}","received_events_url":"https://api.github.com/users/CarbonMan/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T23:55:55Z","updated_at":"2016-12-15T23:55:55Z","body":"Thanks @Rubén, I will deleted the SO question as I know that cross-posting is a bit pushy but I wasn't getting any feedback over there so I thought it wasn't monitored.\r\nThe API is interesting but I need to POST the contents of the cell not a GET. (Not yelling just RESTing) I am using the console in preparation for writing some Javascript code that will be embedded into the page. The JS code will primarily be responsible for inserting/updating values in the spreadsheet\r\n"}}
{"actor":{"display_login":"CarbonMan"}}