diff --git a/README.md b/README.md
index 5d4b4b0c..44c65cf5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
# react-native-enriched
@@ -152,9 +152,6 @@ Supported styles:
- ordered list
- unordered list
-> [!NOTE]
-> The iOS doesn't support codeblocks just yet, but it's planned in the near future!
-
Each of the styles can be toggled the same way as in the example from [usage section](#usage); call a proper `toggle` function on the component ref.
Each call toggles the style within the current text selection. We can still divide styles into two categories based on how they treat the selection:
@@ -212,9 +209,6 @@ You can insert an image into the input using [setImage](docs/API_REFERENCE.md#se
The image will be put into a single line in the input and will affect the line's height as well as input's height. Keep in mind, that image will replace currently selected text or insert into the cursor position if there is no text selection.
-> [!NOTE]
-> The iOS doesn't support inline images just yet, but it's planned in the near future!
-
## Style Detection
All of the above styles can be detected with the use of [onChangeState](docs/API_REFERENCE.md#onchangestate) event payload.
diff --git a/docs/API_REFERENCE.md b/docs/API_REFERENCE.md
index 106f7901..8e1f0fee 100644
--- a/docs/API_REFERENCE.md
+++ b/docs/API_REFERENCE.md
@@ -335,16 +335,20 @@ Focuses the input.
### `.setImage()`
-> [!NOTE]
-> This function is Android only as iOS doesn't support inline images just yet.
-
```ts
-setImage: (src: string) => void;
+setImage: (src: string, width: number, height: number) => void;
```
-Sets the [inline image](#inline-images) at the current selection.
+Sets the [inline image](../README.md#inline-images) at the current selection.
-- `src: string` - the absolute path to the image.
+- `src: string` - absolute path to a file or remote image address.
+- `width: number` - width of the image.
+- `height: number` - height of the image.
+
+> [!NOTE]
+> It's developer responsibility to provide proper width and height, which may require calculating aspect ratio.
+> Also, keep in mind that in case of providing incorrect image source, static placeholder will be displayed.
+> We may consider adding automatic image size detection and improved error handling in future releases.
### `.setLink()`
@@ -418,9 +422,6 @@ Toggles bold formatting at the current selection.
### `.toggleCodeBlock()`
-> [!NOTE]
-> This function is Android only as iOS doesn't support codeblocks just yet.
-
```ts
toggleCodeBlock: () => void;
```
@@ -537,10 +538,6 @@ interface HtmlStyle {
textDecorationLine?: 'underline' | 'none';
};
mention?: Record | MentionStyleProperties;
- img?: {
- width?: number;
- height?: number;
- };
ol?: {
gapWidth?: number;
marginLeft?: number;
@@ -601,16 +598,11 @@ If only a single config is given, the style applies to all mention types. You ca
- `backgroundColor` is the mention's background color, takes [color](https://reactnative.dev/docs/colors) value and defaults to `yellow`.
- `textDecorationLine` decides if the mentions are underlined or not, takes either `underline` or `none` and defaults to `underline`.
-### img (inline image)
-
-- `width` is the width of the inline image, defaults to `80`.
-- `height` is the height of the inline image, defaults to `80`.
-
### ol (ordered list)
By marker we mean the number that denotes next lines of the list.
-- `gapWidth` sets the gap between the marker and the list item's text, defaults to `16`.
+- `gapWidth` sets the gap between the marker and the list item's text, defaults to `16`.
- `marginLeft` sets the margin to the left of the marker (between the marker and input's left edge), defaults to `16`.
- `markerFontWeight` defines the font weight of the marker, takes a [fontWeight](https://reactnative.dev/docs/text-style-props#fontweight) value and if not set, defaults to the same font weight as input's [fontWeight prop](#style).
- `markerColor` sets the text color of the marker, takes [color](https://reactnative.dev/docs/colors) value and if not set, defaults to the same color as input's [color prop](#style).