Hide scroll bar on editor

This commit is contained in:
Peter Stockings
2023-12-16 17:04:04 +11:00
parent 68c29b6617
commit f18c4628b7
2 changed files with 12 additions and 14 deletions

3
app.py
View File

@@ -30,8 +30,7 @@ DEFAULT_SCRIPT = """async (req) => {
</tr>`)} </tr>`)}
</table> </table>
</div>`) </div>`)
} }"""
"""
def map_isolator_response_to_flask_response(response): def map_isolator_response_to_flask_response(response):
""" """

View File

@@ -19,17 +19,13 @@
</button> </button>
<button <button
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 text-gray-600 dark:text-gray-400" class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 text-gray-600 dark:text-gray-400"
data-id="21"><span class="sr-only" data-id="22">Bulleted List</span><svg xmlns="http://www.w3.org/2000/svg" data-id="21"><span class="sr-only" data-id="22">Bulleted List</span>
width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4" data-id="23" data-darkreader-inline-stroke="" class="w-6 h-6">
style="--darkreader-inline-stroke: currentColor;"> <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
<line x1="8" x2="21" y1="6" y2="6"></line> </svg>
<line x1="8" x2="21" y1="12" y2="12"></line>
<line x1="8" x2="21" y1="18" y2="18"></line> </button><button
<line x1="3" x2="3.01" y1="6" y2="6"></line>
<line x1="3" x2="3.01" y1="12" y2="12"></line>
<line x1="3" x2="3.01" y1="18" y2="18"></line>
</svg></button><button
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 text-gray-600 dark:text-gray-400" class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 text-gray-600 dark:text-gray-400"
data-id="24"><span class="sr-only" data-id="25">Add Link</span><svg xmlns="http://www.w3.org/2000/svg" data-id="24"><span class="sr-only" data-id="25">Add Link</span><svg xmlns="http://www.w3.org/2000/svg"
width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
@@ -40,7 +36,7 @@
</svg></button> </svg></button>
</div> </div>
<div id="editor" class="relative rounded-lg shadow-lg p-4 mb-4" style="height: 300px;">{{ script }} <div id="editor" class="relative rounded-lg shadow-lg p-4 mb-4">{{ script }}
</div> </div>
@@ -51,6 +47,9 @@
<script> <script>
var editor = ace.edit("editor"); var editor = ace.edit("editor");
editor.setOptions({
maxLines: editor.session.getLength()
});
editor.setTheme("ace/theme/github_dark"); editor.setTheme("ace/theme/github_dark");
editor.session.setMode("ace/mode/javascript"); editor.session.setMode("ace/mode/javascript");