slate-angular 1.7.1 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slate-angular",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "peerDependencies": {
5
5
  "slate": ">= 0.63.0",
6
6
  "slate-history": "^0.62.0",
package/styles/index.scss CHANGED
@@ -1,5 +1,4 @@
1
1
  @import '../components/block-card/block-card.component.scss';
2
-
3
2
  .slate-editable-container {
4
3
  display: block;
5
4
  outline: none;
@@ -8,7 +7,7 @@
8
7
  & [contenteditable="true"] {
9
8
  outline: none;
10
9
  }
11
- & [slate-placeholder] {
10
+ & [data-slate-placeholder] {
12
11
  position: absolute;
13
12
  pointer-events: none;
14
13
  width: 100%;
@@ -17,12 +16,18 @@
17
16
  opacity: 0.333;
18
17
  user-select: none;
19
18
  text-decoration: none;
19
+ top: 0px;
20
+ }
21
+ [data-slate-node='element'] {
22
+ &.element-placeholder {
23
+ position: relative;
24
+ }
20
25
  }
21
26
  }
27
+
22
28
  .slate-spacer {
23
29
  height: 0;
24
30
  color: transparent;
25
31
  outline: none;
26
32
  position: absolute;
27
- }
28
-
33
+ }
package/view/base.d.ts CHANGED
@@ -33,11 +33,14 @@ export declare abstract class BaseComponent<T = SlateTextContext | SlateLeafCont
33
33
  */
34
34
  export declare class BaseLeafComponent extends BaseComponent<SlateLeafContext> implements OnInit {
35
35
  initialized: boolean;
36
+ placeholderElement: HTMLSpanElement;
36
37
  isSlateLeaf: boolean;
37
38
  get text(): Text;
38
39
  get leaf(): Text;
39
40
  ngOnInit(): void;
40
41
  onContextChange(): void;
42
+ renderPlaceholder(): void;
43
+ destroyPlaceholder(): void;
41
44
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseLeafComponent, never>;
42
45
  static ɵdir: i0.ɵɵDirectiveDeclaration<BaseLeafComponent, never, never, {}, {}, never>;
43
46
  }