admin 发表于 2026-4-17 23:35:41

安装部署

<div class="ce-block" data-id="Ov_0LXqGwf" >
        <div class="ce-block__content" style="">
                <h1 class="ce-header ce-header--left">安装部署</h1>
        </div>
</div><div class="ce-block ce-block--focused" data-id="c-2a0ke44G" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">本章介绍 OpenClaw 的主流安装方式:一键脚本、npm 手动安装、Docker 部署。</div>
        </div>
</div><div class="ce-block" data-id="cJHHZ3lnkW" >
        <div class="ce-block__content" style="">
                <h2 class="ce-header ce-header--left">方式一:一键安装脚本(推荐)</h2>
        </div>
</div><div class="ce-block" data-id="eQxKH7iPGu" >
        <div class="ce-block__content" style="">
                <h3 class="ce-header ce-header--left">macOS / Linux / WSL2</h3>
        </div>
</div><div class="ce-block ce-block--focused" data-id="gjaofKhX7k" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-gjaofKhX7k">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-gjaofKhX7k">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-gjaofKhX7k" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-gjaofKhX7k">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642zfToE = document.getElementById('codeflask-gjaofKhX7k');
                        var isCollapsed1778072642zfToE = true;
                        const flask1778072642zfToE = new CodeFlask(editorElem1778072642zfToE, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642zfToE = `curl -fsSL https://openclaw.ai/install.sh | bash
`;
                            code1778072642zfToE = code1778072642zfToE.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642zfToE.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642zfToE.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642zfToE.updateCode(code1778072642zfToE);

                        const currentCode1778072642zfToE = flask1778072642zfToE.getCode();
            
                            var coderow1778072642zfToE = parseInt('');
                          if (coderow1778072642zfToE === undefined || coderow1778072642zfToE !== coderow1778072642zfToE || coderow1778072642zfToE === 0) {
                                  coderow1778072642zfToE = flask1778072642zfToE.lineNumber;
                          }
                          
                            if (coderow1778072642zfToE < 20) {
                              editorElem1778072642zfToE.parentElement.style.height = '300px';
                                editorElem1778072642zfToE.style.height = '300px';
                            } else if (coderow1778072642zfToE >= 20) {
                              editorElem1778072642zfToE.parentElement.style.height = '500px';
                              editorElem1778072642zfToE.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642zfToE})   
                       
                        const copyBtn1778072642zfToE = document.getElementById('codeflask-copy-gjaofKhX7k');
                        copyBtn1778072642zfToE.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642zfToE).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642zfToE.innerHTML;
                                      copyBtn1778072642zfToE.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642zfToE.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642zfToE);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642zfToE);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642zfToE.innerHTML;
                                      copyBtn1778072642zfToE.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642zfToE.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642zfToE = document.getElementById('codeflask-bottomBtn-gjaofKhX7k');
                        const Toggle1778072642zfToE = document.getElementById('codeflask-Toggle-gjaofKhX7k');
                        bottomBtn1778072642zfToE.addEventListener('click', function() {
                                if (isCollapsed1778072642zfToE) {
                                    // 展开代码
                                    isCollapsed1778072642zfToE = false;
                                  const codeElement1778072642zfToE = editorElem1778072642zfToE.querySelector('.codeflask__code');
                                    if (codeElement1778072642zfToE) {
                                            const actualHeight1778072642zfToE = codeElement1778072642zfToE.scrollHeight + 20;
                                           
                                            editorElem1778072642zfToE.parentElement.style.height = actualHeight1778072642zfToE + 'px';
                                            editorElem1778072642zfToE.style.height = actualHeight1778072642zfToE + 'px';
                                    }
                                    bottomBtn1778072642zfToE.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642zfToE.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642zfToE = true;
                                  if (coderow1778072642zfToE < 20) {
                                      editorElem1778072642zfToE.parentElement.style.height = '300px';
                                        editorElem1778072642zfToE.style.height = '300px';
                                    } else if (coderow1778072642zfToE >= 20) {
                                      editorElem1778072642zfToE.parentElement.style.height = '500px';
                                      editorElem1778072642zfToE.style.height = '500px';
                                    }
                                    bottomBtn1778072642zfToE.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642zfToE.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642zfToE.addEventListener('click', function() {
                                bottomBtn1778072642zfToE.click();
                        });
</script><div class="ce-block" data-id="Q2xpQJtl9G" >
        <div class="ce-block__content" style="">
                <h3 class="ce-header ce-header--left">Windows PowerShell</h3>
        </div>
</div><div class="ce-block ce-block--focused" data-id="OTPeSmqMXc" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-OTPeSmqMXc">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-OTPeSmqMXc">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-OTPeSmqMXc" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-OTPeSmqMXc">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642pTl0t = document.getElementById('codeflask-OTPeSmqMXc');
                        var isCollapsed1778072642pTl0t = true;
                        const flask1778072642pTl0t = new CodeFlask(editorElem1778072642pTl0t, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642pTl0t = `iwr -useb https://openclaw.ai/install.ps1 | iex
`;
                            code1778072642pTl0t = code1778072642pTl0t.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642pTl0t.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642pTl0t.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642pTl0t.updateCode(code1778072642pTl0t);

                        const currentCode1778072642pTl0t = flask1778072642pTl0t.getCode();
            
                            var coderow1778072642pTl0t = parseInt('');
                          if (coderow1778072642pTl0t === undefined || coderow1778072642pTl0t !== coderow1778072642pTl0t || coderow1778072642pTl0t === 0) {
                                  coderow1778072642pTl0t = flask1778072642pTl0t.lineNumber;
                          }
                          
                            if (coderow1778072642pTl0t < 20) {
                              editorElem1778072642pTl0t.parentElement.style.height = '300px';
                                editorElem1778072642pTl0t.style.height = '300px';
                            } else if (coderow1778072642pTl0t >= 20) {
                              editorElem1778072642pTl0t.parentElement.style.height = '500px';
                              editorElem1778072642pTl0t.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642pTl0t})   
                       
                        const copyBtn1778072642pTl0t = document.getElementById('codeflask-copy-OTPeSmqMXc');
                        copyBtn1778072642pTl0t.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642pTl0t).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642pTl0t.innerHTML;
                                      copyBtn1778072642pTl0t.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642pTl0t.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642pTl0t);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642pTl0t);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642pTl0t.innerHTML;
                                      copyBtn1778072642pTl0t.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642pTl0t.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642pTl0t = document.getElementById('codeflask-bottomBtn-OTPeSmqMXc');
                        const Toggle1778072642pTl0t = document.getElementById('codeflask-Toggle-OTPeSmqMXc');
                        bottomBtn1778072642pTl0t.addEventListener('click', function() {
                                if (isCollapsed1778072642pTl0t) {
                                    // 展开代码
                                    isCollapsed1778072642pTl0t = false;
                                  const codeElement1778072642pTl0t = editorElem1778072642pTl0t.querySelector('.codeflask__code');
                                    if (codeElement1778072642pTl0t) {
                                            const actualHeight1778072642pTl0t = codeElement1778072642pTl0t.scrollHeight + 20;
                                           
                                            editorElem1778072642pTl0t.parentElement.style.height = actualHeight1778072642pTl0t + 'px';
                                            editorElem1778072642pTl0t.style.height = actualHeight1778072642pTl0t + 'px';
                                    }
                                    bottomBtn1778072642pTl0t.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642pTl0t.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642pTl0t = true;
                                  if (coderow1778072642pTl0t < 20) {
                                      editorElem1778072642pTl0t.parentElement.style.height = '300px';
                                        editorElem1778072642pTl0t.style.height = '300px';
                                    } else if (coderow1778072642pTl0t >= 20) {
                                      editorElem1778072642pTl0t.parentElement.style.height = '500px';
                                      editorElem1778072642pTl0t.style.height = '500px';
                                    }
                                    bottomBtn1778072642pTl0t.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642pTl0t.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642pTl0t.addEventListener('click', function() {
                                bottomBtn1778072642pTl0t.click();
                        });
</script><div class="ce-block ce-block--focused" data-id="tle29wjXDX" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">如果只想安装、不立即进入向导:</div>
        </div>
</div><div class="ce-block ce-block--focused" data-id="VsUq2TK_lb" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-VsUq2TK_lb">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-VsUq2TK_lb">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-VsUq2TK_lb" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-VsUq2TK_lb">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642cJj7l = document.getElementById('codeflask-VsUq2TK_lb');
                        var isCollapsed1778072642cJj7l = true;
                        const flask1778072642cJj7l = new CodeFlask(editorElem1778072642cJj7l, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642cJj7l = `curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard`;
                            code1778072642cJj7l = code1778072642cJj7l.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642cJj7l.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642cJj7l.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642cJj7l.updateCode(code1778072642cJj7l);

                        const currentCode1778072642cJj7l = flask1778072642cJj7l.getCode();
            
                            var coderow1778072642cJj7l = parseInt('');
                          if (coderow1778072642cJj7l === undefined || coderow1778072642cJj7l !== coderow1778072642cJj7l || coderow1778072642cJj7l === 0) {
                                  coderow1778072642cJj7l = flask1778072642cJj7l.lineNumber;
                          }
                          
                            if (coderow1778072642cJj7l < 20) {
                              editorElem1778072642cJj7l.parentElement.style.height = '300px';
                                editorElem1778072642cJj7l.style.height = '300px';
                            } else if (coderow1778072642cJj7l >= 20) {
                              editorElem1778072642cJj7l.parentElement.style.height = '500px';
                              editorElem1778072642cJj7l.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642cJj7l})   
                       
                        const copyBtn1778072642cJj7l = document.getElementById('codeflask-copy-VsUq2TK_lb');
                        copyBtn1778072642cJj7l.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642cJj7l).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642cJj7l.innerHTML;
                                      copyBtn1778072642cJj7l.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642cJj7l.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642cJj7l);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642cJj7l);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642cJj7l.innerHTML;
                                      copyBtn1778072642cJj7l.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642cJj7l.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642cJj7l = document.getElementById('codeflask-bottomBtn-VsUq2TK_lb');
                        const Toggle1778072642cJj7l = document.getElementById('codeflask-Toggle-VsUq2TK_lb');
                        bottomBtn1778072642cJj7l.addEventListener('click', function() {
                                if (isCollapsed1778072642cJj7l) {
                                    // 展开代码
                                    isCollapsed1778072642cJj7l = false;
                                  const codeElement1778072642cJj7l = editorElem1778072642cJj7l.querySelector('.codeflask__code');
                                    if (codeElement1778072642cJj7l) {
                                            const actualHeight1778072642cJj7l = codeElement1778072642cJj7l.scrollHeight + 20;
                                           
                                            editorElem1778072642cJj7l.parentElement.style.height = actualHeight1778072642cJj7l + 'px';
                                            editorElem1778072642cJj7l.style.height = actualHeight1778072642cJj7l + 'px';
                                    }
                                    bottomBtn1778072642cJj7l.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642cJj7l.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642cJj7l = true;
                                  if (coderow1778072642cJj7l < 20) {
                                      editorElem1778072642cJj7l.parentElement.style.height = '300px';
                                        editorElem1778072642cJj7l.style.height = '300px';
                                    } else if (coderow1778072642cJj7l >= 20) {
                                      editorElem1778072642cJj7l.parentElement.style.height = '500px';
                                      editorElem1778072642cJj7l.style.height = '500px';
                                    }
                                    bottomBtn1778072642cJj7l.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642cJj7l.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642cJj7l.addEventListener('click', function() {
                                bottomBtn1778072642cJj7l.click();
                        });
</script><div class="ce-block" data-id="lhQAfc5qYF" >
        <div class="ce-block__content" style="">
                <h2 class="ce-header ce-header--left">方式二:npm 手动安装</h2>
        </div>
</div><div class="ce-block ce-block--focused" data-id="TYUsjXnCK3" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-TYUsjXnCK3">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-TYUsjXnCK3">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-TYUsjXnCK3" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-TYUsjXnCK3">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642ixQWx = document.getElementById('codeflask-TYUsjXnCK3');
                        var isCollapsed1778072642ixQWx = true;
                        const flask1778072642ixQWx = new CodeFlask(editorElem1778072642ixQWx, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642ixQWx = `# 确保 Node.js 22+
node --version

# 全局安装 OpenClaw
npm install -g openclaw@latest

# 运行配置向导(同时安装守护进程)
openclaw onboard --install-daemon
`;
                            code1778072642ixQWx = code1778072642ixQWx.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642ixQWx.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642ixQWx.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642ixQWx.updateCode(code1778072642ixQWx);

                        const currentCode1778072642ixQWx = flask1778072642ixQWx.getCode();
            
                            var coderow1778072642ixQWx = parseInt('');
                          if (coderow1778072642ixQWx === undefined || coderow1778072642ixQWx !== coderow1778072642ixQWx || coderow1778072642ixQWx === 0) {
                                  coderow1778072642ixQWx = flask1778072642ixQWx.lineNumber;
                          }
                          
                            if (coderow1778072642ixQWx < 20) {
                              editorElem1778072642ixQWx.parentElement.style.height = '300px';
                                editorElem1778072642ixQWx.style.height = '300px';
                            } else if (coderow1778072642ixQWx >= 20) {
                              editorElem1778072642ixQWx.parentElement.style.height = '500px';
                              editorElem1778072642ixQWx.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642ixQWx})   
                       
                        const copyBtn1778072642ixQWx = document.getElementById('codeflask-copy-TYUsjXnCK3');
                        copyBtn1778072642ixQWx.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642ixQWx).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642ixQWx.innerHTML;
                                      copyBtn1778072642ixQWx.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642ixQWx.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642ixQWx);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642ixQWx);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642ixQWx.innerHTML;
                                      copyBtn1778072642ixQWx.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642ixQWx.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642ixQWx = document.getElementById('codeflask-bottomBtn-TYUsjXnCK3');
                        const Toggle1778072642ixQWx = document.getElementById('codeflask-Toggle-TYUsjXnCK3');
                        bottomBtn1778072642ixQWx.addEventListener('click', function() {
                                if (isCollapsed1778072642ixQWx) {
                                    // 展开代码
                                    isCollapsed1778072642ixQWx = false;
                                  const codeElement1778072642ixQWx = editorElem1778072642ixQWx.querySelector('.codeflask__code');
                                    if (codeElement1778072642ixQWx) {
                                            const actualHeight1778072642ixQWx = codeElement1778072642ixQWx.scrollHeight + 20;
                                           
                                            editorElem1778072642ixQWx.parentElement.style.height = actualHeight1778072642ixQWx + 'px';
                                            editorElem1778072642ixQWx.style.height = actualHeight1778072642ixQWx + 'px';
                                    }
                                    bottomBtn1778072642ixQWx.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642ixQWx.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642ixQWx = true;
                                  if (coderow1778072642ixQWx < 20) {
                                      editorElem1778072642ixQWx.parentElement.style.height = '300px';
                                        editorElem1778072642ixQWx.style.height = '300px';
                                    } else if (coderow1778072642ixQWx >= 20) {
                                      editorElem1778072642ixQWx.parentElement.style.height = '500px';
                                      editorElem1778072642ixQWx.style.height = '500px';
                                    }
                                    bottomBtn1778072642ixQWx.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642ixQWx.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642ixQWx.addEventListener('click', function() {
                                bottomBtn1778072642ixQWx.click();
                        });
</script><div class="ce-block" data-id="Sy1vdzNUXU" >
        <div class="ce-block__content" style="">
                <h2 class="ce-header ce-header--left">方式三:Docker 部署</h2>
        </div>
</div><div class="ce-block ce-block--focused" data-id="bh2EquWS1W" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-bh2EquWS1W">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-bh2EquWS1W">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-bh2EquWS1W" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-bh2EquWS1W">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642cQyqq = document.getElementById('codeflask-bh2EquWS1W');
                        var isCollapsed1778072642cQyqq = true;
                        const flask1778072642cQyqq = new CodeFlask(editorElem1778072642cQyqq, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642cQyqq = `docker pull openclaw/openclaw:latest

docker run -d \
--name openclaw \
-p 18789:18789 \
-v ~/.openclaw:/root/.openclaw \
-e ANTHROPIC_API_KEY=sk-ant-xxx \
openclaw/openclaw:latest
`;
                            code1778072642cQyqq = code1778072642cQyqq.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642cQyqq.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642cQyqq.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642cQyqq.updateCode(code1778072642cQyqq);

                        const currentCode1778072642cQyqq = flask1778072642cQyqq.getCode();
            
                            var coderow1778072642cQyqq = parseInt('');
                          if (coderow1778072642cQyqq === undefined || coderow1778072642cQyqq !== coderow1778072642cQyqq || coderow1778072642cQyqq === 0) {
                                  coderow1778072642cQyqq = flask1778072642cQyqq.lineNumber;
                          }
                          
                            if (coderow1778072642cQyqq < 20) {
                              editorElem1778072642cQyqq.parentElement.style.height = '300px';
                                editorElem1778072642cQyqq.style.height = '300px';
                            } else if (coderow1778072642cQyqq >= 20) {
                              editorElem1778072642cQyqq.parentElement.style.height = '500px';
                              editorElem1778072642cQyqq.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642cQyqq})   
                       
                        const copyBtn1778072642cQyqq = document.getElementById('codeflask-copy-bh2EquWS1W');
                        copyBtn1778072642cQyqq.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642cQyqq).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642cQyqq.innerHTML;
                                      copyBtn1778072642cQyqq.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642cQyqq.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642cQyqq);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642cQyqq);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642cQyqq.innerHTML;
                                      copyBtn1778072642cQyqq.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642cQyqq.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642cQyqq = document.getElementById('codeflask-bottomBtn-bh2EquWS1W');
                        const Toggle1778072642cQyqq = document.getElementById('codeflask-Toggle-bh2EquWS1W');
                        bottomBtn1778072642cQyqq.addEventListener('click', function() {
                                if (isCollapsed1778072642cQyqq) {
                                    // 展开代码
                                    isCollapsed1778072642cQyqq = false;
                                  const codeElement1778072642cQyqq = editorElem1778072642cQyqq.querySelector('.codeflask__code');
                                    if (codeElement1778072642cQyqq) {
                                            const actualHeight1778072642cQyqq = codeElement1778072642cQyqq.scrollHeight + 20;
                                           
                                            editorElem1778072642cQyqq.parentElement.style.height = actualHeight1778072642cQyqq + 'px';
                                            editorElem1778072642cQyqq.style.height = actualHeight1778072642cQyqq + 'px';
                                    }
                                    bottomBtn1778072642cQyqq.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642cQyqq.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642cQyqq = true;
                                  if (coderow1778072642cQyqq < 20) {
                                      editorElem1778072642cQyqq.parentElement.style.height = '300px';
                                        editorElem1778072642cQyqq.style.height = '300px';
                                    } else if (coderow1778072642cQyqq >= 20) {
                                      editorElem1778072642cQyqq.parentElement.style.height = '500px';
                                      editorElem1778072642cQyqq.style.height = '500px';
                                    }
                                    bottomBtn1778072642cQyqq.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642cQyqq.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642cQyqq.addEventListener('click', function() {
                                bottomBtn1778072642cQyqq.click();
                        });
</script><div class="ce-block" data-id="7XqCafFHw5" >
        <div class="ce-block__content" style="">
                <h2 class="ce-header ce-header--left">安装后验证</h2>
        </div>
</div><div class="ce-block ce-block--focused" data-id="ZOrpIK3Rdp" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-ZOrpIK3Rdp">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-ZOrpIK3Rdp">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-ZOrpIK3Rdp" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-ZOrpIK3Rdp">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642T9wYk = document.getElementById('codeflask-ZOrpIK3Rdp');
                        var isCollapsed1778072642T9wYk = true;
                        const flask1778072642T9wYk = new CodeFlask(editorElem1778072642T9wYk, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642T9wYk = `openclaw --version
openclaw doctor
openclaw gateway status
openclaw dashboard
`;
                            code1778072642T9wYk = code1778072642T9wYk.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642T9wYk.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642T9wYk.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642T9wYk.updateCode(code1778072642T9wYk);

                        const currentCode1778072642T9wYk = flask1778072642T9wYk.getCode();
            
                            var coderow1778072642T9wYk = parseInt('');
                          if (coderow1778072642T9wYk === undefined || coderow1778072642T9wYk !== coderow1778072642T9wYk || coderow1778072642T9wYk === 0) {
                                  coderow1778072642T9wYk = flask1778072642T9wYk.lineNumber;
                          }
                          
                            if (coderow1778072642T9wYk < 20) {
                              editorElem1778072642T9wYk.parentElement.style.height = '300px';
                                editorElem1778072642T9wYk.style.height = '300px';
                            } else if (coderow1778072642T9wYk >= 20) {
                              editorElem1778072642T9wYk.parentElement.style.height = '500px';
                              editorElem1778072642T9wYk.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642T9wYk})   
                       
                        const copyBtn1778072642T9wYk = document.getElementById('codeflask-copy-ZOrpIK3Rdp');
                        copyBtn1778072642T9wYk.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642T9wYk).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642T9wYk.innerHTML;
                                      copyBtn1778072642T9wYk.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642T9wYk.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642T9wYk);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642T9wYk);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642T9wYk.innerHTML;
                                      copyBtn1778072642T9wYk.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642T9wYk.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642T9wYk = document.getElementById('codeflask-bottomBtn-ZOrpIK3Rdp');
                        const Toggle1778072642T9wYk = document.getElementById('codeflask-Toggle-ZOrpIK3Rdp');
                        bottomBtn1778072642T9wYk.addEventListener('click', function() {
                                if (isCollapsed1778072642T9wYk) {
                                    // 展开代码
                                    isCollapsed1778072642T9wYk = false;
                                  const codeElement1778072642T9wYk = editorElem1778072642T9wYk.querySelector('.codeflask__code');
                                    if (codeElement1778072642T9wYk) {
                                            const actualHeight1778072642T9wYk = codeElement1778072642T9wYk.scrollHeight + 20;
                                           
                                            editorElem1778072642T9wYk.parentElement.style.height = actualHeight1778072642T9wYk + 'px';
                                            editorElem1778072642T9wYk.style.height = actualHeight1778072642T9wYk + 'px';
                                    }
                                    bottomBtn1778072642T9wYk.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642T9wYk.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642T9wYk = true;
                                  if (coderow1778072642T9wYk < 20) {
                                      editorElem1778072642T9wYk.parentElement.style.height = '300px';
                                        editorElem1778072642T9wYk.style.height = '300px';
                                    } else if (coderow1778072642T9wYk >= 20) {
                                      editorElem1778072642T9wYk.parentElement.style.height = '500px';
                                      editorElem1778072642T9wYk.style.height = '500px';
                                    }
                                    bottomBtn1778072642T9wYk.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642T9wYk.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642T9wYk.addEventListener('click', function() {
                                bottomBtn1778072642T9wYk.click();
                        });
</script><div class="ce-block ce-block--focused" data-id="oAPzjzexfe" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">如果<span>&nbsp;</span><code>openclaw dashboard</code><span>&nbsp;</span>能正常打开,说明网关已可用。</div>
        </div>
</div><div class="ce-block" data-id="Ufymclj0NM" >
        <div class="ce-block__content" style="">
                <h2 class="ce-header ce-header--left">常见问题</h2>
        </div>
</div><div class="ce-block" data-id="G2QvpPfKSg" >
        <div class="ce-block__content" style="">
                <h3 class="ce-header ce-header--left">命令找不到</h3>
        </div>
</div><div class="ce-block ce-block--focused" data-id="14Bm6T40sr" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-14Bm6T40sr">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-14Bm6T40sr">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-14Bm6T40sr" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-14Bm6T40sr">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642fNs1s = document.getElementById('codeflask-14Bm6T40sr');
                        var isCollapsed1778072642fNs1s = true;
                        const flask1778072642fNs1s = new CodeFlask(editorElem1778072642fNs1s, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642fNs1s = `npm prefix -g
export PATH=&quot;$(npm prefix -g)/bin:$PATH&quot;
`;
                            code1778072642fNs1s = code1778072642fNs1s.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642fNs1s.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642fNs1s.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642fNs1s.updateCode(code1778072642fNs1s);

                        const currentCode1778072642fNs1s = flask1778072642fNs1s.getCode();
            
                            var coderow1778072642fNs1s = parseInt('');
                          if (coderow1778072642fNs1s === undefined || coderow1778072642fNs1s !== coderow1778072642fNs1s || coderow1778072642fNs1s === 0) {
                                  coderow1778072642fNs1s = flask1778072642fNs1s.lineNumber;
                          }
                          
                            if (coderow1778072642fNs1s < 20) {
                              editorElem1778072642fNs1s.parentElement.style.height = '300px';
                                editorElem1778072642fNs1s.style.height = '300px';
                            } else if (coderow1778072642fNs1s >= 20) {
                              editorElem1778072642fNs1s.parentElement.style.height = '500px';
                              editorElem1778072642fNs1s.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642fNs1s})   
                       
                        const copyBtn1778072642fNs1s = document.getElementById('codeflask-copy-14Bm6T40sr');
                        copyBtn1778072642fNs1s.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642fNs1s).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642fNs1s.innerHTML;
                                      copyBtn1778072642fNs1s.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642fNs1s.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642fNs1s);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642fNs1s);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642fNs1s.innerHTML;
                                      copyBtn1778072642fNs1s.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642fNs1s.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642fNs1s = document.getElementById('codeflask-bottomBtn-14Bm6T40sr');
                        const Toggle1778072642fNs1s = document.getElementById('codeflask-Toggle-14Bm6T40sr');
                        bottomBtn1778072642fNs1s.addEventListener('click', function() {
                                if (isCollapsed1778072642fNs1s) {
                                    // 展开代码
                                    isCollapsed1778072642fNs1s = false;
                                  const codeElement1778072642fNs1s = editorElem1778072642fNs1s.querySelector('.codeflask__code');
                                    if (codeElement1778072642fNs1s) {
                                            const actualHeight1778072642fNs1s = codeElement1778072642fNs1s.scrollHeight + 20;
                                           
                                            editorElem1778072642fNs1s.parentElement.style.height = actualHeight1778072642fNs1s + 'px';
                                            editorElem1778072642fNs1s.style.height = actualHeight1778072642fNs1s + 'px';
                                    }
                                    bottomBtn1778072642fNs1s.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642fNs1s.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642fNs1s = true;
                                  if (coderow1778072642fNs1s < 20) {
                                      editorElem1778072642fNs1s.parentElement.style.height = '300px';
                                        editorElem1778072642fNs1s.style.height = '300px';
                                    } else if (coderow1778072642fNs1s >= 20) {
                                      editorElem1778072642fNs1s.parentElement.style.height = '500px';
                                      editorElem1778072642fNs1s.style.height = '500px';
                                    }
                                    bottomBtn1778072642fNs1s.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642fNs1s.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642fNs1s.addEventListener('click', function() {
                                bottomBtn1778072642fNs1s.click();
                        });
</script><div class="ce-block" data-id="zsUysc8TGH" >
        <div class="ce-block__content" style="">
                <h3 class="ce-header ce-header--left">sharp 编译失败(macOS 常见)</h3>
        </div>
</div><div class="ce-block ce-block--focused" data-id="NT_NEF5gyL" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-NT_NEF5gyL">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-NT_NEF5gyL">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-NT_NEF5gyL" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-NT_NEF5gyL">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642mK44H = document.getElementById('codeflask-NT_NEF5gyL');
                        var isCollapsed1778072642mK44H = true;
                        const flask1778072642mK44H = new CodeFlask(editorElem1778072642mK44H, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642mK44H = `SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
`;
                            code1778072642mK44H = code1778072642mK44H.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642mK44H.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642mK44H.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642mK44H.updateCode(code1778072642mK44H);

                        const currentCode1778072642mK44H = flask1778072642mK44H.getCode();
            
                            var coderow1778072642mK44H = parseInt('');
                          if (coderow1778072642mK44H === undefined || coderow1778072642mK44H !== coderow1778072642mK44H || coderow1778072642mK44H === 0) {
                                  coderow1778072642mK44H = flask1778072642mK44H.lineNumber;
                          }
                          
                            if (coderow1778072642mK44H < 20) {
                              editorElem1778072642mK44H.parentElement.style.height = '300px';
                                editorElem1778072642mK44H.style.height = '300px';
                            } else if (coderow1778072642mK44H >= 20) {
                              editorElem1778072642mK44H.parentElement.style.height = '500px';
                              editorElem1778072642mK44H.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642mK44H})   
                       
                        const copyBtn1778072642mK44H = document.getElementById('codeflask-copy-NT_NEF5gyL');
                        copyBtn1778072642mK44H.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642mK44H).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642mK44H.innerHTML;
                                      copyBtn1778072642mK44H.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642mK44H.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642mK44H);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642mK44H);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642mK44H.innerHTML;
                                      copyBtn1778072642mK44H.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642mK44H.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642mK44H = document.getElementById('codeflask-bottomBtn-NT_NEF5gyL');
                        const Toggle1778072642mK44H = document.getElementById('codeflask-Toggle-NT_NEF5gyL');
                        bottomBtn1778072642mK44H.addEventListener('click', function() {
                                if (isCollapsed1778072642mK44H) {
                                    // 展开代码
                                    isCollapsed1778072642mK44H = false;
                                  const codeElement1778072642mK44H = editorElem1778072642mK44H.querySelector('.codeflask__code');
                                    if (codeElement1778072642mK44H) {
                                            const actualHeight1778072642mK44H = codeElement1778072642mK44H.scrollHeight + 20;
                                           
                                            editorElem1778072642mK44H.parentElement.style.height = actualHeight1778072642mK44H + 'px';
                                            editorElem1778072642mK44H.style.height = actualHeight1778072642mK44H + 'px';
                                    }
                                    bottomBtn1778072642mK44H.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642mK44H.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642mK44H = true;
                                  if (coderow1778072642mK44H < 20) {
                                      editorElem1778072642mK44H.parentElement.style.height = '300px';
                                        editorElem1778072642mK44H.style.height = '300px';
                                    } else if (coderow1778072642mK44H >= 20) {
                                      editorElem1778072642mK44H.parentElement.style.height = '500px';
                                      editorElem1778072642mK44H.style.height = '500px';
                                    }
                                    bottomBtn1778072642mK44H.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642mK44H.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642mK44H.addEventListener('click', function() {
                                bottomBtn1778072642mK44H.click();
                        });
</script><div class="ce-block" data-id="rpRD_-jAhu" >
        <div class="ce-block__content" style="">
                <h3 class="ce-header ce-header--left">端口冲突</h3>
        </div>
</div><div class="ce-block ce-block--focused" data-id="isnjuaUCzT" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-isnjuaUCzT">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-isnjuaUCzT">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-isnjuaUCzT" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-isnjuaUCzT">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642t27ZH = document.getElementById('codeflask-isnjuaUCzT');
                        var isCollapsed1778072642t27ZH = true;
                        const flask1778072642t27ZH = new CodeFlask(editorElem1778072642t27ZH, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642t27ZH = `lsof -i :18789
openclaw gateway --port 19000

`;
                            code1778072642t27ZH = code1778072642t27ZH.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642t27ZH.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642t27ZH.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642t27ZH.updateCode(code1778072642t27ZH);

                        const currentCode1778072642t27ZH = flask1778072642t27ZH.getCode();
            
                            var coderow1778072642t27ZH = parseInt('');
                          if (coderow1778072642t27ZH === undefined || coderow1778072642t27ZH !== coderow1778072642t27ZH || coderow1778072642t27ZH === 0) {
                                  coderow1778072642t27ZH = flask1778072642t27ZH.lineNumber;
                          }
                          
                            if (coderow1778072642t27ZH < 20) {
                              editorElem1778072642t27ZH.parentElement.style.height = '300px';
                                editorElem1778072642t27ZH.style.height = '300px';
                            } else if (coderow1778072642t27ZH >= 20) {
                              editorElem1778072642t27ZH.parentElement.style.height = '500px';
                              editorElem1778072642t27ZH.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642t27ZH})   
                       
                        const copyBtn1778072642t27ZH = document.getElementById('codeflask-copy-isnjuaUCzT');
                        copyBtn1778072642t27ZH.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642t27ZH).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642t27ZH.innerHTML;
                                      copyBtn1778072642t27ZH.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642t27ZH.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642t27ZH);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642t27ZH);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642t27ZH.innerHTML;
                                      copyBtn1778072642t27ZH.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642t27ZH.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642t27ZH = document.getElementById('codeflask-bottomBtn-isnjuaUCzT');
                        const Toggle1778072642t27ZH = document.getElementById('codeflask-Toggle-isnjuaUCzT');
                        bottomBtn1778072642t27ZH.addEventListener('click', function() {
                                if (isCollapsed1778072642t27ZH) {
                                    // 展开代码
                                    isCollapsed1778072642t27ZH = false;
                                  const codeElement1778072642t27ZH = editorElem1778072642t27ZH.querySelector('.codeflask__code');
                                    if (codeElement1778072642t27ZH) {
                                            const actualHeight1778072642t27ZH = codeElement1778072642t27ZH.scrollHeight + 20;
                                           
                                            editorElem1778072642t27ZH.parentElement.style.height = actualHeight1778072642t27ZH + 'px';
                                            editorElem1778072642t27ZH.style.height = actualHeight1778072642t27ZH + 'px';
                                    }
                                    bottomBtn1778072642t27ZH.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642t27ZH.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642t27ZH = true;
                                  if (coderow1778072642t27ZH < 20) {
                                      editorElem1778072642t27ZH.parentElement.style.height = '300px';
                                        editorElem1778072642t27ZH.style.height = '300px';
                                    } else if (coderow1778072642t27ZH >= 20) {
                                      editorElem1778072642t27ZH.parentElement.style.height = '500px';
                                      editorElem1778072642t27ZH.style.height = '500px';
                                    }
                                    bottomBtn1778072642t27ZH.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642t27ZH.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642t27ZH.addEventListener('click', function() {
                                bottomBtn1778072642t27ZH.click();
                        });
</script><div class="ce-block" data-id="PFkIrLwQZB" >
        <div class="ce-block__content" style="">
                <h3 class="ce-header ce-header--left">网关无法启动</h3>
        </div>
</div><div class="ce-block ce-block--focused" data-id="ncF7iuF4a4" >
    <div class="ce-block__content">
      <div class="editorjs-codeFlask_Wrapper">
                <div class="editorjs-codeFlask_Header">
                        <div class="editorjs-codeFlask_LangDisplay">javascript</div>
                        <button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-ncF7iuF4a4">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                        <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                                        <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                                </svg>
                        </button>
                        <button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-ncF7iuF4a4">
                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                              <polyline points="6 9 12 15 18 9"></polyline>
                              </svg>
                        </button>
                </div>
                <div class="editorjs-codeFlask_ContentContainer">
                        <div class="editorjs-codeFlask_Editor" id="codeflask-ncF7iuF4a4" >
                       
                        </div>
                </div>
                <div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-ncF7iuF4a4">
                        <button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
                </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?L8J"></script>
<script type="application/javascript">
                        const editorElem1778072642KvEOh = document.getElementById('codeflask-ncF7iuF4a4');
                        var isCollapsed1778072642KvEOh = true;
                        const flask1778072642KvEOh = new CodeFlask(editorElem1778072642KvEOh, {
                                language: 'javascript',
                                lineNumbers: true,
                                styleParent: this.shadowRoot,
                                rtl: false,
                                readonly: true
                        });
                            var code1778072642KvEOh = `openclaw doctor
openclaw doctor --fix
openclaw logs --follow
`;
                            code1778072642KvEOh = code1778072642KvEOh.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/'/g, "'");
                        flask1778072642KvEOh.addLanguage('javascript', Prism.languages['javascript']);
                        flask1778072642KvEOh.onUpdate((code) => {
                                // do something with code here.
                                // this will trigger whenever the code
                                // in the editor changes.
                          // console.log(code)
                        });
                        // flask.updateCode('');
                        // This will also trigger .onUpdate()
                        flask1778072642KvEOh.updateCode(code1778072642KvEOh);

                        const currentCode1778072642KvEOh = flask1778072642KvEOh.getCode();
            
                            var coderow1778072642KvEOh = parseInt('');
                          if (coderow1778072642KvEOh === undefined || coderow1778072642KvEOh !== coderow1778072642KvEOh || coderow1778072642KvEOh === 0) {
                                  coderow1778072642KvEOh = flask1778072642KvEOh.lineNumber;
                          }
                          
                            if (coderow1778072642KvEOh < 20) {
                              editorElem1778072642KvEOh.parentElement.style.height = '300px';
                                editorElem1778072642KvEOh.style.height = '300px';
                            } else if (coderow1778072642KvEOh >= 20) {
                              editorElem1778072642KvEOh.parentElement.style.height = '500px';
                              editorElem1778072642KvEOh.style.height = '500px';
                            }
                           
                        //console.log({currentCode1778072642KvEOh})   
                       
                        const copyBtn1778072642KvEOh = document.getElementById('codeflask-copy-ncF7iuF4a4');
                        copyBtn1778072642KvEOh.addEventListener('click', function() {
                          try {
                                // 先检查 Clipboard API 是否可用
                                if (navigator.clipboard && navigator.clipboard.writeText) {
                                    // 使用 Clipboard API 复制代码
                                    navigator.clipboard.writeText(code1778072642KvEOh).then(function() {
                                      // 复制成功提示
                                      const originalText = copyBtn1778072642KvEOh.innerHTML;
                                      copyBtn1778072642KvEOh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      // 一段时间后恢复原文本
                                      setTimeout(function() {
                                            copyBtn1778072642KvEOh.innerHTML = originalText;
                                      }, 2000);
                                    }).catch(function(err) {
                                      // 复制失败处理
                                      console.error('复制失败:', err);
                                      
                                      // 降级方案:使用传统的复制方法
                                      fallbackCopyTextToClipboard(code1778072642KvEOh);
                                    });
                                } else {
                                    // Clipboard API 不可用时直接使用降级方案
                                    fallbackCopyTextToClipboard(code1778072642KvEOh);
                                }
                                
                                // 提取降级方案为独立函数
                                function fallbackCopyTextToClipboard(text) {
                                    const textArea = document.createElement('textarea');
                                    textArea.value = text;
                                    textArea.style.position = 'fixed';
                                    textArea.style.opacity = '0';
                                    document.body.appendChild(textArea);
                                    textArea.select();
                                   
                                    try {
                                      document.execCommand('copy');
                                      const originalText = copyBtn1778072642KvEOh.innerHTML;
                                      copyBtn1778072642KvEOh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
                                      
                                      setTimeout(function() {
                                            copyBtn1778072642KvEOh.innerHTML = originalText;
                                      }, 2000);
                                    } catch (copyErr) {
                                      console.error('传统复制方法也失败了:', copyErr);
                                    } finally {
                                      document.body.removeChild(textArea);
                                    }
                                }
                          } catch (err) {
                                console.error('复制功能不可用:', err);
                          }
                        });
                       
                        const bottomBtn1778072642KvEOh = document.getElementById('codeflask-bottomBtn-ncF7iuF4a4');
                        const Toggle1778072642KvEOh = document.getElementById('codeflask-Toggle-ncF7iuF4a4');
                        bottomBtn1778072642KvEOh.addEventListener('click', function() {
                                if (isCollapsed1778072642KvEOh) {
                                    // 展开代码
                                    isCollapsed1778072642KvEOh = false;
                                  const codeElement1778072642KvEOh = editorElem1778072642KvEOh.querySelector('.codeflask__code');
                                    if (codeElement1778072642KvEOh) {
                                            const actualHeight1778072642KvEOh = codeElement1778072642KvEOh.scrollHeight + 20;
                                           
                                            editorElem1778072642KvEOh.parentElement.style.height = actualHeight1778072642KvEOh + 'px';
                                            editorElem1778072642KvEOh.style.height = actualHeight1778072642KvEOh + 'px';
                                    }
                                    bottomBtn1778072642KvEOh.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
                                    Toggle1778072642KvEOh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
                                } else {
                                    // 折叠代码
                                    isCollapsed1778072642KvEOh = true;
                                  if (coderow1778072642KvEOh < 20) {
                                      editorElem1778072642KvEOh.parentElement.style.height = '300px';
                                        editorElem1778072642KvEOh.style.height = '300px';
                                    } else if (coderow1778072642KvEOh >= 20) {
                                      editorElem1778072642KvEOh.parentElement.style.height = '500px';
                                      editorElem1778072642KvEOh.style.height = '500px';
                                    }
                                    bottomBtn1778072642KvEOh.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
                                    Toggle1778072642KvEOh.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
                                }
                        });
                       
                        Toggle1778072642KvEOh.addEventListener('click', function() {
                                bottomBtn1778072642KvEOh.click();
                        });
</script><div class="ce-block" data-id="523LnMC2eA" >
        <div class="ce-block__content" style="">
                <h2 class="ce-header ce-header--left">下一步</h2>
        </div>
</div><div class="ce-block ce-block--focused" data-id="jOnxnZnPPz" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">继续阅读《基础配置》,完成模型、渠道和工作空间设置。</div>
        </div>
</div><style type="text/css">
.ce-block {
        margin-top: 20px;
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
/**
* Plugin styles
*/
.ce-header {
position: relative;
padding: 1px 0px 1px 15px;
margin: 0;
line-height: 1.25em;
outline: none;
margin-bottom: 10px;
}

.ce-header p,
.ce-header div {
padding: 0 !important;
margin: 0 !important;
}
.ce-header::before {
        content: "";
        background-color: #3e8fe3;
        width: 6px;
        height: 100%;
        position: absolute;
        left: 0;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
}
/**
* Styles for Plugin icon in Toolbar
*/
.ce-header__icon {
}

.ce-header::before {
position: absolute;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
cursor: text;
}

.ce-header:empty::before {
display: block;
}

.ce-header:empty:focus::before {
display: none;
}
/* FontSize */
h1.ce-header {
    font-size: 2.0em;
}
h2.ce-header {
    font-size: 1.7em;
}
h3.ce-header {
    font-size: 1.4em;
}
h4.ce-header {
    font-size: 1.15em;
}
h5.ce-header {
    font-size: 0.95em;
}
h6.ce-header {
    font-size: 0.8em;
}
/* Alignment*/
.ce-header--right {
text-align: right;
}
.ce-header--center {
text-align: center;
}
.ce-header--left {
text-align: left;
}
.ce-header--justify {
text-align: justify;
}
</style><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.ce-paragraph {
    line-height: 1.6em;
    outline: none;
    text-indent: 2em;
    font-size: 16px;
}
.ce-paragraph--right {
    text-align: right;
}
.ce-paragraph--center {
    text-align: center;
}
.ce-paragraph--left {
    text-align: left;
}

.ce-paragraph--justify {
    text-align: justify;
}

.ce-paragraph-text-indent {
    text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}

/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}

.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}

.ce-paragraph p:first-of-type{
    margin-top: 0;
}

.ce-paragraph p:last-of-type{
    margin-bottom: 0;
}


.svg-icon {
    width: 1em;
    height: 1em;
}

.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
    fill: #4691f6;
}

.svg-icon circle {
    stroke: #4691f6;
    stroke-width: 1;
}
</style><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
        margin-right: auto;
        position: relative;
}

