import parse from "./parse" ; import render from "./render" ; param { Syntax } syntax function DraftMarkup ( syntax ) { if ( ! ( this instanceof DraftMarkup ) ) { return new DraftMarkup ( syntax ) ; } this . syntax = syntax ; } param { string } text return { ContentState } DraftMarkup . prototype . toContent = function toContent ( text , options ) { return parse ( this . syntax , text , options ) ; } ; param { string } text return { List < Tokens > } DraftMarkup . prototype . toInlineContent = function toInlineContent ( text ) { return parse . asInline ( this . syntax , text ) ; } ; param { ContentState } content param { Object } options return { string } DraftMarkup . prototype . toText = function toText ( content , options ) { return render ( this . syntax , content , options ) ; } ; param { List < Tokens > } return { string } DraftMarkup . prototype . toInlineText = function toInlineText ( tokens ) { return render . asInline ( this . syntax , tokens ) ; } ; export default DraftMarkup ;