{"action":"created","issue":{"url":"https://api.github.com/repos/voidlabs/mosaico/issues/74","labels_url":"https://api.github.com/repos/voidlabs/mosaico/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/voidlabs/mosaico/issues/74/comments","events_url":"https://api.github.com/repos/voidlabs/mosaico/issues/74/events","html_url":"https://github.com/voidlabs/mosaico/issues/74","id":120581371,"number":74,"title":"idea: Manage end template in iframe","user":{"login":"psyafter","id":662215,"avatar_url":"https://avatars.githubusercontent.com/u/662215?v=3","gravatar_id":"","url":"https://api.github.com/users/psyafter","html_url":"https://github.com/psyafter","followers_url":"https://api.github.com/users/psyafter/followers","following_url":"https://api.github.com/users/psyafter/following{/other_user}","gists_url":"https://api.github.com/users/psyafter/gists{/gist_id}","starred_url":"https://api.github.com/users/psyafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psyafter/subscriptions","organizations_url":"https://api.github.com/users/psyafter/orgs","repos_url":"https://api.github.com/users/psyafter/repos","events_url":"https://api.github.com/users/psyafter/events{/privacy}","received_events_url":"https://api.github.com/users/psyafter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/voidlabs/mosaico/labels/ideas","name":"ideas","color":"5319e7"},{"url":"https://api.github.com/repos/voidlabs/mosaico/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-05T19:21:19Z","updated_at":"2015-12-07T09:18:17Z","closed_at":"2015-12-06T16:22:18Z","body":"It can be nice if template will be managed in iframe and not in pseudo elements in same page.\r\nBy this way template css (and may be other resources such js that I want add to template) will not break editor area and logic\r\n\r\nDoes it possible?\r\nIframe live within same domain, so there is no restriction to access iframe, isn't?\r\n"},"comment":{"url":"https://api.github.com/repos/voidlabs/mosaico/issues/comments/162456744","html_url":"https://github.com/voidlabs/mosaico/issues/74#issuecomment-162456744","issue_url":"https://api.github.com/repos/voidlabs/mosaico/issues/74","id":162456744,"user":{"login":"bago","id":173498,"avatar_url":"https://avatars.githubusercontent.com/u/173498?v=3","gravatar_id":"","url":"https://api.github.com/users/bago","html_url":"https://github.com/bago","followers_url":"https://api.github.com/users/bago/followers","following_url":"https://api.github.com/users/bago/following{/other_user}","gists_url":"https://api.github.com/users/bago/gists{/gist_id}","starred_url":"https://api.github.com/users/bago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bago/subscriptions","organizations_url":"https://api.github.com/users/bago/orgs","repos_url":"https://api.github.com/users/bago/repos","events_url":"https://api.github.com/users/bago/events{/privacy}","received_events_url":"https://api.github.com/users/bago/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T09:18:17Z","updated_at":"2015-12-07T09:18:17Z","body":"It was 1 year ago, I guess there is no single line kept from that time... I was prototyping and found that the iframe (my first attemp) was a PITA so I moved to using an \"in page\" element.\r\n\r\nBTW the mobile preview is in fact an iframe, so it shouldn't be hard if you want to try to make that \"preview\" a \"wysiwyg editable area\" and try to fix issues.\r\n\r\n\r\nBTW the code that change the rendering behaviour from \"show\"(preview) to \"wysiwyg\" (editing) is\r\n```\r\n    <!-- ko withProperties: { templateMode: 'wysiwyg', templateModeFallback: 'show' } -->\r\n       content\r\n    <!-- /ko -->\r\n```\r\nYou can see this in src/tmpl/main.tmpl.html\r\n\r\nInstead the preview iframe is initialized partially in that main.tmpl.html and partly in the binding \"src\\js\\bindings\\bind-iframe.js \"\r\n\r\nMaybe you just have to add that ko comment to enable the wysiwyg templateMode somewhere in the bind-iframe.js where the html for mosaico is initialized... but I warn you that interaction between iframes is a PITA and it won't be about simple bug-fixing: you'll have to dig into jquery-draggable/droppable the knockout-sortable wrapper between the jquery and the knockout and much more.... \r\n\r\nBut if you want to try you now have your pointers ;-)\r\n"}}