CoreMedia CKEditor 5 Plugins
    Preparing search index...
    • Preserves the given data attribute as the given view attribute. Thus, it provides a mapper for toView renaming attribute given by dataAttributeName to attribute named viewAttributeName.

      If a data attribute has alias names, you may specify them in dataAttributeAliases. Note, that the first existing attributes value in [dataAttributeName, ...dataAttributeAliases] will be taken into account. All other attributes will be lost in this processing.

      Parameters

      • dataAttributeName: string

        the name of the attribute in data

      • viewAttributeName: string

        the name of the attribute in data view

      • ...dataAttributeAliases: string[]

        aliases for the attribute in data, which shall be mapped to the same data view attribute

      Returns AttributeMapper

      mapper = preserveAttributeAs("xlink:type", "data-xlink-type");
      
      mapper = preserveAttributeAs("lang", "lang", "xml:lang");