From 50955551f7aebd3f664d3840ded3d1cb4aed3beb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 07 二月 2025 17:54:52 +0800 Subject: [PATCH] 2025-02-07 --- src/tabviews/custom/components/editor/braft-editor/index.jsx | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/tabviews/custom/components/editor/braft-editor/index.jsx b/src/tabviews/custom/components/editor/braft-editor/index.jsx index 067b69f..5729372 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.jsx +++ b/src/tabviews/custom/components/editor/braft-editor/index.jsx @@ -63,6 +63,17 @@ } else { _data = [_data] } + } else if (config.html) { + if (/blank_space_\d+/ig.test(config.html)) { + config.html = config.html.replace(/blank_space_\d+/ig, (w) => { + let n = +w.replace(/blank_space_/ig, '') + if (n) { + return new Array(n).fill(' ').join('') + } + + return w + }) + } } if (_config.wrap.minHeight) { @@ -261,6 +272,17 @@ item.$html = item.$html.replace(reg, item[key]) }) } + + if (/blank_space_\d+/ig.test(item.$html)) { + item.$html = item.$html.replace(/blank_space_\d+/ig, (w) => { + let n = +w.replace(/blank_space_/ig, '') + if (n) { + return new Array(n).fill(' ').join('') + } + + return w + }) + } } }) -- Gitblit v1.8.0