croco-html 4.2.3 → 4.2.5
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.
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { HtmlBodyTag } from '../../../models/models';
|
|
3
|
+
import { CrocoHtmlOptions } from '../../../options';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class MainEditorBlockComponent {
|
|
6
|
+
private readonly _options;
|
|
5
7
|
textTags: string[];
|
|
6
8
|
tag: HtmlBodyTag;
|
|
7
9
|
onTagSaved: EventEmitter<HtmlBodyTag>;
|
|
8
10
|
onTagRemoved: EventEmitter<HtmlBodyTag>;
|
|
11
|
+
constructor(_options: CrocoHtmlOptions);
|
|
9
12
|
tagUpdatedHandler(tag: HtmlBodyTag): void;
|
|
10
13
|
save(): void;
|
|
14
|
+
isDefinedCustomTag(): boolean;
|
|
11
15
|
deleteItem(): void;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<MainEditorBlockComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MainEditorBlockComponent, "croco-html-main-editor-block", never, { "tag": { "alias": "tag"; "required":
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MainEditorBlockComponent, "croco-html-main-editor-block", never, { "tag": { "alias": "tag"; "required": true; }; }, { "onTagSaved": "onTagSaved"; "onTagRemoved": "onTagRemoved"; }, never, never, true, never>;
|
|
14
18
|
}
|
|
@@ -3,9 +3,9 @@ import { InterfaceBlock } from "./InterfaceBlock";
|
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
4
|
import { IMarkUpTagService } from "../tag-services/IMarkUpTagService";
|
|
5
5
|
export declare class BodyTagsExtensions {
|
|
6
|
-
static tagServices
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
private static tagServices;
|
|
7
|
+
static hasTagService(tagName: string, options: CrocoHtmlOptions): boolean;
|
|
8
|
+
static getTagService(tagName: string, options: CrocoHtmlOptions): IMarkUpTagService;
|
|
9
9
|
static convertToHtmlString(bodyTag: HtmlBodyTag): string;
|
|
10
10
|
static bodyTagsToHtml(bodyTags: HtmlBodyTag[]): string;
|
|
11
11
|
static getBodyTags(html: string, options: CrocoHtmlOptions): HtmlBodyTag[];
|
package/lib/options/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from "@angular/core";
|
|
2
2
|
import { IImageMediaRequest } from "../models";
|
|
3
3
|
import { VisualEditorComponent } from "../components";
|
|
4
|
+
import { IMarkUpTagService } from "../tag-services";
|
|
4
5
|
export interface CrocoHtmlOptions {
|
|
5
6
|
/**
|
|
6
7
|
* Опции для отображения изображений.
|
|
@@ -21,7 +22,9 @@ export interface CrocoHtmlOptions {
|
|
|
21
22
|
/**
|
|
22
23
|
* Кастомные объявленные теги
|
|
23
24
|
*/
|
|
24
|
-
definedCustomTags:
|
|
25
|
+
definedCustomTags: {
|
|
26
|
+
[id: string]: IMarkUpTagService;
|
|
27
|
+
};
|
|
25
28
|
/**
|
|
26
29
|
* Обработчик нажатия на кнопку кастомных виджетов
|
|
27
30
|
* @returns
|