diff --git a/aqt/editor.py b/aqt/editor.py index c3a3f6ecd..69db22847 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -5,13 +5,46 @@ from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4.QtSvg import * # fixme: obsolete? -import re, os, sys, tempfile, urllib2, ctypes +import re, os, sys, tempfile, urllib2, ctypes, simplejson from anki.utils import stripHTML from anki.sound import play from anki.hooks import addHook, removeHook, runHook, runFilter from aqt.sound import getAudio from aqt.webview import AnkiWebView from aqt.utils import shortcut +import anki.js + +# fixme: add code to escape from text field + +_html = """ +
+ + +""" # fixme: use shortcut() for mac shortcuts @@ -144,30 +177,12 @@ class Editor(object): p.setBrush(QPalette.Base, Qt.transparent) self.web.page().setPalette(p) self.web.setAttribute(Qt.WA_OpaquePaintEvent, False) - self.web.setHtml(""" - - -Expression | -this is some field
-text |
-
Meaning | -this is some field
-text |
-
Reading | -this is some field
-text |
-