croco-html 3.0.7 → 3.1.0
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/esm2022/lib/components/add-files-btn/add-files-btn.component.mjs +3 -2
- package/esm2022/lib/components/editor/download-file-button-editor/download-file-button-editor.component.mjs +2 -2
- package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +2 -2
- package/esm2022/lib/components/editor/main-editor/main-editor.component.mjs +3 -3
- package/esm2022/lib/components/editor/visual-editor/DefaultTags.mjs +15 -15
- package/esm2022/lib/components/editor/visual-editor/visual-editor.component.mjs +14 -8
- package/esm2022/lib/components/xml-tags/xml-tag-view/xml-tag-view.component.mjs +1 -3
- package/esm2022/lib/extensions/BodyTagsExtensions.mjs +17 -9
- package/esm2022/lib/extensions/ImageMethods.mjs +2 -2
- package/esm2022/lib/models/models.mjs +1 -1
- package/esm2022/lib/options/index.mjs +1 -1
- package/fesm2022/croco-html.mjs +98 -84
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/editor/visual-editor/visual-editor.component.d.ts +4 -2
- package/lib/extensions/ImageMethods.d.ts +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/models/models.d.ts +1 -0
- package/lib/options/index.d.ts +10 -0
- package/package.json +1 -1
|
@@ -47,15 +47,16 @@ export declare class VisualEditorComponent implements OnInit, AfterViewInit {
|
|
|
47
47
|
rendered: EventEmitter<boolean>;
|
|
48
48
|
bodyTags: HtmlBodyTag[];
|
|
49
49
|
saveBodyTags: HtmlBodyTag[];
|
|
50
|
+
useCustomWidgetsButton: boolean;
|
|
50
51
|
constructor(_cdref: ChangeDetectorRef, _options: CrocoHtmlOptions);
|
|
51
52
|
ngAfterViewInit(): void;
|
|
52
53
|
ngAfterContentChecked(): void;
|
|
53
|
-
|
|
54
|
+
addTagClickHandler(): void;
|
|
54
55
|
startAddingText(tag?: string): void;
|
|
55
56
|
resetTextStyle(): void;
|
|
56
57
|
addTextTags(): void;
|
|
57
58
|
postFilesStartedEventHandler(model: FilePostingStarted): void;
|
|
58
|
-
|
|
59
|
+
addTag(tag: HtmlBodyTag): void;
|
|
59
60
|
filesTagsReadyHandler(tags: HtmlBodyTag[]): void;
|
|
60
61
|
drop(event: CdkDragDrop<object[]>): void;
|
|
61
62
|
onTagSavedHandler(tag: HtmlBodyTag): void;
|
|
@@ -63,6 +64,7 @@ export declare class VisualEditorComponent implements OnInit, AfterViewInit {
|
|
|
63
64
|
recalculateHtml(): void;
|
|
64
65
|
recalculateBodyTags(): void;
|
|
65
66
|
selectTag(data: TagItem): void;
|
|
67
|
+
customWidgetsClickHandler(): void;
|
|
66
68
|
ngOnInit(): void;
|
|
67
69
|
setTagButton(type: string): SpriteIdsType;
|
|
68
70
|
setAlignButton(type: string): SpriteIdsType;
|
|
@@ -17,7 +17,7 @@ export declare class ImageMethods {
|
|
|
17
17
|
static ExtractImage(elem: HTMLElement, options: CrocoHtmlOptions): FileImageTag;
|
|
18
18
|
static mediaRequestStringToArrayParser: (data: string) => IMediaRequest[];
|
|
19
19
|
static createMediaRequestValue(arr: string[], attribute: string): number | null;
|
|
20
|
-
static
|
|
20
|
+
static mediaRequestsArrayToString(data: IMediaRequest[]): string;
|
|
21
21
|
static mediaRequestToString(data: IMediaRequest): string;
|
|
22
22
|
static getImageRestrictionsByScreenSize(screenSize: number, requests: IMediaRequest[]): ImageRestrictions;
|
|
23
23
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPip
|
|
|
18
18
|
import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
|
|
19
19
|
import { HtmlRawViewComponent } from "./components";
|
|
20
20
|
import { XmlTagCustomWidgetComponent } from "./components";
|
|
21
|
-
export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof
|
|
22
|
-
export declare const XmlComponents: (typeof
|
|
23
|
-
export declare const CrocoPipes: (typeof
|
|
24
|
-
export declare const CrocoHtmlDeclarations: (typeof
|
|
21
|
+
export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
|
|
22
|
+
export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent)[];
|
|
23
|
+
export declare const CrocoPipes: (typeof RichTextToHtmlPipe | typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
24
|
+
export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
25
25
|
export declare const MaterialModules: (typeof MatFormFieldModule)[];
|
package/lib/models/models.d.ts
CHANGED
package/lib/options/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Type } from "@angular/core";
|
|
2
2
|
import { IMediaRequest } from "../models";
|
|
3
|
+
import { VisualEditorComponent } from "../components";
|
|
3
4
|
export interface CrocoHtmlOptions {
|
|
4
5
|
/**
|
|
5
6
|
* Формат сслыки для показа изображений из публичных файлов.
|
|
@@ -16,6 +17,15 @@ export interface CrocoHtmlOptions {
|
|
|
16
17
|
* Компонент для рендера кастомных виджетов
|
|
17
18
|
*/
|
|
18
19
|
customWidgetRendererComponent?: Type<any>;
|
|
20
|
+
/**
|
|
21
|
+
* Использовать кнопку для отрисовки кастомных виджетов
|
|
22
|
+
*/
|
|
23
|
+
useCustomWidgetsButton: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Обработчик нажатия на кнопку кастомных виджетов
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
customWidgetClickHandler: (editor: VisualEditorComponent) => void;
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
31
|
* Опции для работы с файлами в редакторе разметки
|