Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.87 KB

README.md

File metadata and controls

50 lines (30 loc) · 1.87 KB

Customstyle ProseMirror Plugin For Licit

Build Status GitHub last commit codecov

Build

Commands

  • npm install --legacy-peer-deps --omit=optional --no-shrinkwrap

  • npm pack

To use this in Licit

Run these commands before npm install.

Put the modusoperandi-licit-custom-styles-0.1.0.tgz file in your project location, open command prompt and run:

  • npm install modusoperandi-licit-custom-styles-0.1.0.tgz

Include plugin in licit component

  • import CustomstylePlugin

  • add CustomstylePlugin instance in licit's plugin array

import {CustomstylePlugin} from  '@modusoperandi/licit-custom-styles';

Expecting two parameters in CustomstylePlugin and the parameters are:

 1.A CustomStyleRuntime to configure the style service to licit expects methods like saveStyle(),getStyles(),renameStyle() and removeStyle(). Please refer *licit\client\CustomStyleRuntime.js* for getting more detailed idea.
 2. A boolean flag that indicating the custom style numbering should be displayed or not for the document. For hide numbering pass true.

import CustomStyleRuntime from  './CustomStyleRuntime';
const styleRuntime = new CustomStyleRuntime();
const plugins = [new CustomstylePlugin(styleRuntime,false)]

ReactDOM.render(<Licit docID={''} plugins={plugins}/>)

To load the custom style list drop down and the style editor UI to an angular project

  • import the customstyle.css file in the default global CSS file (src\styles.scss) of the angular project.
@import  "~@modusoperandi/licit-custom-styles/customstyle.css";