@itshixun/qckeditor-vue2 1.2.13 → 1.2.14

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
@@ -17,7 +17,7 @@ Vue 2 组件库,用于 CKEditor 5 富文本编辑器。
17
17
  > - `QCKEditorPro` 的 `disableExit` 属性与 `exit-blocked` 事件,用于在编辑器内部异步操作(`PendingActions`)期间控制是否退出编辑模式
18
18
  > - `QCKContent` 的 `enableCodeHidden` / `codeHiddenText` 属性,把 qckeditor-code-block 插件标记为"预览时隐藏"的代码块替换为占位提示
19
19
  > - `QCKContent` 的 `copyCode` / `copySuccessDuration` / `locale` 属性,hover 代码块显示复制按钮,复制成功显示绿色文案,按钮文案支持 i18n
20
- > - `QCKContent` 的 `formatImageTableStyle` 属性,渲染前恢复默认图片结构并清除图片/表格固定尺寸样式
20
+ > - `QCKContent` 的 `formatImageTableStyle` 属性,渲染前恢复块级图片默认结构并清除图片/表格固定尺寸样式(行内图片保持原样)
21
21
 
22
22
  ## 安装
23
23
 
@@ -249,7 +249,9 @@ export default {
249
249
  </template>
250
250
  ```
251
251
 
252
- - **图片**:块级图片、行内图片和裸 `img` 统一恢复为 `<figure class="image">` 默认块级结构,按原始尺寸及 CKEditor 默认响应式规则显示;清除缩放/对齐 class、固定宽高、阴影、边框等自定义外观。保留图片资源、`alt`、直接图片链接、`picture/source` 和 `figcaption`
252
+ - **块级图片**:仅处理位于非表格 `figure` 内的图片,恢复为 `<figure class="image">` 默认块级结构,按原始尺寸及 CKEditor 默认响应式规则显示;清除缩放/对齐 class、固定宽高、阴影、边框等自定义外观。保留图片资源、`alt`、直接图片链接、`picture/source` 和 `figcaption`
253
+ - **独占段落的行内图片**:`<p>` 中仅有一个行内图片(裸 `img` 或 `span.image-inline`,允许 `a`/`picture` 包裹)且无其他内容时,同样转换为 `<figure class="image">` 块级结构并清除自定义外观;`table` 内段落不转换
254
+ - **行内图片**:与其他内容共处一段的行内图片和 `table` 内段落中的图片保持原样,不做任何转换或样式清理
253
255
  - **表格**:裸 `table` 与 `figure.table` 清除表格、列、行和单元格的固定宽高,设置 `width: 100%; max-width: 100%; height: auto`,避免源 HTML 固定宽度在窄容器中造成溢出;保留背景色、边框、文本对齐、合并单元格及表格内容
254
256
  - **渲染数据**:只处理渲染副本,不修改传入的 `content` / `modelValue` / `value` 或编辑器保存数据;`content` 或 `formatImageTableStyle` 动态变化时按最新原始输入重新计算
255
257
 
@@ -468,7 +470,7 @@ export default {
468
470
  | content | String | - | HTML 内容 |
469
471
  | containerClass | String | '' | 容器类名 |
470
472
  | sanitize | Boolean | true | 是否清洗 HTML |
471
- | formatImageTableStyle | Boolean | false | 渲染前恢复默认图片结构,清除图片/表格固定尺寸并改用响应式表格(见上文) |
473
+ | formatImageTableStyle | Boolean | false | 渲染前恢复块级图片默认结构(行内图片保持原样),清除图片/表格固定尺寸并改用响应式表格(见上文) |
472
474
  | math | Boolean | true | 是否渲染 `span.math-tex` 中的 KaTeX 公式 |
473
475
  | highlightCode | Boolean | true | 是否对 `pre code` 应用 highlight.js 高亮 |
474
476
  | fontSize | Number | - | 渲染区正文字号(px),通过 CSS 变量 `--ck-content-font-size` 应用 |