Documentation: removeMark() checks `data` along with `type`
See original GitHub issueIt was not at all clear to me that when you call removeMark(type), it also checks mark’s data parameter and will not remove a mark even if it matches the type if the data
doesn’t match as well.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Remove hidden data and personal information by inspecting ...
In the Document Inspector dialog box, select the check boxes to choose the types of hidden content that you want to be inspected....
Read more >core-utils | Remirror
Check if the specified type (NodeType) can be inserted at the current selection point. ... Creates a document node from the passed in...
Read more >Reference manual - ProseMirror
This module implements the state object of a ProseMirror editor, along with ... check(). Check whether this node and its descendants conform to...
Read more >Creating a macOS App — SwiftUI Tutorials - Apple Developer
Xcode adds a new group and set of starter files for the macOS app, along with the ... A screenshot of Xcode showing...
Read more >Commands - Slate
Delete everything in the current selection. insertBlock. insertBlock(block: Block) => Editor insertBlock(properties: Object) => Editor insertBlock(type: String) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Open to fixing this if anyone wants to make a PR.
You can also follow this discussion to see the different cases
removeMark
needs to cover.The decision so far is to have
removeMark
remove specific Marks (that is, the type + associated data), and iteratingstate.marks
manually and removing the marks as necessary based on your custom condition.Slate may eventually get a
removeMark(String)
that removes all marks of a given type, but I think that’s still an open subject.