
export default function (state) {
  const { document, selection } = state
  const texts = document.getTexts()
  const first = texts.first()
  const range = selection.merge({
    anchorKey: first.key,
    anchorOffset: 2,
    focusKey: first.key,
    focusOffset: 2
  })

  return state
    .transform()
    .insertInlineAtRange(range, {
      type: 'hashtag',
      isVoid: true
    })
    .apply()
}
