@bladeberg/editor 0.2.4 → 0.2.6

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
@@ -156,6 +156,13 @@ export default function PostEditor({ content }) {
156
156
 
157
157
  Don't forget `import '@bladeberg/editor/style.css'` somewhere in your client bundle.
158
158
 
159
+ ### Styling tips
160
+
161
+ - Import `@bladeberg/editor/style.css` **before** your app's global CSS so host styles don't override Gutenberg.
162
+ - `createEditor()` adds `.bladeberg-container` to your mount element automatically (same as the Blade component).
163
+ - Avoid `overflow: hidden` on the editor wrapper — it clips block inserter popovers.
164
+ - The red accent (`#e11d1f`) is BladeBerg branding — customize via the SCSS variables in the package source if needed.
165
+
159
166
  ---
160
167
 
161
168
  ## Rendering stored content
package/README.npm.md CHANGED
@@ -156,6 +156,13 @@ export default function PostEditor({ content }) {
156
156
 
157
157
  Don't forget `import '@bladeberg/editor/style.css'` somewhere in your client bundle.
158
158
 
159
+ ### Styling tips
160
+
161
+ - Import `@bladeberg/editor/style.css` **before** your app's global CSS so host styles don't override Gutenberg.
162
+ - `createEditor()` adds `.bladeberg-container` to your mount element automatically (same as the Blade component).
163
+ - Avoid `overflow: hidden` on the editor wrapper — it clips block inserter popovers.
164
+ - The red accent (`#e11d1f`) is BladeBerg branding — customize via the SCSS variables in the package source if needed.
165
+
159
166
  ---
160
167
 
161
168
  ## Rendering stored content
@@ -6185,7 +6185,7 @@ function sp(e) {
6185
6185
  const t = typeof e == "string" ? document.querySelector(e) : e;
6186
6186
  if (!t)
6187
6187
  throw new Error("[BladeBerg] createEditor: target element not found.");
6188
- if (t.tagName === "TEXTAREA")
6188
+ if (t.classList.add("bladeberg-container"), t.tagName === "TEXTAREA")
6189
6189
  return t;
6190
6190
  const n = document.createElement("textarea");
6191
6191
  return t.appendChild(n), n;