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

Import for sveltekit #1584

Open
bitdom8 opened this issue Oct 20, 2021 · 1 comment
Open

Import for sveltekit #1584

bitdom8 opened this issue Oct 20, 2021 · 1 comment

Comments

@bitdom8
Copy link

bitdom8 commented Oct 20, 2021

Hi tried many ways to import for sveltekit but options won't work


import MediumEditor from 'medium-editor'
	const MediumEditor = () => import("./../../../node_modules/medium-editor/dist/js/medium-editor.min.js").then(delayModuleLoad)

	const delayModuleLoad = module =>
    new Promise(res =>
      setTimeout(() => res(module), Math.random() * 2000, console.log(999)),
    );

	console.log(MediumEditor())

	var editor
	MediumEditor.activeButtonClass = 'medium-editor-button-active'
	MediumEditor.placeholder = [{
        /* This example includes the default options for placeholder,
           if nothing is passed this is what it used */
        text: 222,
	}
    ]

	var editor = new MediumEditor('.editable', {
    anchorPreview: false
});
@pavinduLakshan
Copy link

Facing similar issues when using this lib with svelte

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

2 participants