File tree Expand file tree Collapse file tree
frontend/src/pages/Forge/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88COOLDOWN_PERIOD = 10 # 10 seconds
99
1010@app .route ('/themes' , methods = ['GET' ])
11- @login_required
1211def themes ():
1312 """
1413 Get the list of themes
@@ -23,7 +22,6 @@ def themes():
2322 return jsonify (loaded_themes )
2423
2524@app .route ('/themes/names' , methods = ['GET' ])
26- @login_required
2725def themes_names ():
2826 """
2927 Get the list of themes names
@@ -38,7 +36,6 @@ def themes_names():
3836 return jsonify (loaded_themes )
3937
4038@app .route ('/theme' , methods = ['GET' ])
41- @login_required
4239def theme ():
4340 """
4441 Get a theme
@@ -63,7 +60,6 @@ def theme():
6360
6461# Create theme
6562@app .route ('/theme' , methods = ['POST' ])
66- @login_required
6763def create_theme ():
6864 """
6965 Create a theme
@@ -86,7 +82,6 @@ def create_theme():
8682
8783# Delete theme
8884@app .route ('/theme' , methods = ['DELETE' ])
89- @login_required
9085def delete_theme ():
9186 """
9287 Delete a theme
@@ -110,7 +105,6 @@ def delete_theme():
110105 return jsonify ({'message' : 'Theme deleted' })
111106
112107@app .route ('/theme/reload' , methods = ['POST' ])
113- @login_required
114108def reload ():
115109 """
116110 Reload the puzzles
Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ const RichTextContentEditable = ({
5353 const selection = window . getSelection ( ) ;
5454 if ( ! selection || ! selection . rangeCount ) return ;
5555
56+ console . log ( selection ) ;
57+
58+ // If the selection is not {anchorNode: text
59+ if ( selection . anchorNode ?. nodeName !== "#text" ) {
60+ selection . collapseToEnd ( ) ;
61+ }
62+
5663 const range = selection . getRangeAt ( 0 ) ;
5764 const element = document . createElement ( tagName ) ;
5865
You can’t perform that action at this time.
0 commit comments