You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that in the current implementation, when only one parameter is provided, it would be always interpreted as options.
// This would always return trueuseEditorIsActive(editor,'heading')// This would work as intendeduseEditorIsActive(editor,'heading',{})
This is different from the official Editor API in the Tiptap documentation where the only parameter may be interpreted either way as options or as the name of the node or mark, i.e.,
// Check if it’s a headingeditor.isActive('heading')// Check if it’s a heading with a specific attribute valueeditor.isActive('heading',{level: 2})// Check if it has a specific attribute value, doesn’t care what node/mark it iseditor.isActive({textAlign: 'justify'})
It appears that in the current implementation, when only one parameter is provided, it would be always interpreted as options.
This is different from the official Editor API in the Tiptap documentation where the only parameter may be interpreted either way as options or as the name of the node or mark, i.e.,
This behavior is certainly related to
solid-tiptap/packages/solid-tiptap/src/Editor.tsx
Line 84 in 6b7f27a
To make things clearer, this discrepancy would better be either documented or fixed like
The text was updated successfully, but these errors were encountered: