From f128d679cacda2a6b5b730ad0368b5fe73f887f7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 二月 2025 15:27:02 +0800 Subject: [PATCH] Merge branch 'master' into positec --- 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..eff5b65 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