You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Summary
Adds the ability to use a getHTML method to get the current state of the
editor
This is incredibly important to my team since we're adding heavy usage
of this library into our app and launching the update in about two
weeks. The current performance with onChangeHTML is inadequate for us,
so this change is very important.
## Test Plan
Simplest options is to create an enriched input with a ref, and a button
below it that triggers a function which calls getHTML() and logs it out
to the console. You should see the logged HTML.
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| iOS | ✅ |
| Android | ✅ |
---------
Co-authored-by: Ahmed Haracic <ahmed@Ahmeds-MacBook-Pro.local>
Co-authored-by: Mikołaj Szydłowski <9szydlowski9@gmail.com>
Co-authored-by: Igor Furgala <exploif@icloud.com>
Copy file name to clipboardExpand all lines: docs/API_REFERENCE.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -333,6 +333,14 @@ focus: () => void;
333
333
334
334
Focuses the input.
335
335
336
+
### `.getHTML()`
337
+
338
+
```ts
339
+
getHTML: () =>Promise<string>;
340
+
```
341
+
342
+
Returns a Promise that resolves with the current HTML content of the input. This is useful when you need to get the HTML on-demand (e.g., when saving) without the performance overhead of continuous HTML parsing via `onChangeHtml`.
0 commit comments