@tiptap/core 2.0.0-beta.169 → 2.0.0-beta.172
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/dist/tiptap-core.cjs.js +8 -4
- package/dist/tiptap-core.cjs.js.map +1 -1
- package/dist/tiptap-core.esm.js +8 -4
- package/dist/tiptap-core.esm.js.map +1 -1
- package/dist/tiptap-core.umd.js +8 -4
- package/dist/tiptap-core.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/setTextSelection.ts +3 -3
- package/src/extensions/tabindex.ts +6 -2
- package/src/helpers/injectExtensionAttributesToParseRule.ts +0 -1
package/dist/tiptap-core.cjs.js
CHANGED
|
@@ -1197,8 +1197,8 @@ const setTextSelection = position => ({ tr, dispatch }) => {
|
|
|
1197
1197
|
const { from, to } = typeof position === 'number'
|
|
1198
1198
|
? { from: position, to: position }
|
|
1199
1199
|
: position;
|
|
1200
|
-
const minPos =
|
|
1201
|
-
const maxPos =
|
|
1200
|
+
const minPos = 0;
|
|
1201
|
+
const maxPos = tr.doc.content.size;
|
|
1202
1202
|
const resolvedFrom = minMax(from, minPos, maxPos);
|
|
1203
1203
|
const resolvedEnd = minMax(to, minPos, maxPos);
|
|
1204
1204
|
const selection = prosemirrorState.TextSelection.create(doc, resolvedFrom, resolvedEnd);
|
|
@@ -2172,8 +2172,12 @@ const Tabindex = Extension.create({
|
|
|
2172
2172
|
new prosemirrorState.Plugin({
|
|
2173
2173
|
key: new prosemirrorState.PluginKey('tabindex'),
|
|
2174
2174
|
props: {
|
|
2175
|
-
attributes: {
|
|
2176
|
-
|
|
2175
|
+
attributes: () => {
|
|
2176
|
+
if (this.editor.isEditable) {
|
|
2177
|
+
return {
|
|
2178
|
+
tabindex: '0',
|
|
2179
|
+
};
|
|
2180
|
+
}
|
|
2177
2181
|
},
|
|
2178
2182
|
},
|
|
2179
2183
|
}),
|