Raphael.Export icon indicating copy to clipboard operation
Raphael.Export copied to clipboard

Error when text created without specifying font. AKA "Uncaught TypeError: Cannot read property 'replace' of undefined"

Open silverhawk184 opened this issue 9 years ago • 1 comments

Just specifying "paper.text(x,y).attr('text');" does not create a font attribute, which Raphael.export requires on line 118.

Please update to say "family: typeof node.attrs.font === 'undefined' ? null : node.attrs.font.replace(/^.?"(\w+)".$/, '$1'),"

silverhawk184 avatar Jun 07 '15 23:06 silverhawk184

few days back I had same issue, simply i have commented this line //family: node.attrs.font.replace(/^.?"(\w+)".$/, '$1'), it works for me

daupawar avatar Jun 10 '15 07:06 daupawar