/* 主容器 */
.editorjs-codeFlask_Wrapper {
    border: 1px solid #dcdfe6;
    border-radius: 5px;
    background-color: #f6f8fa;
    margin-bottom: 10px;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 100px;
    overflow: hidden;
}

/* 标题栏 */
.editorjs-codeFlask_Header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 12px;
    background-color: #e9ecef;
    border-bottom: 1px solid #dcdfe6;
    position: relative;
    z-index: 0; /* 从10降低到2 */
}

/* 语言显示 */
.editorjs-codeFlask_LangDisplay {
    padding: 2px 8px;
    background-color: #409eff;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

/* 内容容器 - 禁止纵向滚动 */
.editorjs-codeFlask_ContentContainer {
    position: relative;
    min-height: 100px;
    overflow-x: hidden; /* 禁止横向滚动 */
    overflow-y: hidden;
    transition: height 0.3s ease;
}

/* 编辑器容器 - 禁止纵向滚动 */
.editorjs-codeFlask_Editor {
    position: relative;
    min-height: 100px;
    overflow-x: hidden; /* 禁止横向滚动 */
    overflow-y: hidden;
    transition: height 0.3s ease;
}

/* 底部按钮容器 - 优化为更简洁的样式 */
.editorjs-codeFlask_BottomButtonContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    position: relative;
    z-index: 0;
}

