How to install prosemirror?

Hi all, Looks like noob question but yeah… How to install Prosemirror? I only use node with npm. The github version says nothing to me. I want to install it locally with npm but i dont see options like this. Also i want to use it on existing system as my rich text editor/markdown. I’m completly lost…

Here’s a tutorial(ish) guide for first-time Prosemirror users: http://hexopress.com/@joe/blog/2019/01/07/how-to-install-use-prosemirror-in-your-project

P.S It’s always healthy to learn the basics of modern JS dev workflows like ES6 Modules, module bundling and such stuff before directly using ProseMirror. That said, the above guide will get you a quickstart anyway.

Also, as @marijn puts it, the library is not intended for end users. ProseMirror is a platform to create simpler rich-text libraries.

That’s not really how I see it. The library is absolutely meant for end users—it’s just that integrating it is always going to quite a lot of work and involve complicated programming, so it’s not a drop-in-and-forget kind of component.

Installing ProseMirror with npm is a matter of npm install-ing the packages that you need (see the reference guide for a list of the core packages, or the examples for concrete example code), just like with all other code on npm.

Hi, Thanks for help got it working with after few attempts. I know ES6 syntax but didn’t learn much about bundling and modules (will learn for sure :slight_smile: ). Got it working by playing with learn-prosemirror npm. I had to configure some stuff there but now its working as I wanted :slight_smile: Thank guys

@MarekDzw trust me, once you get over the hill with modules and bundling, you’ll wonder how you got anything done without them! Long live ECMA^6! It’s awesome!

1 Like

I do not see anything explicit in the documentation about installation. I see code, but you have to have a file before you can have code.

Where is this file? Which file is it?

You’re going to have to learn about npm to use this library.

I’ve been playing with the ProseMirror example setup via prosemirror-example-setup, but now it’s not clear what to do with the resulting node_modules folder.

Obviously, I need to incorporate these files into my project, but we’re talking about quite a few nodes with src folders inside. I assume I won’t need to load each file directly (in an HTML document, for example), and it seems like there is some bit of JS that “ties the room together” that I’m missing (or perhaps not seeing in the documentation).

I’d be thrilled with a bit of guidance here. (And feel free to share your experience if you’re not @marijn—your struggles may set off a light bulb for me!)