2019-06-05 20:52:38 +08:00
|
|
|
export default function formatTextWithSelection(text, [start, len]) {
|
2018-07-30 04:51:32 +08:00
|
|
|
return [
|
|
|
|
'"',
|
|
|
|
text.substr(0, start),
|
|
|
|
"<",
|
|
|
|
text.substr(start, len),
|
|
|
|
">",
|
|
|
|
text.substr(start + len),
|
|
|
|
'"'
|
|
|
|
].join("");
|
2019-06-05 20:52:38 +08:00
|
|
|
}
|