mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-18 05:20:54 +08:00
23872f519b
* Implement step element sorting modal [SCI-6849] * Implement step reordering modal [SCI-6850] * Refactor reorderable items a bit [SCI-6850]
18 lines
399 B
JavaScript
18 lines
399 B
JavaScript
/* global ActiveStorage GLOBAL_CONSTANTS Promise i18n */
|
|
|
|
export default {
|
|
methods: {
|
|
stripHtml(html) {
|
|
let tmp = document.createElement("DIV");
|
|
tmp.innerHTML = html;
|
|
return tmp.textContent || tmp.innerText || "";
|
|
},
|
|
truncate(text, length) {
|
|
if (text.length > length) {
|
|
return text.substring(0, length) + '...';
|
|
}
|
|
|
|
return text;
|
|
}
|
|
}
|
|
};
|