jakiestfu / Medium.js

A tiny JavaScript library for making contenteditable beautiful (Like Medium's editor)

Home Page:http://jakiestfu.github.io/Medium.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Format piece of text programmatically based on first-last character indices of the raw text

bartonaz opened this issue · comments

  1. Is it possible to get from the Medium instance the string of raw unformatted text, without any HTML tags, like DOM innerText property would do?
  2. In case I have such string, either from Medium or directly through DOM, how is it possible to invokeElement when there is no actual text selected, but there are indices of the first and last characters (with respect to the raw text) of the string that should be invoked?