{"id":4796,"date":"2025-10-23T17:10:40","date_gmt":"2025-10-23T09:10:40","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/?p=4796"},"modified":"2025-10-23T17:10:40","modified_gmt":"2025-10-23T09:10:40","slug":"%e5%b0%86codemirror%e7%94%a8%e5%9c%a8%e6%88%91%e7%9a%84wordpress%e7%bd%91%e7%ab%99%e7%9a%84%e6%96%87%e7%ab%a0%e4%b8%ad%e7%9a%84%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/4796.html","title":{"rendered":"\u5c06CodeMirror\u7528\u5728\u6211\u7684WordPress\u7f51\u7ad9\u7684\u6587\u7ae0\u4e2d\u7684\u4ee3\u7801"},"content":{"rendered":"<p>\u60f3\u5728WordPress\u5757\u7f16\u8f91\u5668\uff08Gutenberg\u7f16\u8f91\u5668\uff09\u7684\u7cfb\u7edf\u9ed8\u8ba4\u4ee3\u7801\u5757\u4e0a\u96c6\u6210CodeMirror\u4ee3\u7801\u7f16\u8f91\u5668\u6765\u589e\u5f3a\u529f\u80fd\uff0c\u8fd9\u4e2a\u60f3\u6cd5\u5f88\u4e0d\u9519\u3002CodeMirror\u80fd\u5e26\u6765\u66f4\u4f18\u79c0\u7684\u4ee3\u7801\u9ad8\u4eae\u548c\u7f16\u8f91\u4f53\u9a8c\u3002<\/p><p>\u4e0b\u9762\u6211\u7ed9\u4f60\u4ecb\u7ecd\u4e24\u79cd\u4e3b\u8981\u7684\u5b9e\u73b0\u65b9\u6cd5\uff1a\u4f7f\u7528\u73b0\u6210\u63d2\u4ef6\u548c\u624b\u52a8\u7f16\u7801\u96c6\u6210\u3002<\/p><h2 class=\"wp-block-heading\">\ud83d\udee0 \u5b9e\u73b0\u65b9\u6cd5\uff1a\u63d2\u4ef6\u4f18\u5148\uff0c\u624b\u52a8\u5907\u9009<\/h2><p>\u63a8\u8350\u4f7f\u7528\u73b0\u6210\u7684\u63d2\u4ef6\uff0c\u56e0\u4e3a\u5b83\u4eec\u901a\u5e38\u66f4\u7a33\u5b9a\u4e14\u65b9\u4fbf\u3002\u5982\u679c\u9700\u8981\u9ad8\u5ea6\u81ea\u5b9a\u4e49\uff0c\u518d\u8003\u8651\u624b\u52a8\u96c6\u6210\u3002<\/p><h2 class=\"wp-block-heading\">\u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528\u73b0\u6210\u63d2\u4ef6\uff08\u63a8\u8350\u5927\u591a\u6570\u7528\u6237\uff09<\/h2><p>\u8fd9\u662f\u6700\u7b80\u5355\u5feb\u6377\u7684\u65b9\u5f0f\uff0c\u65e0\u9700\u7f16\u5199\u4ee3\u7801\u3002<\/p><h3 class=\"wp-block-heading\">1. CodeMirror Blocks<\/h3><p>\u8fd9\u6b3e\u63d2\u4ef6\u4e13\u4e3aWordPress\u5757\u7f16\u8f91\u5668\u8bbe\u8ba1\uff0c\u652f\u6301100\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u548c56\u79cd\u4e3b\u9898\u3002\u5b83\u76f4\u63a5\u5728\u4ee3\u7801\u5757\u9876\u90e8\u6dfb\u52a0\u4e86\u4e00\u4e2a\u63a7\u5236\u9762\u677f\uff0c\u663e\u793a\u8bed\u8a00\u4fe1\u606f\uff0c\u5e76\u63d0\u4f9b<strong>\u8fd0\u884c\u4ee3\u7801<\/strong>\u3001<strong>\u5168\u5c4f<\/strong>\u548c<strong>\u590d\u5236\u4ee3\u7801<\/strong>\u6309\u94ae\u3002<\/p><p><strong>\u5b89\u88c5\u6b65\u9aa4\uff1a<\/strong><\/p><ol class=\"wp-block-list\">\n<li>\u8fdb\u5165WordPress\u540e\u53f0 -&gt; \u201c\u63d2\u4ef6\u201d -&gt; \u201c\u5b89\u88c5\u63d2\u4ef6\u201d\u3002<\/li>\n\n\n\n<li>\u641c\u7d22\u201c<strong>CodeMirror Blocks<\/strong>\u201d\u3002<\/li>\n\n\n\n<li>\u70b9\u51fb\u201c<strong>\u5b89\u88c5<\/strong>\u201d\u5e76\u201c<strong>\u542f\u7528<\/strong>\u201d\u3002<\/li>\n<\/ol><p>\u5b89\u88c5\u542f\u7528\u540e\uff0c\u4f60\u4e4b\u524d\u6dfb\u52a0\u7684\u4ee3\u7801\u5757\u901a\u5e38\u4f1a\u81ea\u52a8\u83b7\u5f97\u589e\u5f3a\u7684CodeMirror\u754c\u9762\u3002<\/p><h3 class=\"wp-block-heading\">2. DL CodeMirror<\/h3><p>\u8fd9\u6b3e\u63d2\u4ef6\u4f7f\u7528CodeMirror\u5e93\u4e3a\u6587\u672c\u533a\u57df\uff08textarea\uff09\u63d0\u4f9b\u7c7b\u4f3cIDE\u7684\u7f16\u8f91\u4f53\u9a8c\uff0c\u652f\u6301\u8bed\u6cd5\u9ad8\u4eae\u3001\u7f29\u8fdb\u3001\u81ea\u52a8\u8865\u5168\u7b49\u529f\u80fd\uff0c\u5e76\u652f\u6301C\u3001C#\u3001CSS\u3001JavaScript\u3001HTML\u3001PHP\u548cSQL\u7b49\u5e38\u89c1\u7f16\u7a0b\u8bed\u8a00\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5b83<strong>\u6700\u8fd1\u66f4\u65b0\u662f2016\u5e74<\/strong>\uff0c\u53ef\u80fd\u65e0\u6cd5\u4fdd\u8bc1\u4e0e\u6700\u65b0\u7248WordPress\u7684\u5b8c\u5168\u517c\u5bb9\u6027\u3002<\/p><h2 class=\"wp-block-heading\">\u65b9\u6cd5\u4e8c\uff1a\u624b\u52a8\u7f16\u7801\u96c6\u6210\uff08\u4f9b\u5f00\u53d1\u53c2\u8003\uff09<\/h2><p>\u5982\u679c\u4f60\u6709\u5f00\u53d1\u80fd\u529b\uff0c\u5e0c\u671b\u6df1\u5ea6\u5b9a\u5236\uff0c\u53ef\u4ee5\u8003\u8651\u624b\u52a8\u5c06CodeMirror\u96c6\u6210\u5230\u4f60\u7684\u4e3b\u9898\u6216\u81ea\u5b9a\u4e49\u63d2\u4ef6\u4e2d\u3002\u6b64\u65b9\u6cd5\u9700\u8981\u7f16\u8f91\u4e3b\u9898\u7684 <code>functions.php<\/code> \u6587\u4ef6\u6216\u521b\u5efa\u81ea\u5b9a\u4e49\u63d2\u4ef6\u3002<\/p><p><strong>\u6838\u5fc3\u6b65\u9aa4\uff1a<\/strong><\/p><ol class=\"wp-block-list\">\n<li><strong>\u5f15\u5165\u8d44\u6e90<\/strong>\uff1a \u5c06CodeMirror\u7684JS\u548cCSS\u6587\u4ef6\u52a0\u5165WordPress\u3002WordPress 4.9+ \u6838\u5fc3\u5df2\u96c6\u6210CodeMirror\uff0c\u53ef\u901a\u8fc7 <code>wp_enqueue_code_editor()<\/code> \u51fd\u6570\u8c03\u7528\u3002<\/li>\n\n\n\n<li><strong>\u521d\u59cb\u5316\u5e76\u66ff\u6362\u9ed8\u8ba4\u4ee3\u7801\u5757<\/strong>\uff1a \u4f7f\u7528JavaScript\u68c0\u6d4b\u5757\u7f16\u8f91\u5668\u4e2d\u7684\u4ee3\u7801\u5757\uff0c\u5e76\u7528CodeMirror\u5b9e\u4f8b\u66ff\u6362\u5b83\u4eec\u3002<\/li>\n<\/ol><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p><p>\u4ee5\u4e0b\u4ee3\u7801\u7247\u6bb5\u5c55\u793a\u4e86\u5982\u4f55\u5c1d\u8bd5\u5229\u7528WordPress\u81ea\u5e26\u7684CodeMirror\u8d44\u6e90\u5e76\u4e3a\u4ee3\u7801\u5757\u8fdb\u884c\u521d\u59cb\u5316\uff1a<\/p><pre class=\"wp-block-code\"><code>\/**\n * \u5c1d\u8bd5\u5728WordPress\u5757\u7f16\u8f91\u5668\u7684\u4ee3\u7801\u5757\u4e0a\u542f\u7528CodeMirror\u8bed\u6cd5\u9ad8\u4eae\n * \u6ce8\u610f\uff1a\u6b64\u4e3a\u57fa\u672c\u793a\u4f8b\uff0c\u5b9e\u9645\u5b9e\u73b0\u53ef\u80fd\u9700\u8981\u66f4\u590d\u6742\u7684JS\u6765\u5904\u7406\u5757\u7f16\u8f91\u5668\u7684\u52a8\u6001\u52a0\u8f7d\u548c\u72b6\u6001\u540c\u6b65\u3002\n *\/\nfunction my_enqueue_codemirror_for_blocks() {\n    \/\/ \u4ec5\u5728\u5757\u7f16\u8f91\u5668\u540e\u53f0\u9875\u9762\u52a0\u8f7d\n    if ( is_admin() &amp;&amp; function_exists( 'wp_enqueue_code_editor' ) ) {\n        \/\/ \u5c1d\u8bd5\u5bf9 'text\/html' \u7c7b\u578b\u7684\u4ee3\u7801\u542f\u7528\u4ee3\u7801\u7f16\u8f91\u5668\uff08WordPress\u53ef\u80fd\u4f1a\u5904\u7406\u4e00\u90e8\u5206\u521d\u59cb\u5316\uff09\n        $settings = wp_enqueue_code_editor( array( 'type' =&gt; 'text\/html' ) ); \/\/ \n\n        if ( false !== $settings &amp;&amp; ! empty( $settings['codemirror'] ) ) {\n            \/\/ \u5185\u8054\u811a\u672c\uff0c\u7528\u4e8e\u5c1d\u8bd5\u521d\u59cb\u5316\u4ee3\u7801\u5757\u4e0a\u7684CodeMirror\n            wp_add_inline_script(\n                'code-editor', \/\/ \u4f9d\u8d56WordPress\u7684code-editor\u811a\u672c\n                sprintf(\n                    'jQuery( document ).ready( function() { \n                        \/\/ \u76d1\u542c\u5757\u7f16\u8f91\u5668\u7684\u52a0\u8f7d\u4e0e\u66f4\u65b0\n                        if ( wp.data &amp;&amp; wp.blocks &amp;&amp; wp.domReady ) {\n                            wp.domReady( function() {\n                                \/\/ \u5c1d\u8bd5\u67e5\u627e\u6240\u6709\u7684\u4ee3\u7801\u5757\u5e76\u8fdb\u884c\u66ff\u6362\n                                var codeBlocks = document.querySelectorAll( '.wp-block-code textarea' );\n                                if ( codeBlocks.length ) {\n                                    \/\/ \u4f7f\u7528WordPress\u5185\u7f6e\u7684CodeMirror\u548c\u914d\u7f6e\u521d\u59cb\u5316\u6bcf\u4e00\u4e2a\u4ee3\u7801\u6587\u672c\u533a\u57df\n                                    codeBlocks.forEach( function( textarea ) {\n                                        \/\/ \u8fd9\u91cc\u9700\u8981\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4f7f\u7528CodeMirror.fromTextArea\u5e76\u4f20\u9012\u914d\u7f6e%s\n                                        \/\/ \u6ce8\u610f\uff1a\u8fd9\u662f\u4e00\u4e2a\u590d\u6742\u7684\u8fc7\u7a0b\uff0c\u9700\u8981\u5904\u7406\u7f16\u8f91\u5668\u5b9e\u4f8b\u7684\u521b\u5efa\u3001\u72b6\u6001\u540c\u6b65\u7b49\u95ee\u9898\u3002\n                                        \/\/ \u4e0b\u9762\u7684\u4ee3\u7801\u4ec5\u793a\u610f\uff0c\u5f88\u53ef\u80fd\u4e0d\u80fd\u76f4\u63a5\u5de5\u4f5c\u3002\n                                        var editor = wp.codeEditor.initialize( textarea, %s );\n                                    } );\n                                }\n                            } );\n                        }\n                    } );',\n                    wp_json_encode( $settings )\n                )\n            );\n        }\n    }\n}\nadd_action( 'admin_enqueue_scripts', 'my_enqueue_codemirror_for_blocks' );<\/code><\/pre><p><strong>\u91cd\u8981\u63d0\u9192\uff1a<\/strong><\/p><ul class=\"wp-block-list\">\n<li><strong>\u614e\u7528\u624b\u52a8\u96c6\u6210<\/strong>\uff1a\u4e0a\u9762\u7684PHP\u4ee3\u7801\u793a\u4f8b<strong>\u4e3b\u8981\u5c55\u793a\u4e86\u5982\u4f55\u5f15\u5165\u8d44\u6e90<\/strong>\u3002\u771f\u6b63\u7528CodeMirror\u5b9e\u4f8b<strong>\u66ff\u6362Gutenberg\u4ee3\u7801\u5757<\/strong>\u5e76<strong>\u5b9e\u73b0\u53cc\u5411\u5185\u5bb9\u540c\u6b65<\/strong>\uff08\u5373CodeMirror\u4e2d\u7f16\u8f91\u7684\u5185\u5bb9\u8981\u80fd\u56de\u5199\u5230\u533a\u5757\u7684 <code>textarea<\/code>\uff0c\u5426\u5219\u5185\u5bb9\u65e0\u6cd5\u4fdd\u5b58\uff09<strong>\u975e\u5e38\u590d\u6742<\/strong>\uff0c\u9700\u8981\u5927\u91cf\u7684JavaScript\u7f16\u7a0b\u548c\u5bf9Gutenberg\u6570\u636e\u6d41\uff08<code>wp.data<\/code>\uff09\u7684\u7406\u89e3\u3002Gutenberg\u662f\u52a8\u6001\u52a0\u8f7d\u7684\uff0c\u7b80\u5355\u5730\u7528 <code>CodeMirror.fromTextArea<\/code> \u521d\u59cb\u5316\u53ef\u80fd\u65e0\u6cd5\u53ef\u9760\u5de5\u4f5c\uff0c\u4e14\u5bb9\u6613\u5728\u5757\u66f4\u65b0\u65f6\u4ea7\u751f\u95ee\u9898\u3002<\/li>\n\n\n\n<li><strong>\u63a8\u8350\u4f7f\u7528\u63d2\u4ef6<\/strong>\uff1a\u6b63\u56e0\u4e3a\u624b\u52a8\u5b9e\u73b0\u5982\u6b64\u590d\u6742\uff0c\u5bf9\u4e8e\u7edd\u5927\u591a\u6570\u7528\u6237\uff0c<strong>\u5f3a\u70c8\u63a8\u8350\u76f4\u63a5\u4f7f\u7528\u201cCodeMirror Blocks\u201d\u8fd9\u7c7b\u6210\u719f\u63d2\u4ef6<\/strong>\u3002\u5b83\u4eec\u5df2\u7ecf\u89e3\u51b3\u4e86\u6240\u6709\u8fd9\u4e9b\u517c\u5bb9\u6027\u548c\u540c\u6b65\u95ee\u9898\u3002<\/li>\n<\/ul><h2 class=\"wp-block-heading\">\ud83d\udccb \u65b9\u6cd5\u5bf9\u6bd4<\/h2><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u8868\u683c\uff0c\u5e2e\u4f60\u5feb\u901f\u4e86\u89e3\u4e0d\u540c\u65b9\u6cd5\u7684\u7279\u70b9\uff1a<\/p><figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7279\u6027\u65b9\u9762<\/th><th>CodeMirror Blocks \u63d2\u4ef6<\/th><th>DL CodeMirror \u63d2\u4ef6<\/th><th>\u624b\u52a8\u7f16\u7801\u96c6\u6210<\/th><\/tr><\/thead><tbody><tr><td><strong>\u6613\u7528\u6027<\/strong><\/td><td><strong>\u9ad8<\/strong>\uff0c\u5b89\u88c5\u542f\u7528\u5373\u53ef<\/td><td><strong>\u4e2d<\/strong>\uff0c\u4f46\u7248\u672c\u8f83\u65e7<\/td><td><strong>\u4f4e<\/strong>\uff0c\u9700\u8981\u7f16\u7801\u80fd\u529b\uff0c\u4e14\u5b9e\u73b0\u590d\u6742<\/td><\/tr><tr><td><strong>\u81ea\u5b9a\u4e49\u7a0b\u5ea6<\/strong><\/td><td><strong>\u4e2d\u9ad8<\/strong>\uff0c\u63d0\u4f9b\u591a\u79cd\u4e3b\u9898\u548c\u8bed\u8a00<\/td><td><strong>\u4e2d<\/strong>\uff0c\u652f\u6301\u5e38\u89c1\u8bed\u8a00<\/td><td><strong>\u7406\u8bba\u4e0a\u6700\u9ad8<\/strong>\uff0c\u4f46\u5b9e\u73b0\u6210\u672c\u6781\u9ad8<\/td><\/tr><tr><td><strong>\u7ef4\u62a4\u6027<\/strong><\/td><td><strong>\u9ad8<\/strong>\uff0c\u7531\u63d2\u4ef6\u4f5c\u8005\u66f4\u65b0\u7ef4\u62a4<\/td><td><strong>\u4f4e<\/strong>\uff0c\u957f\u671f\u672a\u66f4\u65b0<\/td><td><strong>\u4f4e<\/strong>\uff0c\u9700\u81ea\u884c\u7ef4\u62a4\uff0c\u53ef\u80fd\u968fWordPress\u66f4\u65b0\u800c\u51fa\u9519<\/td><\/tr><tr><td><strong>\u529f\u80fd\u7279\u6027<\/strong><\/td><td><strong>\u4e30\u5bcc<\/strong>\uff0c\u652f\u6301\u6267\u884c\u4ee3\u7801\u3001\u5168\u5c4f\u3001\u590d\u5236\u7b49<\/td><td><strong>\u57fa\u7840<\/strong>\uff0c\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u7b49IDE\u57fa\u7840\u529f\u80fd<\/td><td>\u53d6\u51b3\u4e8e\u5f00\u53d1\u5b9e\u73b0<\/td><\/tr><tr><td><strong>\u63a8\u8350\u4f7f\u7528\u573a\u666f<\/strong><\/td><td><strong>\u7edd\u5927\u591a\u6570\u7528\u6237<\/strong>\uff0c\u5e0c\u671b\u5feb\u901f\u83b7\u5f97\u5f3a\u5927\u4e14\u7a33\u5b9a\u7684\u4ee3\u7801\u7f16\u8f91\u529f\u80fd<\/td><td>\u9700\u8981\u57fa\u7840\u4ee3\u7801\u9ad8\u4eae\uff0c\u4e14\u4e0d\u4ecb\u610f\u53ef\u80fd\u5b58\u5728\u7684\u517c\u5bb9\u6027\u95ee\u9898\u7684\u7528\u6237<\/td><td><strong>\u9ad8\u7ea7\u5f00\u53d1\u8005<\/strong>\uff0c\u6709\u975e\u5e38\u7279\u6b8a\u7684\u5b9a\u5236\u5316\u9700\u6c42<\/td><\/tr><\/tbody><\/table><\/figure><h2 class=\"wp-block-heading\">\u26a0\ufe0f \u6ce8\u610f\u4e8b\u9879<\/h2><ol class=\"wp-block-list\">\n<li><strong>\u63d2\u4ef6\u517c\u5bb9\u6027<\/strong>\uff1a\u5b89\u88c5\u4efb\u4f55\u63d2\u4ef6\u524d\uff0c<strong>\u52a1\u5fc5\u786e\u8ba4\u5176\u4e0e\u4f60\u73b0\u5728\u4f7f\u7528\u7684WordPress\u7248\u672c\u548cPHP\u7248\u672c\u7684\u517c\u5bb9\u6027<\/strong>\u3002\u50cf\u201cDL CodeMirror\u201d\u8fd9\u7c7b\u957f\u671f\u672a\u66f4\u65b0\u7684\u63d2\u4ef6\u53ef\u80fd\u65e0\u6cd5\u5728\u6700\u65b0\u73af\u5883\u4e2d\u7a33\u5b9a\u5de5\u4f5c\u3002<\/li>\n\n\n\n<li><strong>\u6027\u80fd\u8003\u91cf<\/strong>\uff1a CodeMirror\u811a\u672c\u548c\u6837\u5f0f\u9700\u8981\u52a0\u8f7d\u3002\u597d\u7684\u63d2\u4ef6\uff08\u5982CodeMirror Blocks\uff09\u901a\u5e38\u4f1a\u505a<strong>\u6309\u9700\u52a0\u8f7d<\/strong>\uff08\u53ea\u5728\u5305\u542b\u4ee3\u7801\u5757\u7684\u9875\u9762\u52a0\u8f7d\u8d44\u6e90\uff09\uff0c\u8fd9\u662f\u4f18\u9009\u3002<\/li>\n\n\n\n<li><strong>\u5907\u4efd\uff01<\/strong>\uff1a \u5728\u5b89\u88c5\u65b0\u63d2\u4ef6\u6216\u5411\u4f60\u7684\u4e3b\u9898 <code>functions.php<\/code> \u6587\u4ef6\u6dfb\u52a0\u4efb\u4f55\u4ee3\u7801\u4e4b\u524d\uff0c<strong>\u8bf7\u52a1\u5fc5\u5907\u4efd\u4f60\u7684\u7f51\u7ad9\uff08\u6587\u4ef6\u548c\u6570\u636e\u5e93\uff09<\/strong>\u3002\u8fd9\u6837\u82e5\u51fa\u73b0\u95ee\u9898\uff0c\u53ef\u4ee5\u8f7b\u677e\u6062\u590d\u3002<\/li>\n\n\n\n<li><strong>\u6d4b\u8bd5\u73af\u5883<\/strong>\uff1a \u5f3a\u70c8\u5efa\u8bae\u5148\u5728** staging\u73af\u5883\uff08\u6d4b\u8bd5\u73af\u5883\uff09** \u6216\u672c\u5730\u5f00\u53d1\u73af\u5883\u4e2d\u8fdb\u884c\u66f4\u6539\u548c\u6d4b\u8bd5\uff0c\u786e\u8ba4\u65e0\u8bef\u540e\u518d\u5e94\u7528\u5230\u6b63\u5f0f\u7f51\u7ad9\u3002<\/li>\n<\/ol><h2 class=\"wp-block-heading\">\ud83d\udc8e \u603b\u7ed3<\/h2><p>\u5bf9\u4e8e\u7edd\u5927\u591a\u6570\u7528\u6237\u800c\u8a00\uff0c<strong>\u5b89\u88c5\u5e76\u542f\u7528\u201cCodeMirror Blocks\u201d\u63d2\u4ef6\u662f\u5728WordPress\u5757\u7f16\u8f91\u5668\u4ee3\u7801\u5757\u4e0a\u96c6\u6210CodeMirror\u7684\u6700\u4f18\u89e3<\/strong>\u3002\u5b83\u5f00\u7bb1\u5373\u7528\uff0c\u529f\u80fd\u5f3a\u5927\uff0c\u80fd\u663e\u8457\u63d0\u5347\u4ee3\u7801\u7f16\u8f91\u548c\u663e\u793a\u7684\u4f53\u9a8c\u3002<\/p><p>\u5e0c\u671b\u8fd9\u4e9b\u4fe1\u606f\u80fd\u5e2e\u52a9\u4f60\u987a\u5229\u5730\u5728\u4f60\u7684WordPress\u7f51\u7ad9\u4e2d\u5b9e\u73b0\u6f02\u4eae\u7684\u4ee3\u7801\u9ad8\u4eae\u529f\u80fd\u3002<\/p><p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u60f3\u5728WordPress\u5757\u7f16\u8f91\u5668\uff08Gutenberg\u7f16\u8f91\u5668\uff09\u7684\u7cfb\u7edf\u9ed8\u8ba4\u4ee3\u7801\u5757\u4e0a\u96c6\u6210CodeMirror\u4ee3\u7801\u7f16\u8f91\u5668\u6765\u589e\u5f3a\u529f\u80fd\uff0c\u8fd9\u4e2a\u60f3\u6cd5\u5f88\u4e0d\u9519\u3002CodeMirror\u80fd\u5e26\u6765\u66f4\u4f18\u79c0\u7684\u4ee3\u7801\u9ad8\u4eae\u548c\u7f16\u8f91\u4f53\u9a8c\u3002 \u4e0b\u9762\u6211\u7ed9\u4f60\u4ecb\u7ecd\u4e24\u79cd\u4e3b\u8981\u7684\u5b9e\u73b0\u65b9\u6cd5\uff1a\u4f7f\u7528\u73b0\u6210\u63d2\u4ef6\u548c\u624b\u52a8\u7f16\u7801\u96c6\u6210\u3002 \ud83d\udee0 \u5b9e\u73b0\u65b9\u6cd5\uff1a\u63d2\u4ef6\u4f18\u5148\uff0c\u624b\u52a8\u5907\u9009 \u63a8\u8350\u4f7f\u7528\u73b0\u6210\u7684\u63d2\u4ef6\uff0c\u56e0\u4e3a\u5b83\u4eec..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3185],"tags":[],"tuisongtax":[],"class_list":["post-4796","post","type-post","status-publish","format-standard","hentry","category-cjtj"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/4796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/comments?post=4796"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/4796\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=4796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=4796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=4796"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=4796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}