Giter VIP home page Giter VIP logo

c-markdown-editor's Introduction

Concordant Markdown Editor

The Concordant markdown editor is a collaborative markdown editor React component build on top of the MDEditor React component. This initial component has become collaborative thanks to features provided by the Concordant platform.

The main repository is in the Inria gitlab (this is where you can post tickets). There is an identical clone in GitHub (tickets here might be ignored).

Requirements (versions)

This project has been tested on Node.js v14.15.0+ using NPM v6.14.8+. It might work with older Node and NPM versions.

Use as a React component

Install the package:

$ npm i @concordant/c-markdown-editor

Import the c-client and the component in your project:

import { client } from "@concordant/c-client";
import CMDEd from "@concordant/c-markdown-editor";

Open a session and a collection (replace with your database name, the url of your c-service and credentials):

let session = client.Session.Companion.connect(<dbName>, <serviceUrl>, <credentials>);
let collection = session.openCollection("mdeditor", false);

Use the Markdown Editor component:

<CMDEd session={session} collection={collection} />

You can provide the name of the document with docName parameter (optional).

Standalone editor

A demo standalone application is included in the editor source repository.

Install Project dependencies

Clone the Git repository, and run inside:

npm install

This will install all dependencies.

Configuration

Some parameters are configurable and stored in the file src/config.json:

  • serverUrl: is the url of the c-service that should be used;
  • dbName: is the name of the database you want to store your content in.

Run the application

Go to project root directory and:

npm start

This will run the app in the development mode.

Open http://localhost:3000 to view it in the browser. The page will reload if you make edits.

To make a production build with the updated configuration, run:

npm run build

This will build the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

c-markdown-editor's People

Contributors

flooc avatar llefrioux avatar itoumlilt avatar marc-shapiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.