@bygga.dev/editor 1.9.5 → 1.9.8
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 +12 -2
- package/{TextEditor-BWIxouVH.js → TextEditor-qRsQlXjR.js} +336 -336
- package/bygga-editor.js +1922 -1564
- package/element.d.ts +2 -0
- package/package.json +1 -1
- package/{urls-CtHNhbic.js → urls-pzaQIbvA.js} +210 -193
package/README.md
CHANGED
|
@@ -281,8 +281,10 @@ Each style can also set the block's box — `margin` and `padding` (a number or
|
|
|
281
281
|
`{ top, right, bottom, left }`), `borderRadius` (a number, or
|
|
282
282
|
`{ topLeft, topRight, bottomRight, bottomLeft }`), and `border`
|
|
283
283
|
(`{ width, color?, style? }`, `style` one of `solid`, `dashed`, `dotted`) — plus
|
|
284
|
-
`underline` for header and text,
|
|
285
|
-
`20`, `24` or `32` px) for text
|
|
284
|
+
`underline` for header and text, `paragraphSpacing` (`0`, `4`, `8`, `12`, `16`,
|
|
285
|
+
`20`, `24` or `32` px) for text, and `minWidth` (whole px) for a button: the narrowest
|
|
286
|
+
it is drawn, which a longer label still widens. Classic Outlook for Windows ignores a
|
|
287
|
+
minimum width and draws the button at its label's width.
|
|
286
288
|
|
|
287
289
|
A style is a **starting value, written into the block when it is placed** — exactly as
|
|
288
290
|
if the author had chosen each setting by hand. Revising your Brand changes the blocks
|
|
@@ -293,6 +295,14 @@ and the face, size, colour and weight are applied to what the author types into
|
|
|
293
295
|
empty paragraph (a mark needs text to sit on). The author can change any of it
|
|
294
296
|
afterwards, as with any block.
|
|
295
297
|
|
|
298
|
+
**Taking a style from a block.** Style a Header, Text or Button block by hand, then open
|
|
299
|
+
its settings as an admin (`permission="admin"`): a **JSON** link in the panel's head shows
|
|
300
|
+
that block's look as the `brand.styles` entry that would place it — `{ "button": { … } }`
|
|
301
|
+
— with a Copy button. Paste it into your theme's `styles` and new blocks of that kind start
|
|
302
|
+
that way. It is always the documented style shape above, never the block's stored data;
|
|
303
|
+
box settings are written out in full, zeros included, so a block type's own defaults can't
|
|
304
|
+
creep back in. Content creators don't see the link.
|
|
305
|
+
|
|
296
306
|
A hidden tile only narrows the menu: a hidden block type already in a document still
|
|
297
307
|
renders and edits. An entry naming neither a built-in type nor a registered plugin is
|
|
298
308
|
warned about, as is any style field the editor can't use — that field is dropped and
|