Skip to content

Commit

Permalink
add option to change editor icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzay-G committed Mar 23, 2022
1 parent b48c90e commit e081760
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions archivy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self):
"markdownItTocDoneRight": {},
},
"spellcheck": False,
"toolbar_icons": ["bold", "italic", "link", "upload-image", "heading", "code", "strikethrough", "quote", "table"] # https://github.com/Ionaru/easy-markdown-editor#toolbar-icons
}

self.SEARCH_CONF = {
Expand Down
1 change: 1 addition & 0 deletions archivy/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def show_dataobj(dataobj_id):
embedded_tags=embedded_tags,
titles=titles,
js_ext=js_ext,
icons=app.config["EDITOR_CONF"]["toolbar_icons"],
)


Expand Down
12 changes: 3 additions & 9 deletions archivy/templates/dataobjs/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,9 @@ <h1>Backlinks</h3>
imageAccept: "image/png, image/jpeg, image/gif",
imageMaxSize: "100000000",
toolbar: [
"bold",
"italic",
"link",
"upload-image",
"heading",
"code",
"strikethrough",
"quote",
"table",
{% for icon in icons %}
"{{ icon }}",
{% endfor %}
{
name: "LaTeX",
className: "fa fa-math",
Expand Down
1 change: 1 addition & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ EDITOR_CONF:
breaks: true
typographer: false
plugins: ...
toolbar_icons: ["bold", "italic", "link", "upload-image", "heading", "code", "strikethrough", "quote", "table"] # see https://github.com/Ionaru/easy-markdown-editor#toolbar-icons for more options
```

Archivy uses several markdown plugins to enhance its functionality:
Expand Down

0 comments on commit e081760

Please sign in to comment.