/* 底部横向折叠/展开按钮 - 优化样式,使其更融入设计 */
.editorjs-codeFlask_BottomToggle {
    width: 100%;
    background-color: transparent;
    color: #606266;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    position: relative;
}

.editorjs-codeFlask_BottomToggle:hover {
    background-color: #e9ecef;
    color: #409eff;
}

.editorjs-codeFlask_BottomToggle:active {
    background-color: #dee2e6;
}

.editorjs-codeFlask_BottomToggle .toggle-icon {
    font-size: 11px;
    transition: transform 0.3s ease;
}

/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
.editorjs-codeFlask_BottomToggle:has(span.toggle-icon:contains("▲"))::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0) 0%, rgba(248, 249, 250, 1) 100%);
    pointer-events: none;
}

/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
/* 删除不被广泛支持的:contains()选择器 */
.editorjs-codeFlask_BottomToggle.expand-mode::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 0%) 0%, rgba(248, 249, 250, 1) 100%);
    pointer-events: none;
}

/* CodeFlask 主容器样式 */
.editorjs-codeFlask_Editor .codeflask {
    position: relative;
    background: #fafafa;
    border-radius: 0 0 4px 4px;
    min-height: 100px;
    overflow-x: hidden; /* 禁止横向滚动 */
    overflow-y: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 行号容器 */
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background-color: #f5f5f5;
    border-right: 1px solid #e0e0e0;
    z-index: 0;
}

