question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation: removeMark() checks `data` along with `type`

See original GitHub issue

It 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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ianstormtaylorcommented, Nov 27, 2018

Open to fixing this if anyone wants to make a PR.

2reactions
danburzocommented, Sep 18, 2017

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 iterating state.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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found