联合国秘书长 发表于 2024-4-29 21:05:27

wordpress里怎么能把docker-compose.yml文件内容复制进去格式不乱

比如下面这段,复制loc里面就可以<br />
<br />
但是复制到我的WP博客里的代码块里面去,前面的缩进就没有了<br />
<br /><div class="blockcode"><div id="code_DXp"><ol><li>version: '3'<br /><li><br /><li>networks:<br /><li>&nbsp;&nbsp;rustdesk-net:<br /><li>&nbsp; &nbsp; external: false<br /><li><br /><li>services:<br /><li>&nbsp;&nbsp;hbbs:<br /><li>&nbsp; &nbsp; container_name: rustdesk-hbbs<br /><li>&nbsp; &nbsp; ports:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- 21115:21115<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- 21116:21116<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- 21116:21116/udp<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- 21118:21118<br /><li>&nbsp; &nbsp; image: rustdesk/rustdesk-server:latest<br /><li>&nbsp; &nbsp; # 请把 www.aaabbb.com:21117 修改为自己的域名<br /><li>&nbsp; &nbsp; # 如果您禁止没有key的用户建立非加密连接,请在运行hbbs和hbbr的时候添加-k _参数<br /><li>&nbsp; &nbsp; command: hbbs -r www.aaabbb.com:21117 -k _<br /><li>&nbsp; &nbsp; volumes:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- ./hbbs:/root<br /><li>&nbsp; &nbsp; networks:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- rustdesk-net<br /><li>&nbsp; &nbsp; depends_on:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- hbbr<br /><li>&nbsp; &nbsp; restart: unless-stopped<br /><li><br /><li>&nbsp;&nbsp;hbbr:<br /><li>&nbsp; &nbsp; container_name: rustdesk-hbbr<br /><li>&nbsp; &nbsp; ports:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- 21117:21117<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- 21119:21119<br /><li>&nbsp; &nbsp; image: rustdesk/rustdesk-server:latest<br /><li>&nbsp; &nbsp; command: hbbr<br /><li>&nbsp; &nbsp; volumes:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- ./hbbr:/root<br /><li>&nbsp; &nbsp; networks:<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;- rustdesk-net<br /><li>&nbsp; &nbsp; restart: unless-stopped<br /><li></ol></div><em onclick="copycode($('code_DXp'));">复制代码</em></div>

hausen1012 发表于 2024-4-29 21:10:50

主题的问题吧

nttstar 发表于 2024-4-29 21:13:22

<img id="aimg_bbjmZ" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://imglink.win/image/2024/04/29/OAp50.png" onmouseover="img_onmouseoverfunc(this)" onload="thumbImg(this)" border="0" alt="" />

karson 发表于 2024-4-29 21:14:14

主题或者插件干的好事

联合国秘书长 发表于 2024-4-30 13:07:35

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=15495843&ptid=1301763" target="_blank"><font color="#999999">nttstar 发表于 2024-4-29 21:13</font></a></font></blockquote></div><br />
大佬你用的什么编辑器<br />
<br />
我是用不惯古腾堡编辑器,把编辑器替换成了Advanced Editor Tools的经典编辑器

haozi 发表于 2024-4-29 21:13:00

一般是主题代码高亮功能的问题,和编辑器没什么关系编辑器

联合国秘书长 发表于 2024-4-30 13:09:44

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=15497653&ptid=1301763" target="_blank"><font color="#999999">haozi 发表于 2024-4-30 13:09</font></a></font><br />
一般是主题代码高亮功能的问题,和编辑器没什么关系编辑器</blockquote></div><br />
好的,我排查下,我发现直接复制进编辑器就全变成没有缩进了,好奇怪

wps 发表于 2024-4-30 13:17:32

代码块缩进正常<br />
<img id="aimg_Oqy1t" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://img.977776.xyz/file/88c49bba26a183cc6a099.png" onmouseover="img_onmouseoverfunc(this)" onload="thumbImg(this)" border="0" alt="" />
页: [1]
查看完整版本: wordpress里怎么能把docker-compose.yml文件内容复制进去格式不乱