discourse/test/javascripts/helpers/d-editor-helper.js
2020-03-26 12:25:46 -04:00

12 lines
218 B
JavaScript

export default function formatTextWithSelection(text, [start, len]) {
return [
'"',
text.substr(0, start),
"<",
text.substr(start, len),
">",
text.substr(start + len),
'"'
].join("");
}