/* 行号 */
.editorjs-codeFlask_Editor .codeflask__lines {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    padding: 10px 0;
    background-color: #f5f5f5;
    border-right: 1px solid #e0e0e0;
    z-index: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 21px;
    color: #666;
    text-align: right;
    user-select: none;
    overflow: hidden;
}

.editorjs-codeFlask_Editor .codeflask__lines__line {
    padding-right: 8px;
}

/* 文本区域 - 输入框 */
.editorjs-codeFlask_Editor .codeflask__textarea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    color: transparent;
    caret-color: #333;
    resize: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 21px;
    z-index: 1;
    overflow-x: hidden; /* 禁止横向滚动 */
    overflow-y: hidden;
    white-space: pre-wrap; /* 自动换行 */
    tab-size: 4;
    outline: none;
}

/* 添加选中文本样式 */
.editorjs-codeFlask_Editor .codeflask__textarea::selection {
    background-color: #b3d4fc;
    color: #333;
}

.editorjs-codeFlask_Editor .codeflask__textarea::-moz-selection {
    background-color: #b3d4fc;
    color: #333;
}

/* 代码预览区域 */
.editorjs-codeFlask_Editor .codeflask__pre {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* 确保宽度不超出容器 */
    height: 100%;
    padding: 10px;
    margin: 0;
    border: none;
    background: transparent;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 21px;
    z-index: 0;
    overflow-x: hidden; /* 禁止横向滚动 */
    overflow-y: hidden;
    white-space: pre-wrap; /* 自动换行 */
    pointer-events: none;
}

