From af683835d952ff946a99e39defc546e469c469f3 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 25 Jan 2018 11:24:30 +0000 Subject: [PATCH] Add optional header to markdown editor --- editor/js/ui/editor.js | 4 ++++ editor/js/ui/projects/projectSettings.js | 1 + editor/templates/index.mst | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index 66768224b..7312ac8a2 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -2260,6 +2260,10 @@ RED.editor = (function() { value: value, mode:"ace/mode/markdown" }); + if (options.header) { + options.header.appendTo(tray.find('#node-input-markdown-title')); + } + dialogForm.i18n(); }, close: function() { diff --git a/editor/js/ui/projects/projectSettings.js b/editor/js/ui/projects/projectSettings.js index 62fce76aa..696bfb025 100644 --- a/editor/js/ui/projects/projectSettings.js +++ b/editor/js/ui/projects/projectSettings.js @@ -119,6 +119,7 @@ RED.projects.settings = (function() { function editDescription(activeProject, container) { RED.editor.editMarkdown({ title: RED._('sidebar.project.editDescription'), + header: $(' README.md'), value: activeProject.description, complete: function(v) { container.empty(); diff --git a/editor/templates/index.mst b/editor/templates/index.mst index 904b1fc7d..b8d0ac0c0 100644 --- a/editor/templates/index.mst +++ b/editor/templates/index.mst @@ -186,8 +186,8 @@