Skip to content

Commit

Permalink
add outline if in edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGreenMagick committed Feb 28, 2020
1 parent 7b17619 commit b9de26d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ def myRevHtml(reviewer, _old):
if config["process_paste"]:
js += PASTEJS

return _old(reviewer) + js
if config["outline"]:
style = "<style>[data-efdrc='true'][contenteditable='true']:focus{outline: 1px solid #308cc6;}</style>"
else:
style = ""

return _old(reviewer) + js + style


def myRevBottomHTML(reviewer, _old):
Expand Down
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"ctrl_click":false,
"outline": true,
"process_paste": true,
"remove_span": false,
"tag": "div",
Expand Down

0 comments on commit b9de26d

Please sign in to comment.