diff --git a/editor/js/ui/tab-info.js b/editor/js/ui/tab-info.js
index 0e676bb11..deb1759c7 100644
--- a/editor/js/ui/tab-info.js
+++ b/editor/js/ui/tab-info.js
@@ -204,7 +204,20 @@ RED.sidebar.info = (function() {
infoText = infoText + marked(textInfo);
}
if (infoText) {
- addTargetToExternalLinks($('
'+infoText+'
')).appendTo(infoSection.content);
+ var info = addTargetToExternalLinks($(''+infoText+'
')).appendTo(infoSection.content);
+ info.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "" );
+ var foldingHeader = "H3";
+ info.find(foldingHeader).wrapInner('')
+ .find("a").prepend('').click(function(e) {
+ e.preventDefault();
+ var isExpanded = $(this).hasClass('expanded');
+ var el = $(this).parent().next();
+ while(el.length === 1 && el[0].nodeName !== foldingHeader) {
+ el.toggle(!isExpanded);
+ el = el.next();
+ }
+ $(this).toggleClass('expanded',!isExpanded);
+ })
}
diff --git a/editor/sass/tab-info.scss b/editor/sass/tab-info.scss
index b1c096d87..892ce9a87 100644
--- a/editor/sass/tab-info.scss
+++ b/editor/sass/tab-info.scss
@@ -179,6 +179,23 @@ div.node-info {
}
}
}
+ .node-info-header {
+ i {
+ width: 10px;
+ text-align: center;
+ transition: transform 0.2s ease-in-out;
+ margin-right: 4px;
+ }
+ color: #333;
+ &:hover, &:focus {
+ text-decoration: none;
+ }
+ &.expanded {
+ i {
+ transform: rotate(90deg);
+ }
+ }
+ }
}
.sidebar-node-info-stack {