@firestitch/html-editor 9.5.9 → 12.0.2

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.
Files changed (62) hide show
  1. package/app/components/html-editor/html-editor.component.d.ts +9 -5
  2. package/app/components/html-renderer/html-renderer.component.d.ts +4 -1
  3. package/app/enums/default-plugin.enum.d.ts +3 -2
  4. package/app/fs-html-editor.module.d.ts +20 -3
  5. package/app/interfaces/html-editor-config.d.ts +12 -3
  6. package/app/services/froala-loader.service.d.ts +8 -5
  7. package/bundles/firestitch-html-editor.umd.js +421 -268
  8. package/bundles/firestitch-html-editor.umd.js.map +1 -1
  9. package/esm2015/app/classes/plugin.js +1 -1
  10. package/esm2015/app/components/html-editor/html-editor.component.js +106 -62
  11. package/esm2015/app/components/html-renderer/html-renderer.component.js +20 -25
  12. package/esm2015/app/consts/paragraph-buttons.const.js +1 -1
  13. package/esm2015/app/consts/rich-buttons.const.js +1 -1
  14. package/esm2015/app/consts/text-buttons.const.js +1 -1
  15. package/esm2015/app/enums/default-plugin.enum.js +2 -1
  16. package/esm2015/app/fs-html-editor.module.js +30 -22
  17. package/esm2015/app/injects/config.inject.js +1 -1
  18. package/esm2015/app/interfaces/html-editor-config.js +2 -1
  19. package/esm2015/app/interfaces/plugin-button.js +2 -1
  20. package/esm2015/app/interfaces/plugin-config.js +2 -1
  21. package/esm2015/app/plugins/checklist.plugin.js +1 -1
  22. package/esm2015/app/plugins/code.plugin.js +1 -1
  23. package/esm2015/app/plugins/configs/mention-plugin.config.js +2 -1
  24. package/esm2015/app/plugins/configs/screen-record-plugin.config.js +2 -1
  25. package/esm2015/app/plugins/mention.plugin.js +1 -1
  26. package/esm2015/app/plugins/screen-record.plugin.js +1 -1
  27. package/esm2015/app/services/froala-loader.service.js +23 -24
  28. package/esm2015/app/utils/loader.js +2 -1
  29. package/esm2015/firestitch-html-editor.js +1 -5
  30. package/esm2015/public_api.js +1 -1
  31. package/fesm2015/firestitch-html-editor.js +182 -131
  32. package/fesm2015/firestitch-html-editor.js.map +1 -1
  33. package/firestitch-html-editor.d.ts +1 -5
  34. package/package.json +4 -7
  35. package/styles.scss +3 -2
  36. package/bundles/firestitch-html-editor.umd.min.js +0 -17
  37. package/bundles/firestitch-html-editor.umd.min.js.map +0 -1
  38. package/esm5/app/classes/plugin.js +0 -9
  39. package/esm5/app/components/html-editor/html-editor.component.js +0 -471
  40. package/esm5/app/components/html-renderer/html-renderer.component.js +0 -39
  41. package/esm5/app/consts/paragraph-buttons.const.js +0 -9
  42. package/esm5/app/consts/rich-buttons.const.js +0 -7
  43. package/esm5/app/consts/text-buttons.const.js +0 -19
  44. package/esm5/app/enums/default-plugin.enum.js +0 -1
  45. package/esm5/app/fs-html-editor.module.js +0 -62
  46. package/esm5/app/injects/config.inject.js +0 -4
  47. package/esm5/app/interfaces/html-editor-config.js +0 -1
  48. package/esm5/app/interfaces/plugin-button.js +0 -1
  49. package/esm5/app/interfaces/plugin-config.js +0 -1
  50. package/esm5/app/plugins/checklist.plugin.js +0 -41
  51. package/esm5/app/plugins/code.plugin.js +0 -70
  52. package/esm5/app/plugins/configs/mention-plugin.config.js +0 -1
  53. package/esm5/app/plugins/configs/screen-record-plugin.config.js +0 -1
  54. package/esm5/app/plugins/mention.plugin.js +0 -93
  55. package/esm5/app/plugins/screen-record.plugin.js +0 -106
  56. package/esm5/app/services/froala-loader.service.js +0 -96
  57. package/esm5/app/utils/loader.js +0 -83
  58. package/esm5/firestitch-html-editor.js +0 -9
  59. package/esm5/public_api.js +0 -12
  60. package/fesm5/firestitch-html-editor.js +0 -1074
  61. package/fesm5/firestitch-html-editor.js.map +0 -1
  62. package/firestitch-html-editor.metadata.json +0 -1
