From 5e87828b29075da4691d6e12ccbed317037dd0fa Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sat, 10 Feb 2018 16:16:49 +0000 Subject: [PATCH] let library createUi accept elements other than node-input-name --- editor/js/ui/library.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/editor/js/ui/library.js b/editor/js/ui/library.js index 8c29ccae8..13b994a0a 100644 --- a/editor/js/ui/library.js +++ b/editor/js/ui/library.js @@ -15,8 +15,8 @@ **/ RED.library = (function() { - var exportToLibraryDialog; + var element = "node-input-name"; function loadFlowLibrary() { $.getJSON("library/flows",function(data) { @@ -86,6 +86,7 @@ RED.library = (function() { var libraryData = {}; var selectedLibraryItem = null; var libraryEditor = null; + element = options.element || "node-input-name"; // Orion editor has set/getText // ACE editor has set/getValue @@ -157,8 +158,8 @@ RED.library = (function() { return ul; } - $('#node-input-name').css("width","66%").after( - '
'+ + $('#'+element).css("width","calc(100% - 52px)").after( + '
'+ ' '+ '