From 23012e42703e57e6327d1efbde962e0e00dacf30 Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Mon, 11 Dec 2017 10:49:44 -0700 Subject: [PATCH] #23 --- src/asset-viewer.html | 9 +++++++++ src/js/asset-viewer.js | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/asset-viewer.html b/src/asset-viewer.html index f29fc4cdfab37..d30c10735663d 100644 --- a/src/asset-viewer.html +++ b/src/asset-viewer.html @@ -9,6 +9,10 @@ font: 12px monospace; white-space: pre; } +html, body, #content { + margin: 0; + height: 100%; + } @@ -19,6 +23,11 @@ + + + + + diff --git a/src/js/asset-viewer.js b/src/js/asset-viewer.js index 7741948a85791..e33fd15f1da08 100644 --- a/src/js/asset-viewer.js +++ b/src/js/asset-viewer.js @@ -30,7 +30,11 @@ /******************************************************************************/ var onAssetContentReceived = function(details) { - uDom('#content').text(details && (details.content || '')); + if ( details && details.content ) { + var editor = ace.edit('content'); + nanoIDE.init(editor, true, true); + editor.setValue(details.content, -1); + } }; /******************************************************************************/