@flogeez/angular-tiptap-editor 2.0.2 → 2.0.3

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/index.d.ts CHANGED
@@ -158,6 +158,8 @@ interface TiptapTranslations {
158
158
  linkPrompt: string;
159
159
  linkUrlPrompt: string;
160
160
  confirmDelete: string;
161
+ toggleEdit: string;
162
+ viewMode: string;
161
163
  };
162
164
  common: {
163
165
  cancel: string;
@@ -330,6 +332,8 @@ declare class TiptapI18nService {
330
332
  linkPrompt: string;
331
333
  linkUrlPrompt: string;
332
334
  confirmDelete: string;
335
+ toggleEdit: string;
336
+ viewMode: string;
333
337
  }>;
334
338
  readonly common: _angular_core.Signal<{
335
339
  cancel: string;
@@ -879,6 +883,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
879
883
  autofocus: _angular_core.InputSignal<number | boolean | "start" | "end" | "all">;
880
884
  seamless: _angular_core.InputSignal<boolean>;
881
885
  floatingToolbar: _angular_core.InputSignal<boolean>;
886
+ showEditToggle: _angular_core.InputSignal<boolean>;
882
887
  tiptapExtensions: _angular_core.InputSignal<(Node<any, any> | Mark<any, any> | Extension<any, any>)[]>;
883
888
  tiptapOptions: _angular_core.InputSignal<Partial<EditorOptions>>;
884
889
  showBubbleMenu: _angular_core.InputSignal<boolean>;
@@ -929,6 +934,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
929
934
  editor: Editor;
930
935
  event: FocusEvent;
931
936
  }>;
937
+ editableChange: _angular_core.OutputEmitterRef<boolean>;
932
938
  editorElement: _angular_core.Signal<ElementRef<any>>;
933
939
  hideBubbleMenus(): void;
934
940
  showBubbleMenus(): void;
@@ -974,6 +980,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
974
980
  ngAfterViewInit(): void;
975
981
  ngOnDestroy(): void;
976
982
  private initEditor;
983
+ toggleEditMode(event: Event): void;
977
984
  private updateCharacterCount;
978
985
  onDragOver(event: DragEvent): void;
979
986
  onDrop(event: DragEvent): void;
@@ -989,7 +996,7 @@ declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
989
996
  private setupFormControlSubscription;
990
997
  onEditorClick(event: MouseEvent): void;
991
998
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularTiptapEditorComponent, never>;
992
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AngularTiptapEditorComponent, "angular-tiptap-editor", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fillContainer": { "alias": "fillContainer"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; "isSignal": true; }; "showWordCount": { "alias": "showWordCount"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "enableOfficePaste": { "alias": "enableOfficePaste"; "required": false; "isSignal": true; }; "enableSlashCommands": { "alias": "enableSlashCommands"; "required": false; "isSignal": true; }; "slashCommands": { "alias": "slashCommands"; "required": false; "isSignal": true; }; "customSlashCommands": { "alias": "customSlashCommands"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "seamless": { "alias": "seamless"; "required": false; "isSignal": true; }; "floatingToolbar": { "alias": "floatingToolbar"; "required": false; "isSignal": true; }; "tiptapExtensions": { "alias": "tiptapExtensions"; "required": false; "isSignal": true; }; "tiptapOptions": { "alias": "tiptapOptions"; "required": false; "isSignal": true; }; "showBubbleMenu": { "alias": "showBubbleMenu"; "required": false; "isSignal": true; }; "bubbleMenu": { "alias": "bubbleMenu"; "required": false; "isSignal": true; }; "showImageBubbleMenu": { "alias": "showImageBubbleMenu"; "required": false; "isSignal": true; }; "imageBubbleMenu": { "alias": "imageBubbleMenu"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "showTableBubbleMenu": { "alias": "showTableBubbleMenu"; "required": false; "isSignal": true; }; "tableBubbleMenu": { "alias": "tableBubbleMenu"; "required": false; "isSignal": true; }; "showCellBubbleMenu": { "alias": "showCellBubbleMenu"; "required": false; "isSignal": true; }; "cellBubbleMenu": { "alias": "cellBubbleMenu"; "required": false; "isSignal": true; }; "stateCalculators": { "alias": "stateCalculators"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "imageUploadHandler": { "alias": "imageUploadHandler"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; }, never, never, true, [{ directive: typeof NoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
999
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AngularTiptapEditorComponent, "angular-tiptap-editor", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fillContainer": { "alias": "fillContainer"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; "isSignal": true; }; "showWordCount": { "alias": "showWordCount"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "enableOfficePaste": { "alias": "enableOfficePaste"; "required": false; "isSignal": true; }; "enableSlashCommands": { "alias": "enableSlashCommands"; "required": false; "isSignal": true; }; "slashCommands": { "alias": "slashCommands"; "required": false; "isSignal": true; }; "customSlashCommands": { "alias": "customSlashCommands"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "seamless": { "alias": "seamless"; "required": false; "isSignal": true; }; "floatingToolbar": { "alias": "floatingToolbar"; "required": false; "isSignal": true; }; "showEditToggle": { "alias": "showEditToggle"; "required": false; "isSignal": true; }; "tiptapExtensions": { "alias": "tiptapExtensions"; "required": false; "isSignal": true; }; "tiptapOptions": { "alias": "tiptapOptions"; "required": false; "isSignal": true; }; "showBubbleMenu": { "alias": "showBubbleMenu"; "required": false; "isSignal": true; }; "bubbleMenu": { "alias": "bubbleMenu"; "required": false; "isSignal": true; }; "showImageBubbleMenu": { "alias": "showImageBubbleMenu"; "required": false; "isSignal": true; }; "imageBubbleMenu": { "alias": "imageBubbleMenu"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "showTableBubbleMenu": { "alias": "showTableBubbleMenu"; "required": false; "isSignal": true; }; "tableBubbleMenu": { "alias": "tableBubbleMenu"; "required": false; "isSignal": true; }; "showCellBubbleMenu": { "alias": "showCellBubbleMenu"; "required": false; "isSignal": true; }; "cellBubbleMenu": { "alias": "cellBubbleMenu"; "required": false; "isSignal": true; }; "stateCalculators": { "alias": "stateCalculators"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "imageUploadHandler": { "alias": "imageUploadHandler"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; "editableChange": "editableChange"; }, never, never, true, [{ directive: typeof NoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
993
1000
  }
