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

React Tooltip component throws "out of scope" exception #3

Closed
SSopin opened this issue May 27, 2023 · 2 comments
Closed

React Tooltip component throws "out of scope" exception #3

SSopin opened this issue May 27, 2023 · 2 comments

Comments

@SSopin
Copy link

SSopin commented May 27, 2023

Hi,

I copied the code from React Tooltip example into my app and it breaks the editor when tries to execute the following:

        ctx.set(tooltip.key, {
          view: pluginViewFactory({
            component: TooltipView,
          })
        })

Here is the error:

Error: out of scope
    at pluginViewContext.ts:23:1
    at ModelDescriptionEditor.tsx:35:1
    at editor.ts:76:1
    at Array.map (<anonymous>)
    at editor.ts:76:1
    at config.ts:15:1
    at editor.ts:143:1
    at Array.map (<anonymous>)
    at ve.<anonymous> (editor.ts:133:1)
    at ve.create (editor.ts:210:1)

Am I doing something wrong? I didn't even change the code, just copied it.

@JorgeAtPaladin
Copy link

+1 we have the same.

@Saul-Mirone
Copy link
Member

You'll need to add linkTooltipPlugin to your plugin list. Check this line:
https://github.com/Milkdown/examples/blob/main/component-link-tooltip/src/main.ts#L56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants