Skip to content

Commit d060cf7

Browse files
committed
refactor: added some comments
1 parent 98e1fd6 commit d060cf7

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,19 @@ export default class Paragraph implements BlockTool {
4343
*/
4444
private readonly element: HTMLDivElement;
4545

46+
/**
47+
* CSS class names
48+
*/
4649
private readonly CSS: ParagraphToolCSS;
4750

4851
/**
4952
* Placeholder for paragraph if it is first Block
5053
*/
5154
private readonly placeholder: string;
5255

56+
/**
57+
* Will save empty paragraphs if set to true
58+
*/
5359
private readonly preserveBlank: boolean;
5460

5561
/**

src/types/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export interface ParagraphToolConfig extends ToolConfig {
2222
preserveBlank?: boolean;
2323
}
2424

25+
/**
26+
* CSS class names for elements created by the plugin
27+
*/
2528
export interface ParagraphToolCSS {
2629
/**
2730
* Block CSS class name
@@ -34,10 +37,16 @@ export interface ParagraphToolCSS {
3437
wrapper: string;
3538
}
3639

40+
/**
41+
* Used by Editor paste handling API
42+
*/
3743
export interface PasteConfig {
3844
tags: string[];
3945
}
4046

47+
/**
48+
* Used by Editor API to display the module in the toolbox
49+
*/
4150
export interface Toolbox {
4251
icon: string;
4352
title: string;

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig({
1919
build: {
2020
lib: {
2121
entry: path.resolve(__dirname, 'src', 'index.ts'),
22-
name: 'paragraph',
22+
name: 'Paragraph',
2323
formats: ['umd', 'es'],
2424
fileName: 'paragraph',
2525
},

0 commit comments

Comments
 (0)