@jojovms/scripto 0.0.2 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -46
- package/dist/{scripto.js → scripto.es.js} +1086 -1061
- package/dist/scripto.umd.js +77 -0
- package/package.json +9 -8
- package/dist/scripto.umd.cjs +0 -77
package/README.md
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
# Scriptō -
|
|
1
|
+
# Scriptō - React Markdown Viewer
|
|
2
2
|
|
|
3
|
-
[**🚀 Live Demo**](https://shijoshaji.github.io/Scripto/)
|
|
3
|
+
[**🚀 Live Demo**](https://shijoshaji.github.io/Scripto/) | [**📦 NPM Package**](https://www.npmjs.com/package/@jojovms/scripto)
|
|
4
4
|
|
|
5
|
-
**Scriptō** is a beautiful, lightweight, and
|
|
5
|
+
**Scriptō** is a beautiful, lightweight, and simple Markdown viewer component for React.
|
|
6
6
|
|
|
7
7
|
> "Simple, elegant visualization — where every mark becomes meaning."
|
|
8
8
|
|
|
9
9
|
## ✨ Features
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- **Drag &
|
|
13
|
-
- **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
11
|
+
- **Beautiful UI**: Modern, glassmorphism design with vibrant background animations.
|
|
12
|
+
- **Instant Preview**: Drag & drop or paste URLs to view `.md` files instantly.
|
|
13
|
+
- **Rich Text Copy**: Copy Markdown as formatted HTML to paste directly into emails/docs.
|
|
14
|
+
- **Accessibility**: Integrated Text-to-Speech (Read Aloud).
|
|
15
|
+
- **Export**: Save documents as clean PDF files.
|
|
16
|
+
- **Theming**: Built-in Dark and Light modes.
|
|
17
|
+
|
|
18
|
+
## 📦 Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @jojovms/scripto
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 🚀 Usage
|
|
25
|
+
|
|
26
|
+
Import the component and the styles in your React application:
|
|
27
|
+
|
|
28
|
+
```jsx
|
|
29
|
+
import React from 'react';
|
|
30
|
+
import { Scripto } from '@jojovms/scripto';
|
|
31
|
+
import '@jojovms/scripto/dist/style.css'; // Don't forget the styles!
|
|
32
|
+
|
|
33
|
+
function App() {
|
|
34
|
+
return (
|
|
35
|
+
<div style={{ height: '100vh', width: '100%' }}>
|
|
36
|
+
{/* Basic Usage */}
|
|
37
|
+
<Scripto />
|
|
38
|
+
|
|
39
|
+
{/* Or load a file from a URL */}
|
|
40
|
+
<Scripto url={`${window.location.origin}/docs/walkthrough.md`} />
|
|
41
|
+
or
|
|
42
|
+
<Scripto url="https://raw.githubusercontent.com/jojovms/scripto/main/README.md" />
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default App;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **Note**: The `Scripto` component is designed to take up the full height of its container. Ensure the parent container has a defined height (e.g., `100vh`).
|
|
51
|
+
|
|
52
|
+
## 🛠️ Props
|
|
53
|
+
|
|
54
|
+
| Prop | Type | Description |
|
|
55
|
+
|------|------|-------------|
|
|
56
|
+
| `url` | `string` | Optional. A direct URL to a Markdown file to load on mount. Supports raw URLs or GitHub blob URLs. |
|
|
54
57
|
|
|
55
58
|
## 👨💻 Credits
|
|
59
|
+
|
|
56
60
|
Created by [Shijo Shaji](https://bio.link/shijoshaji).
|
|
57
61
|
|
|
58
62
|
---
|