@worktile/theia 21.1.1 → 21.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,7 +10,7 @@ import { cloneDeep, map, every, assign, defaults, groupBy, uniq, isEqual } from
|
|
|
10
10
|
export { assign, cloneDeep, debounce, defaults, groupBy, isEqual, map, uniq } from 'lodash-es';
|
|
11
11
|
import { Editor, Element, Span, Range, Path, Node, Point, Text, Transforms, Operation, createEditor } from 'slate';
|
|
12
12
|
import * as i4 from 'slate-angular';
|
|
13
|
-
import { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, getClipboardData, AngularEditor, hotkeys,
|
|
13
|
+
import { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, getClipboardData, AngularEditor, hotkeys, createClipboardData, setClipboardData, BaseElementComponent, IS_SAFARI, ELEMENT_TO_COMPONENT, SlateModule, getBlockCardByNativeElement, SLATE_BLOCK_CARD_CLASS_NAME, EDITOR_TO_VIRTUAL_SCROLL_SELECTION, BaseElementFlavour, hasBlockCard, isCardLeft, getCachedHeightByElement, isDebug, debugLog, cacheHeightByElement, DEFAULT_ELEMENT_HEIGHT, DefaultTextFlavour, defaultScrollSelectionIntoView, getDataTransferClipboard, SLATE_DEBUG_KEY, withAngular } from 'slate-angular';
|
|
14
14
|
import { HistoryEditor, withHistory } from 'slate-history';
|
|
15
15
|
import { NODE_TO_PARENT, NODE_TO_INDEX, NODE_TO_ELEMENT, DOMEditor, EDITOR_TO_ELEMENT } from 'slate-dom';
|
|
16
16
|
import { TheiaConverter } from '@atinc/selene';
|
|
@@ -2216,7 +2216,10 @@ const setClipboardDataByDom = async (e, fragment, data) => {
|
|
|
2216
2216
|
child.innerHTML = htmlString;
|
|
2217
2217
|
document.body.appendChild(div);
|
|
2218
2218
|
const attach = div.childNodes[0];
|
|
2219
|
-
|
|
2219
|
+
let plainText = '';
|
|
2220
|
+
nodes.forEach(node => {
|
|
2221
|
+
plainText = plainText ? plainText + ' ' + Node.string(node) : Node.string(node);
|
|
2222
|
+
});
|
|
2220
2223
|
const clipboardData = createClipboardData(htmlString, nodes, plainText, []);
|
|
2221
2224
|
await setClipboardData(clipboardData, div, attach, data);
|
|
2222
2225
|
document.body.removeChild(div);
|
|
@@ -2420,7 +2423,7 @@ function toggleStyle(nativeElement, styleName, styleValue) {
|
|
|
2420
2423
|
nativeElement.style[styleName] = styleValue;
|
|
2421
2424
|
}
|
|
2422
2425
|
else if (styleName && isUndefinedOrNull(styleValue) && nativeElement.style[styleName]) {
|
|
2423
|
-
nativeElement.style
|
|
2426
|
+
nativeElement.style[styleName] = '';
|
|
2424
2427
|
}
|
|
2425
2428
|
}
|
|
2426
2429
|
function toggleProperty(nativeElement, propertyName, propertyValue) {
|