v-notion-editor 0.1.7 → 0.1.9

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.
Files changed (5) hide show
  1. package/README.md +5 -4
  2. package/index.d.ts +2 -1
  3. package/index.js +31978 -17579
  4. package/package.json +1 -1
  5. package/style.css +1 -1
package/README.md CHANGED
@@ -11,6 +11,8 @@ A powerful, feature-rich Vue 3 rich text editor component inspired by Notion, It
11
11
  - **Image Handling**: Drag-and-drop image uploads with customizable upload functions.
12
12
  - **File Handler**: Smart paste handling for images and rich content
13
13
  - **Image Resizing & Alignment**: Smoothly resize images with interactive handles and align them left, right, or center.
14
+ - **Embed Handling**: Embed videos OR websites supports YouTube, Vimeo, Google Maps, Facebook, and more.
15
+ - **Math Rendering**: Inline and block math support with KaTeX
14
16
  - **Drag & Drop**: Reorder content blocks with visual drag handles
15
17
  - **Slash Commands**: Quick content insertion with "/" command menu
16
18
  - **Link Management**: Smart link insertion and editing with bubble menu
@@ -192,10 +194,11 @@ const getEditorContent = () => {
192
194
 
193
195
  ### 3. Read-Only Content Display
194
196
 
195
- To display editor content with the same styling in read-only mode, wrap your content with the `v-notion-editor` class:
197
+ To display editor content with the same styling and functionality (like syntax highlighting and math rendering) in read-only mode, use the NotionReadMode component:
196
198
 
197
199
  ```vue
198
200
  <script setup>
201
+ import { NotionReadMode } from 'v-notion-editor'
199
202
  import 'v-notion-editor/style.css'
200
203
 
201
204
  const savedContent = ref(`
@@ -207,9 +210,7 @@ const savedContent = ref(`
207
210
 
208
211
  <template>
209
212
  <!-- Read-only content with editor styling -->
210
- <div class="v-notion-editor">
211
- <div v-html="savedContent" class="read-mode" />
212
- </div>
213
+ <NotionReadMode :content="savedContent" />
213
214
  </template>
214
215
  ```
215
216
 
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { default as NotionEditor } from './components/NotionEditor.vue';
2
2
  import { default as NotionToolbar } from './components/NotionToolbar/NotionToolbar.vue';
3
+ import { default as NotionReadMode } from './components/NotionReadMode.vue';
3
4
 
4
- export { NotionEditor, NotionToolbar };
5
+ export { NotionEditor, NotionToolbar, NotionReadMode };