diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx
index d6502e985..ee2853865 100644
--- a/client/homebrew/editor/editor.jsx
+++ b/client/homebrew/editor/editor.jsx
@@ -330,6 +330,14 @@ const Editor = createClass({
return this.refs.codeEditor?.undo();
},
+ foldCode : function(){
+ return this.refs.codeEditor?.foldAllCode();
+ },
+
+ unfoldCode : function(){
+ return this.refs.codeEditor?.unfoldAllCode();
+ },
+
render : function(){
return (
@@ -343,6 +351,8 @@ const Editor = createClass({
theme={this.props.brew.theme}
undo={this.undo}
redo={this.redo}
+ foldCode={this.foldCode}
+ unfoldCode={this.unfoldCode}
historySize={this.historySize()}
currentEditorTheme={this.state.editorTheme}
updateEditorTheme={this.updateEditorTheme}
diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx
index 246d534a9..23f15c2b3 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.jsx
+++ b/client/homebrew/editor/snippetbar/snippetbar.jsx
@@ -37,6 +37,8 @@ const Snippetbar = createClass({
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
+ foldCode : ()=>{},
+ unfoldCode : ()=>{},
updateEditorTheme : ()=>{},
cursorPos : {}
};
@@ -46,7 +48,7 @@ const Snippetbar = createClass({
return {
renderer : this.props.renderer,
themeSelector : false,
- snippets : []
+ snippets : [],
};
},
@@ -144,6 +146,22 @@ const Snippetbar = createClass({
renderEditorButtons : function(){
if(!this.props.showEditButtons) return;
+ let foldButtons;
+ if(this.props.view == 'text'){
+ foldButtons =
+ <>
+
+
+
+
+
+
+ >
+
+ }
+
return
@@ -154,6 +172,7 @@ const Snippetbar = createClass({
+ {foldButtons}