From 81b60c6dc4821517f20f7354292499c05b19583f Mon Sep 17 00:00:00 2001 From: Simone Gaiarin Date: Wed, 4 Jan 2017 16:03:08 +0100 Subject: [PATCH 1/2] Add css id to editor buttons div This facilitate the processing with beutifulsoup or similar parser --- aqt/editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/editor.py b/aqt/editor.py index c866374fd..320a2ea8b 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -439,11 +439,11 @@ class Editor(object): self.web.onLoadFinished = self._loadFinished topbuts = """ -
+
-
+
From 5775c3f92e40313b4f7043a663598b4a2e13e6a8 Mon Sep 17 00:00:00 2001 From: Simone Gaiarin Date: Wed, 4 Jan 2017 16:03:37 +0100 Subject: [PATCH 2/2] Add filter on topbuts to allow addons to add buttons --- aqt/editor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aqt/editor.py b/aqt/editor.py index 320a2ea8b..f3f26971b 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -458,6 +458,7 @@ class Editor(object):
""" % dict(flds=_("Fields"), cards=_("Cards")) + topbuts = runFilter("setupEditorButtons", topbuts) self.web.stdHtml(_html % ( self.mw.baseHTML(), anki.js.jquery, topbuts,