alternativeNames property

Map<String, EasyAttribute<Object?>> alternativeNames
final

Returns all the names that are related with this EasyAttributeStyles

We use this static map commonly to maintain compatibility with other WYSIWYG Editors that contains similar attributes, but with different names

BoldAttribute is referenced here as strong, but in Fluter Quill and AppFlowy, is referenced as bold

Implementation

static final Map<String, EasyAttribute> alternativeNames =
    Map<String, EasyAttribute>.unmodifiable(
  <String, EasyAttribute>{
    // from Flutter Quill
    'bold': bold,
    'strike': strike,
    'title': header,
    'script': script,
    'direction': direction,
    'alignment': align,
    'size': fontSize,
    'font': fontFamily,
    'link': link,
    'color': color,
    'background': bg,
    'code-block': codeblock,
    'width': DimensionsAttribute.width(),
    'height': DimensionsAttribute.height(),
    'style': DimensionsAttribute.both(),
    'indent': indentation,
    'unchecked': ListAttribute.todo(false),
    'checked': ListAttribute.todo(true),
    // from AppFlowy
    'h1': h1,
    'h2': h2,
    'h3': h3,
    'h4': h4,
    'h5': h5,
    'h6': h6,
    'subtype': script,
    'ltr': ltr,
    'rtl': rtl,
    'bgColor': bg,
    'href': link,
    'checkbox': todo,
    'number-list': ol,
    'textColor': color,
    'quote': blockquote,
    'bulleted-list': ul,
    'textdirection': direction,
    'auto': TextDirectionAttribute(),
  },
);