list legacy
1.0.0
สำคัญ
ที่เก็บนี้เลิกใช้แล้วและไม่ได้รับการสนับสนุนอีกต่อไป ดูเครื่องมือรายการที่เก็บใหม่ที่มีฟังก์ชั่นและความเข้ากันได้มากขึ้นกับข้อมูลเก่า

รับแพ็คเกจ
yarn add @editorjs/listรวมโมดูลที่แอปพลิเคชันของคุณ
import List from "@editorjs/list" ;ทางเลือกคุณสามารถโหลดเครื่องมือนี้ได้จาก CDN JSDELIVR CDN
เพิ่มเครื่องมือรายการไปยังคุณสมบัติ tools ของการกำหนดค่าเริ่มต้น editor.js
import EditorJS from '@editorjs/editorjs' ;
import List from '@editorjs/list' ;
var editor = EditorJS ( {
// ...
tools : {
...
list : {
class : List ,
inlineToolbar : true ,
config : {
defaultStyle : 'unordered'
}
} ,
} ,
} ) ; | สนาม | พิมพ์ | คำอธิบาย |
|---|---|---|
| DefaultStyle | string | ประเภทของรายการ: ordered หรือ unordered ลำดับค่าเริ่มต้นจะถูก ordered |
คุณสามารถเลือกประเภทของรายการ
| สนาม | พิมพ์ | คำอธิบาย |
|---|---|---|
| สไตล์ | string | ประเภทของรายการ: ordered หรือ unordered |
| รายการ | string[] | อาร์เรย์ของรายการของรายการ |
{
"type" : " list " ,
"data" : {
"style" : " unordered " ,
"items" : [
" This is a block-styled editor " ,
" Clean output data " ,
" Simple and powerful API "
]
}
}, เครื่องมือนี้รองรับ I18N API ในการแปลฉลาก UI ให้แปลวัตถุนี้ไปยังพจนานุกรม I18N ของคุณภายใต้ส่วน tools :
"list" : {
"Ordered" : " Нумерованный " ,
"Unordered" : " Маркированный "
}ดูคำแนะนำเพิ่มเติมเกี่ยวกับ editor.js ความเป็นสากลที่นี่: https://editorjs.io/internationalization