1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add optional header to markdown editor

This commit is contained in:
Nick O'Leary 2018-01-25 11:24:30 +00:00
parent c43647ca86
commit af683835d9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 7 additions and 2 deletions

View File

@ -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() {

View File

@ -119,6 +119,7 @@ RED.projects.settings = (function() {
function editDescription(activeProject, container) {
RED.editor.editMarkdown({
title: RED._('sidebar.project.editDescription'),
header: $('<span><i class="fa fa-book"></i> README.md</span>'),
value: activeProject.description,
complete: function(v) {
container.empty();

View File

@ -186,8 +186,8 @@
</div>
</script>
<script type="text/x-red" data-template-name="_markdown">
<div class="form-row" style="margin-bottom: 3px; text-align: right;">
<!--<button id="node-input-json-reformat" class="editor-button editor-button-small"><span data-i18n="jsonEditor.format"></span></button>-->
<div class="form-row" id="node-input-markdown-title" style="margin-bottom: 3px; text-align: right;">
</div>
<div class="form-row node-text-editor-row">
<div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-markdown"></div>