将带样式的文本和图像粘贴到 Discourse 编辑器中的最佳方法

你好 Adam :wave:

据我们所知,如果您专门讨论 Google Docs,在他们更改后是不可能的:

我不知道 Discourse 是否能够将 Base64 图像粘贴为帖子的常规图像。我想这值得在 Feature 上发帖。

作为一个实际的例子,如果我们有一个 Google 文档 (Test Discourse base64 image - Google Docs) 并复制所有内容,根据 Clipview (Windows clipboard raw viewer),这是 Windows 11 的剪贴板内容:

Version:0.9
StartHTML:0000000105
EndHTML:0000001659
StartFragment:0000000141
EndFragment:0000001623

<html>
  <body>
    <!--StartFragment-->
    <meta charset="utf-8">
    <b style="font-weight:normal;" id="docs-internal-guid-86b76b06-7fff-94b7-4ff6-2d981c2951e9">
      <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;">
        <span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">test</span>
      </p>
      <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;">
        <span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">
          <span style="border:none;display:inline-block;overflow:hidden;width:10px;height:10px;">
            <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAExJREFUKFNj/M/A8J+BCMAIU8j4Abvq/wIQcbBCkCKQALpimBiYhikE6UJWjMFGVghTDLYKySkYJhKtkCirifIMupuQAwoleIgIbwYADG839985eBAAAAAASUVORK5CYII=" width="10" height="10" style="margin-left:0px;margin-top:0px;" />
          </span>
        </span>
      </p>
      <p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;">
        <span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">img</span>
      </p>
    </b>
    <br class="Apple-interchange-newline">
    <!--EndFragment-->
  </body>
</html>