erl-mathtextx-editor 0.2.0 → 0.2.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.
@@ -11,6 +11,9 @@ export interface ImageEditData {
11
11
  alt: string;
12
12
  title: string;
13
13
  maintainAspectRatio: boolean;
14
+ /** Original (natural) image dimensions for aspect-ratio calculation */
15
+ naturalWidth?: number;
16
+ naturalHeight?: number;
14
17
  }
15
18
  /**
16
19
  * ImageEditDialog - Dialog untuk edit properties gambar
@@ -0,0 +1,7 @@
1
+ export declare function useDraggable(isOpen: boolean): {
2
+ position: {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ handleMouseDown: (e: React.MouseEvent) => void;
7
+ };
@@ -6,6 +6,14 @@ import { Editor } from '@tiptap/react';
6
6
  /**
7
7
  * Get editor content as HTML string.
8
8
  * Output is compatible with CKEditor HTML format.
9
+ *
10
+ * KaTeX/LaTeX sync note:
11
+ * - MathLive <math-field> elements are interactive and cannot be stored raw.
12
+ * - We strip them and emit a lightweight <span> that carries:
13
+ * • class="mtx-math-inline" or "mtx-math-block" (used by ContentViewer)
14
+ * • data-latex="…" (the LaTeX source)
15
+ * • data-display="inline"|"block" (rendering mode)
16
+ * - ContentViewer reads these attributes and renders them with KaTeX.
9
17
  */
10
18
  export declare function getHTML(editor: Editor): string;
11
19
  /**
@@ -1,4 +1,4 @@
1
- import { C as t, I as s, b as o, L as l, M as i, d as r, e as T, f as g, h as n, i as m, S as p, T as M, j as C, k as b, l as d, W as h, m as y, n as D, o as L, p as c, q as x, r as u, s as E, t as I, v as P, w as S, x as f, y as k } from "./index-D0Rzm7Tg.js";
1
+ import { C as t, I as s, b as o, L as l, M as i, d as r, e as T, f as g, h as n, i as m, S as p, T as M, j as C, k as b, l as d, W as h, m as y, n as D, o as L, p as c, q as x, r as u, s as E, t as I, v as P, w as S, x as f, y as k } from "./index-CkhZlaGj.js";
2
2
  import { C as H } from "./ContentViewer-RijJ5nlJ.js";
3
3
  export {
4
4
  t as CellPropertiesDialog,