/* 代码高亮区域 */
.editorjs-codeFlask_Editor .codeflask__code {
    display: block;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 21px;
    color: #333;
    white-space: pre-wrap; /* 自动换行 */
    tab-size: 4;
    overflow: visible;
}

/* 语法高亮样式 - 确保Prism.js样式正确应用 */
.editorjs-codeFlask_Editor .codeflask__code {
    background: transparent !important;
}

/* 通用语法高亮token样式 */
.editorjs-codeFlask_Editor .token.comment,
.editorjs-codeFlask_Editor .token.prolog,
.editorjs-codeFlask_Editor .token.doctype,
.editorjs-codeFlask_Editor .token.cdata {
    color: #708090;
}

.editorjs-codeFlask_Editor .token.punctuation {
    color: #999;
}

.editorjs-codeFlask_Editor .token.namespace {
    opacity: 0.7;
}

.editorjs-codeFlask_Editor .token.property,
.editorjs-codeFlask_Editor .token.tag,
.editorjs-codeFlask_Editor .token.boolean,
.editorjs-codeFlask_Editor .token.number,
.editorjs-codeFlask_Editor .token.constant,
.editorjs-codeFlask_Editor .token.symbol,
.editorjs-codeFlask_Editor .token.deleted {
    color: #905;
}

