Rename current selected project.
Example of code:
iframeRoomtodo.contentWindow.postMessage(JSON.stringify({action:"rename_project"}), "*");
After successful rename, 'project_renamed' message gonna return from planner with some project data:
<iframe frameborder="0" id="iframe7384d8cb02ad2ef7e696fddf9a5394a7" src="https://n.roomtodo.com/planner?site_key=7384d8cb02ad2ef7e696fddf9a5394a7" style="width: 800px; height: 600px;"></iframe>
<script>
window.addEventListener('message', messageListener);
function messageListener(e) {
try {
var object = JSON.parse(e.data);
if (object.action == 'project_renamed') {
console.log("object: ", object.data)
// object.data = { id: 'renamed project id', name: "renamed project name", hash: 'renamed project hash' }
}
} catch ( error ) {}
}
</script>