# All files / composer/utils/draft-js-custom-plugins/prepopulated-autocomplete-hashtag prepopulatedHashtagEntityStrategy.js

25% Statements 1/4
0% Branches 0/2
0% Functions 0/2
25% Lines 1/4

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    127x

     const prepopulatedHashtagEntityStrategy = (contentBlock, callback, contentState) => {
      contentBlock.findEntityRanges((character) => {
        const entityKey = character.getEntity();
        return (
          entityKey !== null &&
          contentState.getEntity(entityKey).getType() === 'PREPOPULATED_HASHTAG'
        );
      }, callback);
    };

    export default prepopulatedHashtagEntityStrategy;