.editorjs-codeFlask_Editor .token.selector,
.editorjs-codeFlask_Editor .token.attr-name,
.editorjs-codeFlask_Editor .token.string,
.editorjs-codeFlask_Editor .token.char,
.editorjs-codeFlask_Editor .token.builtin,
.editorjs-codeFlask_Editor .token.inserted {
    color: #690;
}

.editorjs-codeFlask_Editor .token.operator,
.editorjs-codeFlask_Editor .token.entity,
.editorjs-codeFlask_Editor .token.url,
.editorjs-codeFlask_Editor .language-css .token.string,
.editorjs-codeFlask_Editor .style .token.string {
    color: #9a6e3a;
    background: hsla(0, 0%, 100%, 0.5);
}

.editorjs-codeFlask_Editor .token.atrule,
.editorjs-codeFlask_Editor .token.attr-value,
.editorjs-codeFlask_Editor .token.keyword {
    color: #07a;
}

.editorjs-codeFlask_Editor .token.function,
.editorjs-codeFlask_Editor .token.class-name {
    color: #dd4a68;
}

.editorjs-codeFlask_Editor .token.regex,
.editorjs-codeFlask_Editor .token.important,
.editorjs-codeFlask_Editor .token.variable {
    color: #e90;
}

/* 复制按钮样式 */
.editorjs-codeFlask_CopyButton {
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 6px 12px;
    margin-right: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.editorjs-codeFlask_CopyButton:hover {
    background-color: #66b1ff;
}

.editorjs-codeFlask_CopyButton.copied {
    background-color: #67c23a;
}

/* 折叠/展开按钮样式 */
.editorjs-codeFlask_Toggle {
    background-color: #909399;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    font-weight: bold;
}

.editorjs-codeFlask_Toggle:hover {
    background-color: #a6a9ad;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .editorjs-codeFlask_Header {
      padding: 6px 8px;
    }
   
    .editorjs-codeFlask_Editor .codeflask__textarea,
    .editorjs-codeFlask_Editor .codeflask__pre,
    .editorjs-codeFlask_Editor .codeflask__code {
      font-size: 13px;
      line-height: 19px;
      padding: 8px;
    }
   
    .editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
      width: 35px;
    }
   
    .editorjs-codeFlask_Editor .codeflask__lines {
      width: 35px;
      font-size: 12px;
    }
}

