mirror of https://github.com/node-red/node-red.git
Add optional header to markdown editor
parent
c43647ca86
commit
af683835d9
|
@ -2260,6 +2260,10 @@ RED.editor = (function() {
|
||||||
value: value,
|
value: value,
|
||||||
mode:"ace/mode/markdown"
|
mode:"ace/mode/markdown"
|
||||||
});
|
});
|
||||||
|
if (options.header) {
|
||||||
|
options.header.appendTo(tray.find('#node-input-markdown-title'));
|
||||||
|
}
|
||||||
|
|
||||||
dialogForm.i18n();
|
dialogForm.i18n();
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
|
|
|
@ -119,6 +119,7 @@ RED.projects.settings = (function() {
|
||||||
function editDescription(activeProject, container) {
|
function editDescription(activeProject, container) {
|
||||||
RED.editor.editMarkdown({
|
RED.editor.editMarkdown({
|
||||||
title: RED._('sidebar.project.editDescription'),
|
title: RED._('sidebar.project.editDescription'),
|
||||||
|
header: $('<span><i class="fa fa-book"></i> README.md</span>'),
|
||||||
value: activeProject.description,
|
value: activeProject.description,
|
||||||
complete: function(v) {
|
complete: function(v) {
|
||||||
container.empty();
|
container.empty();
|
||||||
|
|
|
@ -186,8 +186,8 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/x-red" data-template-name="_markdown">
|
<script type="text/x-red" data-template-name="_markdown">
|
||||||
<div class="form-row" style="margin-bottom: 3px; text-align: right;">
|
<div class="form-row" id="node-input-markdown-title" 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>
|
</div>
|
||||||
<div class="form-row node-text-editor-row">
|
<div class="form-row node-text-editor-row">
|
||||||
<div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-markdown"></div>
|
<div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-markdown"></div>
|
||||||
|
|
Loading…
Reference in New Issue