994
1001
 
995
1002
  interface ColorPickerSelection {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flogeez/angular-tiptap-editor",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "A modern, customizable rich-text editor for Angular (18+), built with Tiptap and featuring complete internationalization support",
5
5
  "keywords": [
6
6
  "angular",
@@ -1,52 +1,52 @@
1
- /* Styles globaux pour les menus contextuels Tiptap */
2
- .tippy-box {
3
- /* Par défaut Tippy limite à 350px */
4
- max-width: none !important;
5
- background: transparent !important;
6
- box-shadow: none !important;
7
- }
8
-
9
- .tippy-content {
10
- /* Le container interne ne doit pas rajouter de padding, on gère dans .bubble-menu */
11
- padding: 0;
12
- }
13
-
14
- .tippy-box .bubble-menu {
15
- display: flex !important;
16
- align-items: center;
17
- gap: 6px;
18
- background: var(--ate-menu-bg, rgb(255, 255, 255)) !important;
19
- border: 1px solid var(--ate-menu-border, rgba(0, 0, 0, 0.1));
20
- border-radius: var(--ate-menu-border-radius, 16px);
21
- padding: var(--ate-menu-padding, 6px);
22
- box-shadow: var(--ate-menu-shadow, 0 8px 32px rgba(0, 0, 0, 0.12));
23
- z-index: 1000;
24
- animation: slideUp 0.18s cubic-bezier(0, 0, 0.2, 1);
25
- white-space: nowrap;
26
- }
27
-
28
- /* Cache le menu intelligemment si la source (le slash) est scrollée hors vue */
29
- .tippy-box[data-reference-hidden] {
30
- opacity: 0 !important;
31
- transition: opacity 0.18s cubic-bezier(0, 0, 0.2, 1);
32
- pointer-events: none !important;
33
- }
34
-
35
- .bubble-menu .tiptap-separator {
36
- width: 1px;
37
- height: 28px;
38
- background: color-mix(in srgb, var(--ate-menu-border), transparent 50%);
39
- margin: 0 4px;
40
- }
41
-
42
- @keyframes slideUp {
43
- from {
44
- opacity: 0;
45
- transform: translateY(6px) scale(0.98);
46
- }
47
- to {
48
- opacity: 1;
49
- transform: translateY(0) scale(1);
50
- }
51
- }
52
-
1
+ /* Styles globaux pour les menus contextuels Tiptap */
2
+ .tippy-box {
3
+ /* Par défaut Tippy limite à 350px */
4
+ max-width: none !important;
5
+ background: transparent !important;
6
+ box-shadow: none !important;
7
+ }
8
+
9
+ .tippy-content {
10
+ /* Le container interne ne doit pas rajouter de padding, on gère dans .bubble-menu */
11
+ padding: 0;
12
+ }
13
+
14
+ .tippy-box .bubble-menu {
15
+ display: flex !important;
16
+ align-items: center;
17
+ gap: 6px;
18
+ background: var(--ate-menu-bg, rgb(255, 255, 255)) !important;
19
+ border: 1px solid var(--ate-menu-border, rgba(0, 0, 0, 0.1));
20
+ border-radius: var(--ate-menu-border-radius, 12px);
21
+ padding: var(--ate-menu-padding, 6px);
22
+ box-shadow: var(--ate-menu-shadow, 0 8px 32px rgba(0, 0, 0, 0.12));
23
+ z-index: 1000;
24
+ animation: slideUp 0.18s cubic-bezier(0, 0, 0.2, 1);
25
+ white-space: nowrap;
26
+ }
27
+
28
+ /* Cache le menu intelligemment si la source (le slash) est scrollée hors vue */
29
+ .tippy-box[data-reference-hidden] {
30
+ opacity: 0 !important;
31
+ transition: opacity 0.18s cubic-bezier(0, 0, 0.2, 1);
32
+ pointer-events: none !important;
33
+ }
34
+
35
+ .bubble-menu .tiptap-separator {
36
+ width: 1px;
37
+ height: 28px;
38
+ background: color-mix(in srgb, var(--ate-menu-border), transparent 50%);
39
+ margin: 0 4px;
40
+ }
41
+
42
+ @keyframes slideUp {
43
+ from {
44
+ opacity: 0;
45
+ transform: translateY(6px) scale(0.98);
46
+ }
47
+ to {
48
+ opacity: 1;
49
+ transform: translateY(0) scale(1);
50
+ }
51
+ }
52
+
@@ -1,40 +1,40 @@
1
- @import "./bubble-menu.global.css";
2
- @import "./material-symbols.css";
3
-
4
- /* Styles pour les liens */
5
- .tiptap-link {
6
- color: var(--ate-primary, #1d4ed8);
7
- text-decoration: underline;
8
- cursor: pointer;
9
- transition: color 0.2s ease;
10
- }
11
-
12
- .tiptap-link:hover {
13
- color: var(--ate-primary-light-alpha, #1d4ed8);
14
- text-decoration: underline;
15
- }
16
-
17
- /* Styles pour la surbrillance */
18
- .tiptap-highlight {
19
- background-color: var(--ate-highlight-bg, #fef08a);
20
- padding: 0.1em 0.2em;
21
- border-radius: 2px;
22
- color: var(--ate-highlight-color, #854d0e);
23
- }
24
-
25
- /* Styles pour les alignements de texte - Tiptap utilise des classes */
26
- .ProseMirror .has-text-align-left {
27
- text-align: left;
28
- }
29
-
30
- .ProseMirror .has-text-align-center {
31
- text-align: center;
32
- }
33
-
34
- .ProseMirror .has-text-align-right {
35
- text-align: right;
36
- }
37
-
38
- .ProseMirror .has-text-align-justify {
39
- text-align: justify;
40
- }
1
+ @import "./bubble-menu.global.css";
2
+ @import "./material-symbols.css";
3
+
4
+ /* Styles pour les liens */
5
+ .tiptap-link {
6
+ color: var(--ate-primary, #1d4ed8);
7
+ text-decoration: underline;
8
+ cursor: pointer;
9
+ transition: color 0.2s ease;
10
+ }
11
+
12
+ .tiptap-link:hover {
13
+ color: var(--ate-primary-light-alpha, #1d4ed8);
14
+ text-decoration: underline;
15
+ }
16
+
17
+ /* Styles pour la surbrillance */
18
+ .tiptap-highlight {
19
+ background-color: var(--ate-highlight-bg, #fef08a);
20
+ padding: 0.1em 0.2em;
21
+ border-radius: 2px;
22
+ color: var(--ate-highlight-color, #854d0e);
23
+ }
24
+
25
+ /* Styles pour les alignements de texte - Tiptap utilise des classes */
26
+ .ProseMirror .has-text-align-left {
27
+ text-align: left;
28
+ }
29
+
30
+ .ProseMirror .has-text-align-center {
31
+ text-align: center;
32
+ }
33
+
34
+ .ProseMirror .has-text-align-right {
35
+ text-align: right;
36
+ }
37
+
38
+ .ProseMirror .has-text-align-justify {
39
+ text-align: justify;
40
+ }
@@ -1,17 +1,17 @@
1
- .material-symbols-outlined {
2
- font-family: "Material Symbols Outlined";
3
- font-weight: normal;
4
- font-style: normal;
5
- font-size: 24px;
6
- line-height: 1;
7
- letter-spacing: normal;
8
- text-transform: none;
9
- display: inline-block;
10
- white-space: nowrap;
11
- word-wrap: normal;
12
- direction: ltr;
13
- font-feature-settings: "liga";
14
- -webkit-font-feature-settings: "liga";
15
- -webkit-font-smoothing: antialiased;
16
- font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
17
- }
1
+ .material-symbols-outlined {
2
+ font-family: "Material Symbols Outlined";
3
+ font-weight: normal;
4
+ font-style: normal;
5
+ font-size: 24px;
6
+ line-height: 1;
7
+ letter-spacing: normal;
8
+ text-transform: none;
9
+ display: inline-block;
10
+ white-space: nowrap;
11
+ word-wrap: normal;
12
+ direction: ltr;
13
+ font-feature-settings: "liga";
14
+ -webkit-font-feature-settings: "liga";
15
+ -webkit-font-smoothing: antialiased;
16
+ font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
17
+ }