Skip to content

Instantly share code, notes, and snippets.

@pqwy
Created May 21, 2012 15:18
Show Gist options
  • Save pqwy/2762879 to your computer and use it in GitHub Desktop.
Save pqwy/2762879 to your computer and use it in GitHub Desktop.
editor in derby
view.fn 'unwrap', (ob) ->
{ key, value } for own key, value of ob)
<widget:>
<div class="editor">
{#with this as :scrutinee}
<app:jsoneditor:some>
{/}
</div>
<some:>
<dl class="editor-object">
{#each unwrap(:scrutinee)}
<dt>{key}</dt>
<dd>{#with value}<app:jsoneditor:one>{/}</dd>
{/}
</dl>
<one:>
{#with this as :scrutinee}
{#if is_object(:scrutinee)}
<app:jsoneditor:some>
{else}
<div contenteditable="true">{:scrutinee}</div>
{/}
{/}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment