1.1.23 • Published 4 years ago

@yosgo/editor v1.1.23

Weekly downloads
7
License
ISC
Repository
github
Last release
4 years ago

YOSGO Editor

The editor use React, Typescript, react-quill

Feature

  • Store and Generate with HTMLformat
  • Insert image Url and upload image to imgur
  • Embeded video with full width and 16:9 ratio
  • Basic editor function

Get start

Install

styled-components is peerDependencies. If you don't install styled-components yarn add styled-components first.

yarn add @yosgo/editor

Editor props

propsrequiredtypedescription
valueyesstring編輯器中的內容,html 的字串內容
onChangeyesfunction (html: string) => void當編輯器改變時取得 html 內容,並執行自訂函式
modenostring "normal", "simple"簡單模式僅支援粗體、文字超連結、圖片、影片。預設為正常模式
imgurClientIdnostring圖片上傳至指定 imgur application。無此屬性編輯器僅提供貼上圖片網址的功能

Viewer props

propsrequiredtypedescription
htmlyesstring顯示 HTML 內容。透過 Viewer 元件,讓編輯情境與查看情境時的內容樣式保持一致

Example

Example on CodeSandBox

Relative issue tracking

Issue相關連結狀態
react-quill build issue solve with "esModuleInterop": trueLink修正
react-quill build issue solve with "resolutions": {"@types/quill": "1.3.6" }Link修正
extra linesLink修正
BlockEmbed cause copy paste errorLink修正

Helpful resource

1.1.23

4 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago