This package has been deprecated

Author message:

WARNING: This project has been renamed to ng-write. Install using ng-write instead.

ng-docu
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

ng-docu

Build Status

Documentation helper Angular components for writing documentations and articles. See this library in action here.

See animation on github

Installation

Add the package to your angular project using

npm install ng-docu
# or
yarn add ng-docu
# or
ng add ng-docu

Since math requires katex for rendering proper LaTeX expressions, one need to include the katex styles in the angular.json file manually.

"projects": {
  "projectID": {
    "architect": {
      "build": {
        "options": {
          "styles": [
            "./node_modules/katex/dist/katex.min.css"

replace projectID with your projects name.

Usage

There are two modules to use. The DocuModule and the DocuEditorModule. The DocuModule has got predefined components for displaying the documentation generated using the DocuEditorModule.

At first import one of these modules in your application module.

@NgModule({
  imports: [ DocuModule, DocuEditorModule ]
})
export class ApplicationModule{}

The documentation editor

Make sure to have the DocuEditorModule imported. The module provides a complete form with live rendering. It should integrate with your @angular/material configuration.

In the template simply use the editor tag to create a complete form for the article.

<docu-editor></docu-editor>

API

  • @Output() save($event): When the user saves the form, the save event will emit and contain the complete nested form.
  • @Input() documentation: Documentation: The user can patch the form with a previously created documentation.

Displaying the document

The document can be displayed using

<docu-article></docu-article>

which just has a @Input() documentation: Documentation interface.

Get in contact

Package Sidebar

Install

npm i ng-docu

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

1.04 MB

Total Files

226

Last publish

Collaborators

  • ngfelixl