This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wagtail.admin.rich_text.editors.draftail.features as draftail_features | |
from wagtail.admin.rich_text.converters.html_to_contentstate import InlineStyleElementHandler | |
from wagtail.core import hooks | |
@hooks.register('register_rich_text_features') | |
def register_custom_style_feature(features): | |
feature_name = 'mycustomstyle' # .mycustomstyle will have to be defined in the CSS in order to get frontend styles working | |
type_ = feature_name.upper() | |
tag = 'span' |