").attr({
- "class" : 'tm-click-to-tweet',
- }).append(link);
-
- var tweet = $("").attr({"class" : 'tm-ctt-tip'}).append(
- link.clone().attr({"class": 'tm-ctt-btn'}).text('Click to tweet'));
-
- elem.append(tweet);
- var node = lastSelection.createContextualFragment($('
').append(elem).html());
-
- lastSelection.deleteContents();
- lastSelection.insertNode(node);
-
- return widget.options.editable.element.trigger('change');
- });
- }
- });
- })(jQuery);
-
-}).call(this);
diff --git a/pythonie/core/wagtail_hooks.py b/pythonie/core/wagtail_hooks.py
deleted file mode 100644
index 7bce220..0000000
--- a/pythonie/core/wagtail_hooks.py
+++ /dev/null
@@ -1,69 +0,0 @@
-from django.conf import settings
-from django.utils.html import format_html, format_html_join
-from django.utils.safestring import mark_safe
-from wagtail import hooks
-from wagtail.whitelist import attribute_rule, check_url
-
-
-@hooks.register("insert_editor_js")
-def enable_source():
- return mark_safe(
- """
-
- """
- )
-
-
-@hooks.register("construct_whitelister_element_rules")
-def allow_iframes():
- return {
- "iframe": attribute_rule(
- {
- "src": True,
- "width": True,
- "height": True,
- "frameborder": True,
- "marginheight": True,
- "marginwidth": True,
- }
- ),
- "tito-widget": attribute_rule({"event": True}),
- "tito-button": attribute_rule({"event": True}),
- }
-
-
-@hooks.register("construct_whitelister_element_rules")
-def allow_blockquotes():
- return {
- "a": attribute_rule({"href": check_url, "target": True, "class": True}),
- "blockquote": attribute_rule({"class": True}),
- }
-
-
-@hooks.register("insert_editor_js")
-def enable_quotes():
- js_files = [
- "js/hallo-custombuttons.js",
- ]
- js_includes = format_html_join(
- "\n",
- '',
- ((settings.STATIC_URL, filename) for filename in js_files),
- )
-
- return js_includes + mark_safe(
- """
-
- """
- )
-
-
-@hooks.register("insert_editor_css")
-def font_awesome_css():
- return format_html(
- '', settings.STATIC_URL
- )