discourse/test/javascripts/helpers/d-editor-helper.js

16 lines
252 B
JavaScript
Raw Normal View History

2018-07-29 16:51:32 -04:00
Ember.Test.registerAsyncHelper("formatTextWithSelection", function(
app,
text,
[start, len]
) {
return [
'"',
text.substr(0, start),
"<",
text.substr(start, len),
">",
text.substr(start + len),
'"'
].join("");
});