/* 滚动条样式 - 完全隐藏纵向滚动条 */
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar {
    width: 0;/* 纵向滚动条宽度为0 */
    height: 6px;/* 横向滚动条保持6px宽度 */
}

.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0;
}

.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 0;
}

/* Firefox 滚动条隐藏 */
.editorjs-codeFlask_Wrapper {
    scrollbar-width: none;/* Firefox 隐藏纵向滚动条 */
}

.editorjs-codeFlask_Wrapper ::-moz-scrollbar {
    width: 0;
    height: 6px;
}

/* 焦点状态 */
.editorjs-codeFlask_Wrapper:focus-within {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 只读模式样式 */
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Header {
    background-color: #f5f7fa;
}

.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Editor .codeflask__textarea {
    cursor: default;
}

/* 确保所有元素正确显示 */
.editorjs-codeFlask_Wrapper * {
    box-sizing: border-box;
}

/* 修复行号对齐 */
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__pre {
    padding-left: 50px;
}

.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__lines {
    padding-top: 10px;
}



/* 语言显示元素 - 添加点击样式 */
.editorjs-codeFlask_LangDisplay {
    padding: 2px 8px;
    background-color: #409eff;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.editorjs-codeFlask_LangDisplay:hover {
    background-color: #66b1ff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 语言选择弹窗 */
.editorjs-codeFlask_LanguagePopup {
    background-color: white;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    width: 250px;
    max-height: 300px;
    z-index: 1000;
    overflow: hidden;
}

/* 搜索框 */
.editorjs-codeFlask_LanguageSearch {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #ebeef5;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

/* 语言列表 */
.editorjs-codeFlask_LanguagesList {
    max-height: 250px;
    overflow-y: auto;
}

/* 语言选项 */
.editorjs-codeFlask_LanguageItem {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.editorjs-codeFlask_LanguageItem:hover {
    background-color: #f5f7fa;
}

.editorjs-codeFlask_LanguageItem.selected {
    background-color: #ecf5ff;
    color: #409eff;
    font-weight: 500;
}

/* 滚动条样式 */
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar {
    width: 6px;
}

.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-track {
    background-color: #f5f7fa;
}

.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb {
    background-color: #c0c4cc;
    border-radius: 3px;
}

.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb:hover {
    background-color: #909399;
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>
页: [1]
查看完整版本: 安装部署