feat: editor heading levels, outline, link rel, generic-anchor warning and image naming
- the blogeditor and mlblogeditor types serve headingLevels and genericAnchors through RequestOptions, per schema request - J1: H2 to H4 with a pasted or loaded H1 parsed as H2 while the H1 setting is on, H1 to H4 while it is off; H5 and H6 still parse - J2: the outline bar and panel (skipped, empty, link-only, H1 in Source, generic link texts), 300 ms after a change, collapsed, read-only - J3: nofollow/sponsored/ugc checkboxes for absolute http(s) links only, and a non-blocking warning for a generic link text - J4: one form per picked file with the slugged file name, alt required unless decorative (alt=""); Insert uploads the renamed file and the image is inserted on the upload result - assets/dist rebuilt
This commit is contained in:
@@ -418,3 +418,179 @@ golem15-journal-blogeditor .ProseMirror-selectednode.blogeditor__embed,
|
||||
golem15-journal-blogeditor .ProseMirror img.ProseMirror-selectednode {
|
||||
outline: 2px solid var(--c-ring);
|
||||
}
|
||||
|
||||
/*
|
||||
* J2 outline (Phase 33, UI-SPEC C28): a full-width bar between the panes
|
||||
* and the status line, and the panel it opens. Metrics copy the editor's
|
||||
* own: 6x8px bar padding, 8px form padding, 12px per heading level.
|
||||
*/
|
||||
golem15-journal-blogeditor .blogeditor__outline {
|
||||
border-top: 1px solid var(--c-border);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-toggle {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 4px 8px;
|
||||
width: 100%;
|
||||
padding: 6px 8px;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: var(--c-subtle);
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-toggle:hover {
|
||||
background: var(--c-hover);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-problems,
|
||||
golem15-journal-blogeditor .blogeditor__outline-flag,
|
||||
golem15-journal-blogeditor .blogeditor__warning {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__alert {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-panel {
|
||||
padding: 8px;
|
||||
border-top: 1px solid var(--c-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-item {
|
||||
padding-inline-start: calc(var(--blogeditor-outline-depth, 0) * 12px);
|
||||
}
|
||||
|
||||
/* A long heading wraps under its text, the level tag hanging beside it. */
|
||||
golem15-journal-blogeditor .blogeditor__outline-target {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
align-items: start;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-level {
|
||||
padding: 0 4px;
|
||||
border-radius: 4px;
|
||||
background: var(--c-subtle);
|
||||
font-family: "DM Mono", ui-monospace, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-text--empty,
|
||||
golem15-journal-blogeditor .blogeditor__outline-flag,
|
||||
golem15-journal-blogeditor .blogeditor__outline-empty,
|
||||
golem15-journal-blogeditor .blogeditor__outline-heading {
|
||||
color: var(--c-muted);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-flags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 2px 8px;
|
||||
padding: 0 8px 4px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-empty,
|
||||
golem15-journal-blogeditor .blogeditor__outline-heading {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__outline-heading {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* J3 link form: the rel checkboxes, their hint and the generic-text warning. */
|
||||
golem15-journal-blogeditor .blogeditor__rel {
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px 8px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__rel legend {
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
color: var(--c-muted);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__form label.blogeditor__check {
|
||||
flex: 0 0 auto;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
color: var(--c-text);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__form input[type="checkbox"] {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__form input:disabled {
|
||||
background: var(--c-subtle);
|
||||
color: var(--c-muted);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__hint {
|
||||
flex-basis: 100%;
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: var(--c-muted);
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__warning {
|
||||
flex-basis: 100%;
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
color: var(--c-text);
|
||||
}
|
||||
|
||||
/* J4 image form: the file name with its fixed extension. */
|
||||
golem15-journal-blogeditor .blogeditor__filename-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
golem15-journal-blogeditor .blogeditor__ext {
|
||||
font-size: 13px;
|
||||
color: var(--c-muted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user