@opositatest/markdown-text-editor 1.0.6 → 1.1.1

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/README.md CHANGED
@@ -175,6 +175,58 @@ const ref = useRef<TMarkdownTextEditorHandle>(null)
175
175
 
176
176
  ---
177
177
 
178
+ ## Styling
179
+
180
+ The component does **not** use Shadow DOM, so all its elements are part of the regular DOM and can be targeted freely from the host page's CSS.
181
+
182
+ ### CSS custom properties
183
+
184
+ These properties are defined on the `markdown-text-editor` element and can be overridden at any level:
185
+
186
+ | Property | Default | Description |
187
+ | ----------------- | -------------------------- | ---------------------------------- |
188
+ | `--border-color` | `rgba(15, 23, 42, 0.09)` | Border of the editor field |
189
+ | `--heading-color` | `#0f172a` | Text color inside the editor |
190
+
191
+ ```css
192
+ /* Override for all instances */
193
+ markdown-text-editor {
194
+ --border-color: #d1d5db;
195
+ --heading-color: #1f2937;
196
+ }
197
+
198
+ /* Override for a specific instance */
199
+ #my-editor {
200
+ --border-color: #6366f1;
201
+ }
202
+ ```
203
+
204
+ ### Targeting component classes
205
+
206
+ Use these stable class names to override layout, size, fonts, or other visual properties:
207
+
208
+ | Selector | Description |
209
+ | ------------------------------------- | ----------------------------------- |
210
+ | `.markdown-text-editor__field` | Editor container (border, radius, background) |
211
+ | `.markdown-text-editor__field .bn-editor` | Inner editing area (padding, min-height, font-size) |
212
+ | `.bn-container .bn-editor` | BlockNote root (font-family, line-height) |
213
+
214
+ ```css
215
+ /* Adjust editor size and typography */
216
+ .markdown-text-editor__field .bn-editor {
217
+ min-height: 400px;
218
+ font-size: 15px;
219
+ line-height: 1.6;
220
+ }
221
+
222
+ /* Remove border radius */
223
+ .markdown-text-editor__field {
224
+ border-radius: 0.25rem;
225
+ }
226
+ ```
227
+
228
+ ---
229
+
178
230
  ## Package exports
179
231
 
180
232
  | Export | Description |