@contentful/field-editor-rich-text 3.4.16 → 3.4.17
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.
- package/CHANGELOG.md +6 -0
- package/dist/field-editor-rich-text.cjs.development.js +11 -1
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +11 -1
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/plugins/Tracking/createTrackingPlugin.d.ts +1 -0
- package/package.json +2 -2
|
@@ -7174,6 +7174,7 @@ var actionOrigin = {
|
|
|
7174
7174
|
TOOLBAR: 'toolbar-icon',
|
|
7175
7175
|
SHORTCUT: 'shortcut',
|
|
7176
7176
|
VIEWPORT: 'viewport-interaction',
|
|
7177
|
+
SHORTCUT_OR_VIEWPORT: 'shortcut-or-viewport',
|
|
7177
7178
|
COMMAND_PALETTE: 'command-palette'
|
|
7178
7179
|
};
|
|
7179
7180
|
function getPastingSource(data) {
|
|
@@ -7231,6 +7232,15 @@ var createTrackingPlugin = function createTrackingPlugin(onAction) {
|
|
|
7231
7232
|
origin: actionOrigin.SHORTCUT
|
|
7232
7233
|
}, data));
|
|
7233
7234
|
},
|
|
7235
|
+
onShortcutOrViewportAction: function onShortcutOrViewportAction(actionName, data) {
|
|
7236
|
+
if (data === void 0) {
|
|
7237
|
+
data = {};
|
|
7238
|
+
}
|
|
7239
|
+
|
|
7240
|
+
return onAction(actionName, _extends({
|
|
7241
|
+
origin: actionOrigin.SHORTCUT_OR_VIEWPORT
|
|
7242
|
+
}, data));
|
|
7243
|
+
},
|
|
7234
7244
|
onToolbarAction: function onToolbarAction(actionName, data) {
|
|
7235
7245
|
if (data === void 0) {
|
|
7236
7246
|
data = {};
|
|
@@ -7266,7 +7276,7 @@ var createTrackingPlugin = function createTrackingPlugin(onAction) {
|
|
|
7266
7276
|
var characterCountBefore = getCharacterCount(editor);
|
|
7267
7277
|
setTimeout(function () {
|
|
7268
7278
|
var characterCountAfter = getCharacterCount(editor);
|
|
7269
|
-
trackingActions.
|
|
7279
|
+
trackingActions.onShortcutOrViewportAction('paste', {
|
|
7270
7280
|
characterCountAfter: characterCountAfter,
|
|
7271
7281
|
characterCountBefore: characterCountBefore,
|
|
7272
7282
|
characterCountSelection: characterCountSelection,
|