@@ -3,6 +3,7 @@ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } fr
3
3
  import { Observable } from 'rxjs';
4
4
  import { FsHtmlEditorConfig } from '../../interfaces/html-editor-config';
5
5
  import { FsFroalaLoaderService } from '../../services/froala-loader.service';
6
+ import * as i0 from "@angular/core";
6
7
  export declare class FsHtmlEditorComponent implements OnInit, AfterViewInit, ControlValueAccessor, Validator, OnDestroy {
7
8
  private _defaultConfig;
8
9
  private _cdRef;
@@ -20,16 +21,15 @@ export declare class FsHtmlEditorComponent implements OnInit, AfterViewInit, Con
20
21
  constructor(_defaultConfig: any, _cdRef: ChangeDetectorRef, _fr: FsFroalaLoaderService);
21
22
  onChange: (data: any) => void;
22
23
  onTouched: () => void;
23
- readonly el: any;
24
- readonly html: string;
25
- readonly editor: any;
26
- readonly froalaLoaded$: Observable<boolean>;
24
+ get el(): any;
25
+ get html(): string;
26
+ get editor(): any;
27
+ get froalaLoaded$(): Observable<boolean>;
27
28
  ngOnInit(): void;
28
29
  ngAfterViewInit(): void;
29
30
  hasContent(): boolean;
30
31
  initialize(options?: any): void;
31
32
  private _processImageUpload;
32
- private _getTextNode;
33
33
  uninitializedClick(event: UIEvent): void;
34
34
  updateSize(): void;
35
35
  validate(control: AbstractControl): ValidationErrors | null;
@@ -46,9 +46,13 @@ export declare class FsHtmlEditorComponent implements OnInit, AfterViewInit, Con
46
46
  destroy(): void;
47
47
  private _createConfig;
48
48
  private _change;
49
+ private _initButtons;
49
50
  private _initPlugins;
50
51
  private _createOptions;
51
52
  private _listenLazyInit;
52
53
  private _contentChanged;
53
54
  private _setupFroala;
55
+ private _getTextNode;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsHtmlEditorComponent, [{ optional: true; }, null, null]>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<FsHtmlEditorComponent, "fs-html-editor", never, { "config": "config"; }, {}, never, never>;
54
58
  }
@@ -1,9 +1,12 @@
1
1
  import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
2
2
  import { ChangeDetectorRef } from '@angular/core';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class FsHtmlRendererComponent {
4
5
  private sanitized;
5
6
  private _cdRef;
6
- setHtml: any;
7
+ set setHtml(html: any);
7
8
  trustedHtml: SafeHtml;
8
9
  constructor(sanitized: DomSanitizer, _cdRef: ChangeDetectorRef);
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsHtmlRendererComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<FsHtmlRendererComponent, "fs-html-renderer", never, { "setHtml": "html"; }, {}, never, never>;
9
12
  }
