* Adds attributes to toggleList
When dealing with different variants of bullet lists, I wanted to adopt the same technique I used for different paragraph variants. Since `wrapInList` is capable of receiving attributes, just like `setNode` is, I don't see any reason why `toggleList` should not be capable of the same.
Here's my bullet list extension in action that is in need of attributes support.
```js
export const CustomBulletList = BulletList.extend({
content: 'listItem*',
addAttributes() {
return {
variant: {
default: DEFAULT_LIST,
renderHTML: attributes => {
return {
class: `list-${attributes.variant}`,
};
},
},
};
},
addCommands() {
return {
toggleBulletList: attributes => (c) => {
return c.commands.toggleListCustom(this.name, this.options.itemTypeName, attributes);
},
};
},
});
```
* Update toggle-list.md
* Update toggle-list.md
* feat: #3540 Ability to preserve marks on lists
* feat: preserveAttrs in list items
* `keepMarks` is working, but need help with `keepAttrs`
* fix: conflict
* avoid casting
* fix: bring back global rollup config
* fix: add rollup build for packages except pm
* fix: rollup global build
* fix: fix memory leak on build
* fix(character-count): revert files
* fix: builds run individual per rollup and lerna
* chore: remove old rollup
* fix(blockquote): correct the main module path
* fix(character count): bump version number
* chore:(core): migrate to tsup
* chore: migrate blockquote and bold to tsup
* chore: migrated bubble-menu and bullet-list to tsup
* chore: migrated more packages to tsup
* chore: migrate code and character extensions to tsup
* chore: update package.json to simplify build for all packages
* chore: move all packages to tsup as a build process
* chore: change ci build task
* chore: clean up and fix issues related to new build
* fix: fix demo build
* fix: fix demo build
* fix: fix tsconfig files to reference only one source
* fix: fix minor ts issues
* fix(core): 🐛 fix delete on empty nodes joining next node incorrectly
This PR implements a "deleteCurrentNode" action in combination with registering this command inside the keymap for the delete key. This way, we editor will check, if the current node is empty before joining - if the current node is empty, the node will be removed. Joining will still work if the current node is not empty and the selection is at the end of the current node
2924
* refactor(core): ♻️ remove unnecessary return on handleDelete keymap
* Fix TipTap getting loaded as CommonJS when the intent is to use the ES Module version.
* `package.json` change also makes explicit exports required
* Update `core` utilities exports to include all utilities
* Update tests to use exported utilities
* Fixed dragged text not being deleted after drop on another editor
* refactor code solved typescript errors
Co-authored-by: luis.feliu <luis.feliu@mentormate.com>