<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wordpress &#8211; 岁月细碎点滴快查</title>
	<atom:link href="https://blog.mutadecheng.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.mutadecheng.com</link>
	<description></description>
	<lastBuildDate>Wed, 05 Jun 2024 07:37:34 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>嵌入式流程图</title>
		<link>https://blog.mutadecheng.com/2024/06/05/%e5%b5%8c%e5%85%a5%e5%bc%8f%e6%b5%81%e7%a8%8b%e5%9b%be/</link>
		
		<dc:creator><![CDATA[木它]]></dc:creator>
		<pubDate>Wed, 05 Jun 2024 07:24:37 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://blog.mutadecheng.com/?p=164</guid>

					<description><![CDATA[使用官方生成工具网站 先在官方生成工具网站 draw.io (diagrams.net) ,编辑并下载html [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">使用官方生成工具网站</h2>



<p>先在官方生成工具网站 <a href="https://app.diagrams.net/">draw.io (diagrams.net)</a> ,编辑并下载html页面</p>



<h2 class="wp-block-heading">使用方式</h2>



<p>直接在页面中加载,例如wordress中, 使用自定义HTML区块,将整个html文件填入即可,以下是示例效果:</p>



<p>注: script是引用自cdn</p>



<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
<!DOCTYPE html>
<html>
<head>
<title>未命名绘图.drawio.html</title>
<meta charset="utf-8"/>
</head>
<body>
<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;xml&quot;:&quot;&lt;mxfile host=\&quot;app.diagrams.net\&quot; modified=\&quot;2024-06-05T07:04:01.700Z\&quot; agent=\&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0\&quot; etag=\&quot;-VKU14WkH6LcWGv8bJNt\&quot; version=\&quot;24.4.13\&quot; type=\&quot;device\&quot;&gt;&lt;diagram name=\&quot;Page-1\&quot; id=\&quot;lOR4bMpGyMRO_kZdtfmL\&quot;&gt;&lt;mxGraphModel dx=\&quot;2906\&quot; dy=\&quot;1145\&quot; grid=\&quot;1\&quot; gridSize=\&quot;10\&quot; guides=\&quot;1\&quot; tooltips=\&quot;1\&quot; connect=\&quot;1\&quot; arrows=\&quot;1\&quot; fold=\&quot;1\&quot; page=\&quot;1\&quot; pageScale=\&quot;1\&quot; pageWidth=\&quot;850\&quot; pageHeight=\&quot;1100\&quot; math=\&quot;0\&quot; shadow=\&quot;0\&quot;&gt;&lt;root&gt;&lt;mxCell id=\&quot;0\&quot;/&gt;&lt;mxCell id=\&quot;1\&quot; parent=\&quot;0\&quot;/&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-1\&quot; value=\&quot;\&quot; style=\&quot;ellipse;whiteSpace=wrap;html=1;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;160\&quot; y=\&quot;280\&quot; width=\&quot;110\&quot; height=\&quot;110\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-2\&quot; value=\&quot;\&quot; style=\&quot;rhombus;whiteSpace=wrap;html=1;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;425\&quot; y=\&quot;440\&quot; width=\&quot;80\&quot; height=\&quot;80\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-3\&quot; value=\&quot;\&quot; style=\&quot;curved=1;endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;\&quot; parent=\&quot;1\&quot; source=\&quot;ONV6jkYdQjc0UT6nOp9h-1\&quot; target=\&quot;ONV6jkYdQjc0UT6nOp9h-2\&quot; edge=\&quot;1\&quot;&gt;&lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxPoint x=\&quot;360\&quot; y=\&quot;330\&quot; as=\&quot;sourcePoint\&quot;/&gt;&lt;mxPoint x=\&quot;410\&quot; y=\&quot;280\&quot; as=\&quot;targetPoint\&quot;/&gt;&lt;Array as=\&quot;points\&quot;&gt;&lt;mxPoint x=\&quot;410\&quot; y=\&quot;330\&quot;/&gt;&lt;mxPoint x=\&quot;470\&quot; y=\&quot;380\&quot;/&gt;&lt;/Array&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-4\&quot; value=\&quot;Actor\&quot; style=\&quot;shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;410\&quot; y=\&quot;200\&quot; width=\&quot;30\&quot; height=\&quot;60\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-5\&quot; value=\&quot;Classname\&quot; style=\&quot;swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;190\&quot; y=\&quot;510\&quot; width=\&quot;140\&quot; height=\&quot;104\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-6\&quot; value=\&quot;+ field: type\&quot; style=\&quot;text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;\&quot; parent=\&quot;ONV6jkYdQjc0UT6nOp9h-5\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry y=\&quot;26\&quot; width=\&quot;140\&quot; height=\&quot;26\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-7\&quot; value=\&quot;+ field: type\&quot; style=\&quot;text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;\&quot; parent=\&quot;ONV6jkYdQjc0UT6nOp9h-5\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry y=\&quot;52\&quot; width=\&quot;140\&quot; height=\&quot;26\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;ONV6jkYdQjc0UT6nOp9h-8\&quot; value=\&quot;+ field: type\&quot; style=\&quot;text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;\&quot; parent=\&quot;ONV6jkYdQjc0UT6nOp9h-5\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry y=\&quot;78\&quot; width=\&quot;140\&quot; height=\&quot;26\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-1\&quot; value=\&quot;Cross-Functional Flowchart\&quot; style=\&quot;shape=table;childLayout=tableLayout;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;400\&quot; y=\&quot;610\&quot; width=\&quot;400\&quot; height=\&quot;400\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-2\&quot; value=\&quot;Actor 1\&quot; style=\&quot;shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry y=\&quot;40\&quot; width=\&quot;400\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-3\&quot; value=\&quot;Phase 1\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-2\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;40\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-4\&quot; value=\&quot;Phase 2\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-2\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;160\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-5\&quot; value=\&quot;Phase 3\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-2\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;280\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-6\&quot; value=\&quot;Actor 2\&quot; style=\&quot;shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry y=\&quot;160\&quot; width=\&quot;400\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-7\&quot; value=\&quot;\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-6\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;40\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-8\&quot; value=\&quot;\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-6\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;160\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-9\&quot; value=\&quot;\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-6\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;280\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-10\&quot; value=\&quot;Actor 3\&quot; style=\&quot;shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry y=\&quot;280\&quot; width=\&quot;400\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-11\&quot; value=\&quot;\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-10\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;40\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-12\&quot; value=\&quot;\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-10\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;160\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-13\&quot; value=\&quot;\&quot; style=\&quot;swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;fontSize=16;\&quot; parent=\&quot;cnKfD18OkZbouNPIWLYx-10\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;280\&quot; width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;&gt;&lt;mxRectangle width=\&quot;120\&quot; height=\&quot;120\&quot; as=\&quot;alternateBounds\&quot;/&gt;&lt;/mxGeometry&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-14\&quot; value=\&quot;\&quot; style=\&quot;rhombus;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=-1;hachureGap=8;fillStyle=cross-hatch;fillColor=#006600;sketch=1;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;40\&quot; y=\&quot;740\&quot; width=\&quot;120\&quot; height=\&quot;60\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;mxCell id=\&quot;cnKfD18OkZbouNPIWLYx-15\&quot; value=\&quot;Icon\&quot; style=\&quot;icon;html=1;image=img/clipart/Gear_128x128.png\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;&lt;mxGeometry x=\&quot;230\&quot; y=\&quot;760\&quot; width=\&quot;130\&quot; height=\&quot;120\&quot; as=\&quot;geometry\&quot;/&gt;&lt;/mxCell&gt;&lt;/root&gt;&lt;/mxGraphModel&gt;&lt;/diagram&gt;&lt;/mxfile&gt;&quot;,&quot;toolbar&quot;:&quot;pages zoom layers lightbox&quot;,&quot;page&quot;:0}"></div>
<script type="text/javascript" src="https://app.diagrams.net/js/viewer-static.min.js"></script>
</body>
</html>

]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress 插件inseri.swiss 之Cytoscape Block使用教程</title>
		<link>https://blog.mutadecheng.com/2024/06/05/wordpress-%e6%8f%92%e4%bb%b6inseri-swiss-%e4%b9%8bcytoscape-block%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b/</link>
		
		<dc:creator><![CDATA[木它]]></dc:creator>
		<pubDate>Wed, 05 Jun 2024 06:58:40 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://blog.mutadecheng.com/?p=161</guid>

					<description><![CDATA[插件官网https://docs.inseri.swiss/blocks/cytoscape/ 使用教程: 1 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>插件官网<a href="https://docs.inseri.swiss/blocks/cytoscape/">https://docs.inseri.swiss/blocks/cytoscape/</a></p>



<h2 class="wp-block-heading">使用教程:</h2>



<h3 class="wp-block-heading">1. 将elements(json格式)写入<strong>textEditor</strong>(插件带的区块)中</h3>



<div class="wp-block-inseri-core-text-editor" data-attributes="{&quot;blockId&quot;:&quot;AZjSjroIlho8AnxhTpyQk&quot;,&quot;blockName&quot;:&quot;textEditor-elements&quot;,&quot;content&quot;:&quot;{\n  \&quot;nodes\&quot;: [\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;a\&quot;, \&quot;label\&quot;: \&quot;Node A\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;b\&quot;, \&quot;label\&quot;: \&quot;Node B\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;c\&quot;, \&quot;label\&quot;: \&quot;Node C\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;d\&quot;, \&quot;label\&quot;: \&quot;Node D\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;e\&quot;, \&quot;label\&quot;: \&quot;Node E\&quot; } }\n  ],\n  \&quot;edges\&quot;: [\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;ae\&quot;, \&quot;weight\&quot;: 1, \&quot;source\&quot;: \&quot;a\&quot;, \&quot;target\&quot;: \&quot;e\&quot;, \&quot;label\&quot;: \&quot;A to E\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;ab\&quot;, \&quot;weight\&quot;: 3, \&quot;source\&quot;: \&quot;a\&quot;, \&quot;target\&quot;: \&quot;b\&quot;, \&quot;label\&quot;: \&quot;A to B\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;be\&quot;, \&quot;weight\&quot;: 4, \&quot;source\&quot;: \&quot;b\&quot;, \&quot;target\&quot;: \&quot;e\&quot;, \&quot;label\&quot;: \&quot;B to E\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;bc\&quot;, \&quot;weight\&quot;: 5, \&quot;source\&quot;: \&quot;b\&quot;, \&quot;target\&quot;: \&quot;c\&quot;, \&quot;label\&quot;: \&quot;B to C\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;ce\&quot;, \&quot;weight\&quot;: 6, \&quot;source\&quot;: \&quot;c\&quot;, \&quot;target\&quot;: \&quot;e\&quot;, \&quot;label\&quot;: \&quot;C to E\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;cd\&quot;, \&quot;weight\&quot;: 2, \&quot;source\&quot;: \&quot;c\&quot;, \&quot;target\&quot;: \&quot;d\&quot;, \&quot;label\&quot;: \&quot;C to D\&quot; } },\n    { \&quot;data\&quot;: { \&quot;id\&quot;: \&quot;de\&quot;, \&quot;weight\&quot;: 7, \&quot;source\&quot;: \&quot;d\&quot;, \&quot;target\&quot;: \&quot;e\&quot;, \&quot;label\&quot;: \&quot;D to E\&quot; } }\n  ]\n}\n&quot;,&quot;contentType&quot;:&quot;application/json&quot;,&quot;editable&quot;:false,&quot;height&quot;:436,&quot;isVisible&quot;:true,&quot;label&quot;:&quot;&quot;}">is loading &#8230;</div>



<h3 class="wp-block-heading">2. 将style(json格式)写入<strong>textEditor</strong>(插件带的区块)中</h3>



<div class="wp-block-inseri-core-text-editor" data-attributes="{&quot;blockId&quot;:&quot;1GqawWmwQb2fHFw4RzVMp&quot;,&quot;blockName&quot;:&quot;textEditor-style&quot;,&quot;content&quot;:&quot;[\n    {\n      \&quot;selector\&quot;: \&quot;node\&quot;,\n      \&quot;style\&quot;: {\n        \&quot;background-color\&quot;: \&quot;#666\&quot;,\n        \&quot;label\&quot;: \&quot;data(label)\&quot;\n      }\n    },\n    {\n      \&quot;selector\&quot;: \&quot;edge\&quot;,\n      \&quot;style\&quot;: {\n        \&quot;width\&quot;: 3,\n        \&quot;line-color\&quot;: \&quot;#ccc\&quot;,\n        \&quot;target-arrow-color\&quot;: \&quot;#ccc\&quot;,\n        \&quot;target-arrow-shape\&quot;: \&quot;triangle\&quot;,\n        \&quot;curve-style\&quot;: \&quot;bezier\&quot;,\n        \&quot;label\&quot;: \&quot;data(label)\&quot;\n      }\n    }\n  ]&quot;,&quot;contentType&quot;:&quot;application/json&quot;,&quot;editable&quot;:false,&quot;height&quot;:456,&quot;isVisible&quot;:true,&quot;label&quot;:&quot;&quot;}">is loading &#8230;</div>



<h3 class="wp-block-heading">3. 将layout(json格式)写入<strong>textEditor</strong>(插件带的区块)中</h3>



<div class="wp-block-inseri-core-text-editor" data-attributes="{&quot;blockId&quot;:&quot;bMtWCXbxVoRiiGZjH7sjU&quot;,&quot;blockName&quot;:&quot;textEditor-layout&quot;,&quot;content&quot;:&quot;{\n    \&quot;name\&quot;: \&quot;grid\&quot;,\n    \&quot;rows\&quot;: 2\n  }&quot;,&quot;contentType&quot;:&quot;application/json&quot;,&quot;editable&quot;:false,&quot;height&quot;:123,&quot;isVisible&quot;:true,&quot;label&quot;:&quot;&quot;}">is loading &#8230;</div>



<h3 class="wp-block-heading">4. 配置数据源为之气步骤的区块</h3>



<div class="wp-block-inseri-core-cytoscape" data-attributes="{&quot;blockId&quot;:&quot;aibtmAWdXHhpg82qKyRTw&quot;,&quot;blockName&quot;:&quot;cytoscape-BTt&quot;,&quot;height&quot;:625,&quot;inputKey&quot;:&quot;AZjSjroIlho8AnxhTpyQk/content&quot;,&quot;layout&quot;:&quot;dagre&quot;,&quot;layoutKey&quot;:&quot;bMtWCXbxVoRiiGZjH7sjU/content&quot;,&quot;styleKey&quot;:&quot;1GqawWmwQb2fHFw4RzVMp/content&quot;}">is loading &#8230;</div>



<h2 class="wp-block-heading">拓展:不想要插件的方式:</h2>



<p>另外,不想要插件的方式的话,因为此插件用的是Cytoscape.js,所以可以直接通过原生方式编写html,在wordpress中使用自定义html</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Cytoscape.js 示例&lt;/title&gt;
    &lt;script src=&quot;https://unpkg.com/cytoscape@3.21.0/dist/cytoscape.min.js&quot;&gt;&lt;/script&gt;
    &lt;!-- 引入Cytoscape.js --&gt;
    &lt;style&gt;
        #cy {
            width: 800px;
            height: 600px;
            display: block;
            position: relative;
            margin: 20px auto;
            border: 1px solid #ccc;
        }
        /* 设置图表容器的样式 */
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id=&quot;cy&quot;&gt;&lt;/div&gt; &lt;!-- 图表容器 --&gt;
    &lt;script&gt;
        var cy = cytoscape({
            container: document.getElementById('cy'), // 容器元素

            elements: [ // 列表形式的元素数据
                // 节点部分
                { data: { id: 'a' } },
                { data: { id: 'b' } },
                { data: { id: 'c' } },
                { data: { id: 'd' } },
                { data: { id: 'e' } },
                // 边部分
                { data: { id: 'ae', weight: 1, source: 'a', target: 'e' } },
                { data: { id: 'ab', weight: 3, source: 'a', target: 'b' } },
                { data: { id: 'be', weight: 4, source: 'b', target: 'e' } },
                { data: { id: 'bc', weight: 5, source: 'b', target: 'c' } },
                { data: { id: 'ce', weight: 6, source: 'c', target: 'e' } },
                { data: { id: 'cd', weight: 2, source: 'c', target: 'd' } },
                { data: { id: 'de', weight: 7, source: 'd', target: 'e' } }
            ],

            style: [ // 样式部分
                {
                    selector: 'node',
                    style: {
                        'background-color': '#666',
                        'label': 'data(id)'
                    }
                },
                {
                    selector: 'edge',
                    style: {
                        'width': 3,
                        'line-color': '#ccc',
                        'target-arrow-color': '#ccc',
                        'target-arrow-shape': 'triangle',
                        'curve-style': 'bezier',
                        'label': 'data(weight)'
                    }
                }
            ],

            layout: {
                name: 'grid',
                rows: 2
            }
        });
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #808080">&lt;!</span><span style="color: #569CD6">DOCTYPE</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4">Cytoscape.js 示例</span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">title</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">src</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;https://unpkg.com/cytoscape@3.21.0/dist/cytoscape.min.js&quot;</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #6A9955">&lt;!-- 引入Cytoscape.js --&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">style</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #D7BA7D">#cy</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">width</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">800px</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">height</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">600px</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">display</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">block</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">position</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">relative</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">margin</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">20px</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">auto</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">border</span><span style="color: #D4D4D4">: </span><span style="color: #B5CEA8">1px</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">solid</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">#ccc</span><span style="color: #D4D4D4">;</span></span>
<span class="line"><span style="color: #D4D4D4">        }</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #6A9955">/* 设置图表容器的样式 */</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">style</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">head</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">div</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">id</span><span style="color: #D4D4D4">=</span><span style="color: #CE9178">&quot;cy&quot;</span><span style="color: #808080">&gt;&lt;/</span><span style="color: #569CD6">div</span><span style="color: #808080">&gt;</span><span style="color: #D4D4D4"> </span><span style="color: #6A9955">&lt;!-- 图表容器 --&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;</span><span style="color: #569CD6">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #D4D4D4">        </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">cy</span><span style="color: #D4D4D4"> = </span><span style="color: #DCDCAA">cytoscape</span><span style="color: #D4D4D4">({</span></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">container:</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">document</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getElementById</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&#39;cy&#39;</span><span style="color: #D4D4D4">), </span><span style="color: #6A9955">// 容器元素</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">elements:</span><span style="color: #D4D4D4"> [ </span><span style="color: #6A9955">// 列表形式的元素数据</span></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #6A9955">// 节点部分</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;a&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;b&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;c&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;d&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;e&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #6A9955">// 边部分</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;ae&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;a&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;e&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;ab&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">3</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;a&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;b&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;be&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">4</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;b&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;e&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;bc&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">5</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;b&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;c&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;ce&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">6</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;c&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;e&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;cd&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">2</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;c&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;d&#39;</span><span style="color: #D4D4D4"> } },</span></span>
<span class="line"><span style="color: #D4D4D4">                { </span><span style="color: #9CDCFE">data:</span><span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">id:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;de&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">weight:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">7</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">source:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;d&#39;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">target:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;e&#39;</span><span style="color: #D4D4D4"> } }</span></span>
<span class="line"><span style="color: #D4D4D4">            ],</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">style:</span><span style="color: #D4D4D4"> [ </span><span style="color: #6A9955">// 样式部分</span></span>
<span class="line"><span style="color: #D4D4D4">                {</span></span>
<span class="line"><span style="color: #D4D4D4">                    </span><span style="color: #9CDCFE">selector:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;node&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                    </span><span style="color: #9CDCFE">style:</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;background-color&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;#666&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;label&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;data(id)&#39;</span></span>
<span class="line"><span style="color: #D4D4D4">                    }</span></span>
<span class="line"><span style="color: #D4D4D4">                },</span></span>
<span class="line"><span style="color: #D4D4D4">                {</span></span>
<span class="line"><span style="color: #D4D4D4">                    </span><span style="color: #9CDCFE">selector:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;edge&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                    </span><span style="color: #9CDCFE">style:</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;width&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">3</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;line-color&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;#ccc&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;target-arrow-color&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;#ccc&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;target-arrow-shape&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;triangle&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;curve-style&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;bezier&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                        </span><span style="color: #CE9178">&#39;label&#39;</span><span style="color: #9CDCFE">:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;data(weight)&#39;</span></span>
<span class="line"><span style="color: #D4D4D4">                    }</span></span>
<span class="line"><span style="color: #D4D4D4">                }</span></span>
<span class="line"><span style="color: #D4D4D4">            ],</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D4D4D4">            </span><span style="color: #9CDCFE">layout:</span><span style="color: #D4D4D4"> {</span></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #9CDCFE">name:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&#39;grid&#39;</span><span style="color: #D4D4D4">,</span></span>
<span class="line"><span style="color: #D4D4D4">                </span><span style="color: #9CDCFE">rows:</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">2</span></span>
<span class="line"><span style="color: #D4D4D4">            }</span></span>
<span class="line"><span style="color: #D4D4D4">        });</span></span>
<span class="line"><span style="color: #D4D4D4">    </span><span style="color: #808080">&lt;/</span><span style="color: #569CD6">script</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">body</span><span style="color: #808080">&gt;</span></span>
<span class="line"><span style="color: #808080">&lt;/</span><span style="color: #569CD6">html</span><span style="color: #808080">&gt;</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading">效果如下:</h3>



