File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change 8
8
from wagtail .core import hooks
9
9
10
10
11
- @hooks .register ("insert_editor_js" )
12
- def editor_js ():
13
- """ Includes uuidv4() function courtesy of
14
- https://stackoverflow.com/a/2117523/823020
15
- """
16
- js_files = [
17
- # We require this file here to make sure it is loaded before footnotes.js.
18
- "wagtailadmin/js/draftail.js" ,
19
- "footnotes/js/footnotes.js" ,
20
- ]
21
- js_includes = format_html_join (
22
- "\n " ,
23
- '<script src="{0}"></script>' ,
24
- ((static (filename ),) for filename in js_files ),
25
- )
26
- return js_includes
27
-
28
-
29
11
@hooks .register ("register_rich_text_features" )
30
12
def register_footnotes_feature (features ):
31
13
"""
@@ -43,7 +25,7 @@ def register_footnotes_feature(features):
43
25
feature_name ,
44
26
draftail_features .EntityFeature (
45
27
control ,
46
- # The JS for footnotes would have been passed here, see above.
28
+ js = [ 'wagtailadmin/js/draftail.js' , 'footnotes/js/footnotes.js' ]
47
29
),
48
30
)
49
31
You can’t perform that action at this time.
0 commit comments