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.

`Editor.marks` seems to be truthy for all mark types if any mark is active

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

Looks like Editor.marks is returning truthy, if any mark is active. This is the function I use:

const isMarkActive = (editor, type) => {
  const [mark] = Editor.marks(editor, { match: { type }, mode: 'universal' })
  return !!mark
};

What’s the current behavior?

screen-capture

Slate: 0.50.4 Browser: Chrome OS: Linux

What’s the expected behavior?

Returning the right mark status would be beneficial.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
krishnagopinathcommented, Dec 1, 2019

@ianstormtaylor could I give this a try?

0reactions
ianstormtaylorcommented, Dec 1, 2019

Absolutely!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mark - ProseMirror Reference manual
Reference manual. This is the reference manual for the ProseMirror rich text editor. It lists and describes the full public API exported by...
Read more >
Proofreading Marks at a Glance
Proofreading marks (also called proofreaders' marks) are symbols and notations for correcting typeset pages. The proofreader places.
Read more >
CodeMirror 5 User Manual
User manual and reference guide version 5.65.11. CodeMirror is a code-editor component that can be embedded in Web pages. The core library provides...
Read more >
core-utils | Remirror
Check that the nodes and marks present on schemaA are also present on schemaB . ... Determines if a Node or Mark contains...
Read more >
Docs • Svelte
Svelte uses the export keyword to mark a variable declaration as a property or prop, which means it becomes accessible to consumers of...
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