Commit d3fdad9
authored
feat: register heading tags as server-side block elements (#173)
ep_headings2 already registers h1-h4 + code as block elements in
the editor (aceRegisterBlockElements). It did NOT register them
on the server-side content collector (ccRegisterBlockElements),
so any HTML import path treated those tags as inline -- and
adjacent <h1>/<h2>/<code> blocks merged into a single pad line.
Fix: re-export the new ccRegisterBlockElements function from
ep_plugin_helpers' lineAttribute factory (added in
ether/ep_plugin_helpers#14) and wire it up via ep.json. This
treats h1-h4 + code as block elements on the import side too,
matching their editor behavior.
Bumps the ep_plugin_helpers minimum to ^0.5.2 (the version with
the new export).
Test added covers the regression: a pad with adjacent <h1> and
<h2> (no separator) survives a setHTML/getHTML round-trip with
each heading on its own line and no merged 'AlphaBeta' content.
Refs ether/etherpad#7568 -- this is the missing piece for the
DOCX/HTML round-trip story landing in core.1 parent c2f470e commit d3fdad9
4 files changed
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
124 | 155 | | |
0 commit comments