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

Is that possible? Add JS dynamic charts. #269

Open
OtavioRLopes opened this issue May 23, 2023 · 13 comments
Open

Is that possible? Add JS dynamic charts. #269

OtavioRLopes opened this issue May 23, 2023 · 13 comments

Comments

@OtavioRLopes
Copy link

Hey Michelson, how are you?
I have done some dynamic charts JS code, and I'd like to display them in my page.
Is that possible to edit the plus button and add another functionality on this?

@michelson
Copy link
Owner

Sure you can. check how the blocks work, I suggest that you check the code at
https://github.com/michelson/Dante/tree/main/packages/dante3/src/blocks , you can add a new block and add it to the widgets prop: https://www.dante-editor.dev/posts/extensions

@OtavioRLopes
Copy link
Author

Michelson, probably, it will be a real noob question.. But like the noob that I am, ok. Sorry for that.
What I did so far:
1 - npx create-react-app my-app;
2 - cd my-app then -npm install dante3
3 - src/App.js:
import DanteEditor from 'dante3';
import './App.css';
function App() {
return (


<DanteEditor content={"Hello, world!"} />

);
}
export default App;

4 - The error: Attempted import error: 'dante3' does not contain a default export (imported as 'DanteEditor').
I also tried as: import { DanteEditor } from 'dante3';

Did I do something wrong?

So, sorry for my noob question, but would be amazing if you help me to start this!
All I want is to create a index page, with the editor that I can write somethings and save them into my database..

Thank you!! Best regards

@michelson
Copy link
Owner

michelson commented May 26, 2023 via email

@OtavioRLopes
Copy link
Author

Hey Michael, unfortunately, the code box that you link, isn't initializing the editor either

@OtavioRLopes
Copy link
Author

I found a lot of another ones hehehe thank you :)

@michelson
Copy link
Owner

I have updated the code sandboxt to the latest version and added the missing dependence,
glad that it worked tho, let me know how it goes.

@OtavioRLopes
Copy link
Author

I'm facing this errors.. Any sugestion, tip?
I'm trying to initiate it, React app, npm start. Is that ok ?
Thank you for your attention!
error

@michelson
Copy link
Owner

michelson commented May 28, 2023 via email

@gitteroy
Copy link

gitteroy commented Dec 30, 2023

I have the same errors. Even after adding all the dependencies in https://codesandbox.io/s/dante-editor-3-tester-hzi3l. Seems like a common problem, any advice?

ERROR in ./node_modules/dante3/package/esm/index.js 34:0-27
Module not found: Error: Can't resolve 'lowlight/lib/core' in '...\node_modules\dante3\package\esm'
Did you mean 'core.js'?
BREAKING CHANGE: The request 'lowlight/lib/core' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

@michelson
Copy link
Owner

i'm not sure, I have the project running in several projects. Also I've tried the code sandbox and I see it working.

imageç

are you running this in nextjs project? which node version? which system?

@gitteroy
Copy link

gitteroy commented Dec 30, 2023

I was running on Next and had those issues. However, I saw the sandbox is running very well so I started a fresh React app and copied all of your dependencies and code, but still ended up with that error above. Do u have or know any public React/JS projects that running Dante?

@michelson
Copy link
Owner

michelson commented Dec 30, 2023 via email

@Said778
Copy link

Said778 commented Jan 20, 2024

i'm not sure, I have the project running in several projects. Also I've tried the code sandbox and I see it working.

imageç

are you running this in nextjs project? which node version? which system?

I was running on Next and had those issues. However, I saw the sandbox is running very well so I started a fresh React app and copied all of your dependencies and code, but still ended up with that error above. Do u have or know any public React/JS projects that running Dante?

I have the same errors. Even after adding all the dependencies in https://codesandbox.io/s/dante-editor-3-tester-hzi3l. Seems like a common problem, any advice?

ERROR in ./node_modules/dante3/package/esm/index.js 34:0-27 Module not found: Error: Can't resolve 'lowlight/lib/core' in '...\node_modules\dante3\package\esm' Did you mean 'core.js'? BREAKING CHANGE: The request 'lowlight/lib/core' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.

I have the same errors. Even after adding all the dependencies in https://codesandbox.io/s/dante-editor-3-tester-hzi3l. Seems like a common problem, any advice?

ERROR in ./node_modules/dante3/package/esm/index.js 34:0-27 Module not found: Error: Can't resolve 'lowlight/lib/core' in '...\node_modules\dante3\package\esm' Did you mean 'core.js'? BREAKING CHANGE: The request 'lowlight/lib/core' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.

same problem, but without next js, only react js

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

4 participants