1.1.72 • Published 27 days ago

ngx-stackedit v1.1.72

Weekly downloads
-
License
Apache2.0
Repository
github
Last release
27 days ago

ngx-stackedit

npm npm npm downloads GitHub stars

StackEdit aspires to surpass all other markdown editors, becoming the most formidable and feature-rich markdown editor in the market. With a focus on power and versatility, we designed it to empower your markdown editing experience like never before

With the goal of burying all other markdown editors six feet under, we sometimes have to take risky measures. One of those measures is acting like we're better than the other markdown editors. Because we are.

Features:

  • Rich Text Editing: Enjoy a seamless editing experience with real-time Markdown rendering, making it easier than ever to see your content come to life as you type.

  • Syntax Highlighting: Write and edit code in style with syntax highlighting for various programming languages, ensuring your code looks as good as it works.

  • Color Customization: Express your creativity by customizing the editor's color scheme to match your unique preferences or brand aesthetics.

  • Mermaid Charts: Effortlessly integrate Mermaid charts into your documents for visually appealing data visualization.

  • Scroll Syncing: Experience a fluid writing and reading experience with scroll syncing, keeping your place in your document no matter where you are.

Markdown Preview Diagram View Fetch View Code View


Demo: https://dotglitch.dev/#/StackEdit

Quickstart

Install
    npm i -S ngx-stackedit
Import
import { Component } from '@angular/core';
import { StackEditorComponent } from 'ngx-stackedit';

@Component({
    selector: 'app-example',
    template: `
<ngx-stackedit
    [(value)]="defaultValue"
    mode="viewonly"
    (onImageUpload)="onImageUpload($event)"
/>
    `,
    imports: [
        StackEditorComponent
    ],
    standalone: true
})
export class ExampleBasicComponent {

    defaultValue = `
Lorem **ipsum** _dolor_ sit amet, consectetur adipiscing elit, sed do _eiusmod tempor incididunt_ \
ut labore et dolore magna ~~aliqua~~. Ut enim ad minim veniam, quis nostrud exercitation \
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in \
_reprehenderit_ in <span style="color: #ff0000">voluptate</span> velit esse cillum \
dolore eu fugiat nulla pariatur. Excepteur sint ~~occaecat cupidatat~~ non proident, \
sunt in culpa qui **officia deserunt mollit** anim id est laborum.
    `;

    // Sample for handling an image upload event
    onImageUpload(evt: { data: FileList, stackEditor: StackEditorComponent }) {
        const formData = new FormData();

        Object.keys(evt.data).forEach(k => {
            const file: {
                lastModified: number,
                lastModifiedDate: Date,
                name: string,
                size: number,
                type: string;
            } = evt.data[k];

            const parts = file.name.split('.');
            const name = parts.slice(0, -1).join('.') + '-' + ulid() + '.' + parts.slice(-1)[0];
            formData.append(name, file as any);
        });
        formData.append("data", JSON.stringify({
            path,
            autoRename: true
        }));

        const url = `/api/files/upload`;

        const { files } = await this.fetch.post<{ files: {url: string, name: string}[] }>(url, formData);

        evt.stackEditor.finalizeImageUpload({
            label: files[0].name,
            link: files[0].url
        });
    }
}

Developing

npm install

# Start dev server on localhost:8080
npm run dev
# OR: Start standalone app dev server
npm run tauri:dev

Building

# npm package build in ./dist
npm run build
# Build a static site (uses indexedDB for storage)
npm run build:static
# or build the tauri app (requires rust Tauri setup)
npm run tauri:build

# build for production and view the bundle analyzer report
npm run build:analyze

License

This project is licensed under mixed MIT and Apache 2.0 Licenses. See the LICENSE file for details.

1.1.72

27 days ago

1.1.71

27 days ago

1.1.70

5 months ago

1.1.68

7 months ago

1.1.67

7 months ago

1.1.66

7 months ago

1.1.65

7 months ago

1.1.64

7 months ago

1.1.62

8 months ago

1.1.61

8 months ago

1.1.59

8 months ago

1.1.60

8 months ago

1.1.58

8 months ago

1.1.57

9 months ago

1.1.56

10 months ago

1.1.55

10 months ago

1.1.54

10 months ago

1.1.53

10 months ago

1.1.49

11 months ago

1.1.48

11 months ago

1.0.19

1 year ago

1.0.18

1 year ago

1.1.29

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.1.30

1 year ago

1.1.34

1 year ago

1.0.22

1 year ago

1.1.33

1 year ago

1.0.21

1 year ago

1.1.32

1 year ago

1.0.20

1 year ago

1.1.31

1 year ago

1.1.38

1 year ago

1.0.26

1 year ago

1.1.37

1 year ago

1.0.25

1 year ago

1.1.36

1 year ago

1.0.24

1 year ago

1.1.35

1 year ago

1.0.23

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.1.39

1 year ago

1.0.27

1 year ago

1.1.41

1 year ago

1.1.40

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.1.43

1 year ago

1.0.31

1 year ago

1.1.42

1 year ago

1.0.30

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.1.1

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.40

1 year ago

1.1.12

1 year ago

1.0.44

1 year ago

1.1.11

1 year ago

1.0.43

1 year ago

1.1.10

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.1.16

1 year ago

1.0.48

1 year ago

1.1.15

1 year ago

1.0.47

1 year ago

1.1.14

1 year ago

1.0.46

1 year ago

1.1.13

1 year ago

1.0.45

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.0.49

1 year ago

1.0.51

1 year ago

1.0.50

1 year ago

1.0.55

1 year ago

1.0.54

1 year ago

1.1.21

1 year ago

1.0.53

1 year ago

1.1.20

1 year ago

1.0.52

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago