Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot toggle text into link with custom toolbar #69

Open
legowtham opened this issue Jun 28, 2023 · 0 comments
Open

Cannot toggle text into link with custom toolbar #69

legowtham opened this issue Jun 28, 2023 · 0 comments
Labels
v4 Will be implemented in v4
Milestone

Comments

@legowtham
Copy link

Describe the bug:

I'm trying to toggle link with custom toolbar after selecting the text. The url input box doesn't open.

CustomToolBar.js

...
<ToolbarButton isActive={elements['link']?.isActive} type="button" onClick={() => elements['link'].toggle()}>
           <Link isActive={elements['link']?.isActive} />
</ToolbarButton>
...

TextEditor.js

<YooptaEditor
plugins={plugins}
value={value}
marks={marks}
onChange={handleOnChange}
placeholder="Type / for commands or just type your content."
tools={{
Toolbar: <Toolbar type="bubble" render={CustomToolBar} />,
ActionMenu: <ActionMenu render={CustomActionMenu} items={actionItems} />,
LinkTool: <LinkTool asChildren={false} />,
}}
/>

To Reproduce
Steps to reproduce the behavior:

Try to toggle link with onClick={() => elements['link'].toggle()}> in the custom toolbar.

Expected behavior
On toggle, the link input box should open so I can paste my url.

Additional log:
const elements = useElements();
console.log(elements) outputs below:

Screenshot 2023-06-29 011640

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: Windows 11 22621.1702
Browser: Chrome 113.0.5672.93
Version :
"@yoopta/action-menu-list": "^1.9.10-rc",
"@yoopta/callout": "^1.9.10-rc",
"@yoopta/code": "^1.9.10-rc",
"@yoopta/editor": "1.9.14-rc",
"@yoopta/embed": "^1.9.10-rc",
"@yoopta/headings": "^1.9.10-rc",
"@yoopta/image": "^1.9.10-rc",
"@yoopta/link": "^1.9.10-rc",
"@yoopta/link-tool": "^1.9.3-rc",
"@yoopta/lists": "^1.9.10-rc",
"@yoopta/marks": "^1.9.10-rc",
"@yoopta/paragraph": "^1.9.12-rc",
"@yoopta/renderer": "^1.9.10-rc",
"@yoopta/toolbar": "^1.9.10-rc",
"@yoopta/video": "^1.9.10-rc",

@Darginec05 Darginec05 added the v4 Will be implemented in v4 label Feb 16, 2024
@maZahaca maZahaca added this to the v4 milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 Will be implemented in v4
Projects
None yet
Development

No branches or pull requests

3 participants