@@ -1,4 +1,4 @@
1
- export declare const enum DefaultPlugin {
1
+ export declare const enum FroalaPlugin {
2
2
  Align = "align",
3
3
  Colors = "colors",
4
4
  Image = "image",
@@ -10,5 +10,6 @@ export declare const enum DefaultPlugin {
10
10
  Video = "video",
11
11
  Quote = "quote",
12
12
  Draggable = "draggable",
13
- FontSize = "font_size"
13
+ FontSize = "font_size",
14
+ QuickInsert = "quick_insert"
14
15
  }
@@ -1,8 +1,16 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
2
  import { FsHtmlEditorConfig } from './interfaces/html-editor-config';
3
- import { DefaultPlugin } from './enums/default-plugin.enum';
3
+ import { FroalaPlugin } from './enums/default-plugin.enum';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "./components/html-editor/html-editor.component";
6
+ import * as i2 from "./components/html-renderer/html-renderer.component";
7
+ import * as i3 from "@angular/common";
8
+ import * as i4 from "@firestitch/skeleton";
4
9
  export declare class FsHtmlEditorModule {
5
10
  static forRoot(config?: FsHtmlEditorConfig): ModuleWithProviders<FsHtmlEditorModule>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsHtmlEditorModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FsHtmlEditorModule, [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent], [typeof i3.CommonModule, typeof i4.FsSkeletonModule], [typeof i1.FsHtmlEditorComponent, typeof i2.FsHtmlRendererComponent]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<FsHtmlEditorModule>;
6
14
  }
7
15
  export declare function FsHtmlEditorConfigFactory(config: FsHtmlEditorConfig): {
8
16
  image?: import("./interfaces/html-editor-config").FsHtmlEditorUploadConfig;
@@ -14,12 +22,21 @@ export declare function FsHtmlEditorConfigFactory(config: FsHtmlEditorConfig): {
14
22
  placeholder?: string;
15
23
  maxLength?: number;
16
24
  autofocus?: boolean;
17
- froalaConfig?: any;
18
25
  disabled?: boolean;
19
26
  activationKey?: any;
20
27
  tooltip?: string;
21
28
  plugins?: import("./classes/plugin").Plugin[];
22
- defaultPlugins: DefaultPlugin[];
29
+ froalaPlugins: FroalaPlugin[];
30
+ froalaConfig?: any;
23
31
  assetsJSPath?: string;
24
32
  assetsCSSPath?: string;
33
+ buttons?: {
34
+ name: string;
35
+ svgKey?: string;
36
+ title?: string;
37
+ focus?: boolean;
38
+ undo?: boolean;
39
+ refreshAfterCallback?: boolean;
40
+ click: (editor: any) => void;
41
+ }[];
25
42
  };
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { Plugin } from '../classes/plugin';
3
- import { DefaultPlugin } from '../enums/default-plugin.enum';
3
+ import { FroalaPlugin } from '../enums/default-plugin.enum';
4
4
  export interface FsHtmlEditorConfig {
5
5
  image?: FsHtmlEditorUploadConfig;
6
6
  label?: string;
@@ -11,14 +11,23 @@ export interface FsHtmlEditorConfig {
11
11
  placeholder?: string;
12
12
  maxLength?: number;
13
13
  autofocus?: boolean;
14
- froalaConfig?: any;
15
14
  disabled?: boolean;
16
15
  activationKey?: any;
17
16
  tooltip?: string;
18
17
  plugins?: Plugin[];
19
- defaultPlugins?: DefaultPlugin[];
18
+ froalaPlugins?: FroalaPlugin[];
19
+ froalaConfig?: any;
20
20
  assetsJSPath?: string;
21
21
  assetsCSSPath?: string;
22
+ buttons?: {
23
+ name: string;
24
+ svgKey?: string;
25
+ title?: string;
26
+ focus?: boolean;
27
+ undo?: boolean;
28
+ refreshAfterCallback?: boolean;
29
+ click: (editor: any) => void;
30
+ }[];
22
31
  }
23
32
  export interface FsHtmlEditorUploadConfig {
24
33
  width?: number | undefined;
@@ -1,17 +1,20 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { FsHtmlEditorConfig } from '../interfaces/html-editor-config';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class FsFroalaLoaderService {
4
5
  private _defaultConfig;
5
6
  private _FroalaEditor;
6
7
  private _froalaLoaded;
7
- private _defaultPluginsLoaded;
8
+ private _froalaPluginsLoaded;
8
9
  private _loaded$;
9
10
  constructor(_defaultConfig: FsHtmlEditorConfig);
10
- readonly loaded$: Observable<boolean>;
11
- readonly ready: boolean;
12
- readonly FroalaEditor: any;
11
+ get loaded$(): Observable<boolean>;
12
+ get ready(): boolean;
13
+ get FroalaEditor(): any;
13
14
  private _load;
14
15
  private _loadPlugins;
15
16
  private _froalaDone;
16
- private _defaultPluginsDone;
17
+ private _froalaPluginsDone;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsFroalaLoaderService, [{ optional: true; }]>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<FsFroalaLoaderService>;
17
20
  }