<!DOCTYPE html>
<html>
<head>
    <title>Cytoscape.js 示例</title>
    <script src="https://unpkg.com/cytoscape@3.21.0/dist/cytoscape.min.js"></script>
    <!-- 引入Cytoscape.js -->
    <style>
        #cy {
            width: 800px;
            height: 600px;
            display: block;
            position: relative;
            margin: 20px auto;
            border: 1px solid #ccc;
        }
        /* 设置图表容器的样式 */
    </style>
</head>
<body>
    <div id="cy"></div> <!-- 图表容器 -->
    <script>
        var cy = cytoscape({
            container: document.getElementById('cy'), // 容器元素

            elements: [ // 列表形式的元素数据
                // 节点部分
                { data: { id: 'a' } },
                { data: { id: 'b' } },
                { data: { id: 'c' } },
                { data: { id: 'd' } },
                { data: { id: 'e' } },
                // 边部分
                { data: { id: 'ae', weight: 1, source: 'a', target: 'e' } },
                { data: { id: 'ab', weight: 3, source: 'a', target: 'b' } },
                { data: { id: 'be', weight: 4, source: 'b', target: 'e' } },
                { data: { id: 'bc', weight: 5, source: 'b', target: 'c' } },
                { data: { id: 'ce', weight: 6, source: 'c', target: 'e' } },
                { data: { id: 'cd', weight: 2, source: 'c', target: 'd' } },
                { data: { id: 'de', weight: 7, source: 'd', target: 'e' } }
            ],

            style: [ // 样式部分
                {
                    selector: 'node',
                    style: {
                        'background-color': '#666',
                        'label': 'data(id)'
                    }
                },
                {
                    selector: 'edge',
                    style: {
                        'width': 3,
                        'line-color': '#ccc',
                        'target-arrow-color': '#ccc',
                        'target-arrow-shape': 'triangle',
                        'curve-style': 'bezier',
                        'label': 'data(weight)'
                    }
                }
            ],

            layout: {
                name: 'grid',
                rows: 2
            }
        });
    </script>
</body>
</html>

]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
