Skip to content

Instantly share code, notes, and snippets.

@vipzhicheng
Created April 16, 2022 05:07
Show Gist options
  • Save vipzhicheng/f5e214a3ea64f53b6d3d0639946bd69e to your computer and use it in GitHub Desktop.
Save vipzhicheng/f5e214a3ea64f53b6d3d0639946bd69e to your computer and use it in GitHub Desktop.
Logseq Text Wrapper Config
{
"disabled": false,
"toolbar": true,
"wrap-link": {
"label": "Wrap Link",
"binding": "",
"template": "[[$^]]",
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <g clip-path=\"url(#clip0_101_2)\"> <path d=\"M0.114075 14.9953V5.10858H3.19611V6.35077H1.72345V13.7492H3.19611V14.9953H0.114075ZM4.61505 14.9953V5.10858H7.69708V6.35077H6.22443V13.7492H7.69708V14.9953H4.61505ZM10.7957 3.47186V16.6281H9.21759V3.47186H10.7957ZM15.4022 5.10858V14.9953H12.3201V13.7492H13.7928V6.35077H12.3201V5.10858H15.4022ZM19.9031 5.10858V14.9953H16.8211V13.7492H18.2938V6.35077H16.8211V5.10858H19.9031Z\" fill=\"white\"/> </g> <defs> <clipPath id=\"clip0_101_2\"> <rect width=\"20\" height=\"20\" fill=\"white\"/> </clipPath> </defs> </svg>"
},
"wrap-highlight": {
"label": "Wrap Highlight",
"binding": "",
"template": "==$^==",
"icon": "<svg t=\"1650084261132\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"7775\" width=\"200\" height=\"200\"><path d=\"M128 320m37.162667 0l693.674666 0q37.162667 0 37.162667 37.162667l0 309.674666q0 37.162667-37.162667 37.162667l-693.674666 0q-37.162667 0-37.162667-37.162667l0-309.674666q0-37.162667 37.162667-37.162667Z\" fill=\"#FDDC1C\" p-id=\"7776\"></path><path d=\"M800 128a32 32 0 0 1 31.900444 34.488889c0.071111 0.881778 0.099556 1.777778 0.099556 2.673778v74.837333a32 32 0 1 1-64 0L767.985778 192H544v639.985778l64 0.014222a32 32 0 1 1 0 64H512l-0.369778-0.014222L416 896a32 32 0 1 1 0-64l64-0.014222V192H256v48a32 32 0 1 1-64 0V165.162667c0-0.896 0.028444-1.792 0.099556-2.673778A32 32 0 0 1 224 128h576z\" fill=\"#ffffff\" p-id=\"7777\" data-spm-anchor-id=\"a313x.7781069.0.i0\" class=\"selected\"></path></svg>"
},
"wrap-bold": {
"label": "Wrap bold",
"binding": "",
"template": "**$^**",
"icon": "<svg t=\"1644033307902\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1224\" width=\"200\" height=\"200\"><path d=\"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238z m366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z\" p-id=\"1225\" fill=\"#eee\"></path></svg>"
},
"wrap-italic": {
"label": "Wrap italic",
"binding": "mod+shift+i",
"template": "*$^*",
"icon": "<svg t=\"1644033462513\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2021\" width=\"200\" height=\"200\"><path d=\"M382.72 810.666667L542.72 213.333333H426.666667a42.666667 42.666667 0 1 1 0-85.333333h341.333333a42.666667 42.666667 0 0 1 0 85.333333h-136.874667L471.04 810.666667H597.333333a42.666667 42.666667 0 0 1 0 85.333333H256a42.666667 42.666667 0 0 1 0-85.333333h126.72z\" fill=\"#eee\" p-id=\"2022\"></path></svg>"
},
"wrap-strike-through": {
"label": "Wrap strike through",
"binding": "",
"template": "~~$^~~",
"icon": "<svg t=\"1647222242775\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1518\" width=\"200\" height=\"200\"><path d=\"M1014.869333 468.650667H578.161778c-11.406222-2.275556-23.409778-4.579556-36.124445-6.855111a2110.094222 2110.094222 0 0 1-35.185777-6.627556c-58.624-11.434667-93.923556-22.869333-122.026667-39.111111-40.135111-23.409778-59.676444-55.182222-59.676445-97.251556 0-42.268444 17.351111-77.368889 50.289778-101.717333 32.426667-23.978667 78.620444-36.693333 133.489778-36.693333 62.606222 0 110.933333 16.497778 143.758222 48.924444a144.839111 144.839111 0 0 1 36.352 60.131556c1.479111 4.664889 3.185778 11.406222 4.892445 20.337777 1.052444 5.489778 5.973333 9.386667 11.320889 9.386667h83.2a11.576889 11.576889 0 0 0 11.548444-11.576889v-1.137778a268.629333 268.629333 0 0 0-2.275556-18.289777C789.333333 238.478222 765.724444 194.844444 729.486222 162.133333c-50.744889-46.307556-125.383111-70.627556-215.665778-70.627555-82.631111 0-157.013333 20.679111-209.464888 58.168889-29.269333 21.048889-51.911111 47.075556-66.986667 77.368889-15.416889 30.976-23.210667 66.730667-23.210667 106.154666 0 33.735111 6.542222 62.293333 19.797334 87.438222 9.472 17.92 22.385778 33.706667 38.968888 48.014223H9.102222a9.159111 9.159111 0 0 0-9.130666 9.130666v68.551111c0 5.034667 4.124444 9.159111 9.130666 9.159112h495.104l6.741334 1.365333c35.299556 7.111111 56.576 11.889778 76.117333 17.379555 26.282667 7.424 46.392889 15.217778 63.089778 24.576 40.903111 23.096889 60.899556 56.234667 60.899555 101.717334 0 40.334222-17.720889 76.344889-49.834666 101.489778-34.844444 27.306667-86.385778 41.585778-149.134223 41.585777-49.948444 0-92.216889-9.699556-125.952-28.558222-33.251556-18.631111-56.092444-45.511111-68.209777-79.445333a122.965333 122.965333 0 0 1-3.100445-10.268445 11.690667 11.690667 0 0 0-11.093333-8.590222H212.707556a11.576889 11.576889 0 0 0-11.548445 11.548445v1.137777c0.227556 2.645333 0.483556 4.835556 0.711111 6.542223 7.395556 55.751111 34.616889 101.461333 80.782222 135.765333 53.845333 39.765333 129.592889 60.785778 219.192889 60.785778 96.227556 0 176.924444-22.613333 233.386667-65.479111a215.893333 215.893333 0 0 0 65.251556-78.876445c14.848-30.947556 22.528-66.161778 22.528-104.561778 0-36.323556-6.627556-66.730667-20.366223-93.013333a157.184 157.184 0 0 0-24.888889-35.214222h237.141334a9.159111 9.159111 0 0 0 9.130666-9.130667v-68.579555a9.159111 9.159111 0 0 0-9.130666-9.016889z\" p-id=\"1519\" fill=\"#eee\"></path></svg>"
},
"wrap-cloze": {
"label": "Wrap with cloze",
"binding": "",
"template": " {{cloze $^}}",
"icon": "<svg t=\"1643261888324\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"5478\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><defs><style type=\"text/css\"></style></defs><path d=\"M341.333333 396.8V320H170.666667v384h170.666666v-76.8H256V396.8zM682.666667 396.8V320h170.666666v384h-170.666666v-76.8h85.333333V396.8zM535.04 533.333333h40.96v-42.666666h-40.96V203.093333l92.16-24.746666-11.093333-40.96-102.4 27.306666-102.4-27.306666-11.093334 40.96 92.16 24.746666v287.573334H448v42.666666h44.373333v287.573334l-92.16 24.746666 11.093334 40.96 102.4-27.306666 102.4 27.306666 11.093333-40.96-92.16-24.746666z\" p-id=\"5479\" fill=\"#eeeeee\"></path></svg>"
},
"repl-clear": {
"label": "Remove formatting",
"binding": "mod+shift+x",
"regex": "\\[\\[(?:#|\\$)(?:red|green|blue)\\]\\]|{{cloze (.*?)}}|\\[\\[([^\\[]*?)\\]\\]|==([^=]*)==|~~([^~]*)~~|\\^\\^([^\\^]*)\\^\\^|\\*\\*([^\\*]*)\\*\\*|\\*([^\\*]*)\\*|_([^_]*)_|\\$([^\\$]*)\\$",
"replacement": "$1$2$3$4$5$6",
"icon": "<svg t=\"1643381967522\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1377\" width=\"200\" height=\"200\"><path d=\"M824.4 438.8c0-37.6-30-67.6-67.6-67.6l-135.2 0L621.6 104.8c0-37.6-30-67.6-67.6-67.6-37.6 0-67.6 30-67.6 67.6l0 266.4L358.8 371.2c-37.6 0-67.6 30-67.6 67.6l0 67.6L828 506.4l0-67.6L824.4 438.8 824.4 438.8zM824.4 574c-11.2 0-536.8 0-536.8 0S250 972 88.4 972L280 972c75.2 0 108.8-217.6 108.8-217.6s33.6 195.2 3.6 217.6l105.2 0c-3.6 0 0 0 11.2 0 52.4-7.6 60-247.6 60-247.6s52.4 244 45.2 244c-26.4 0-78.8 0-105.2 0l0 0 154 0c-7.6 0 0 0 11.2 0 48.8-11.2 52.4-187.6 52.4-187.6s22.4 187.6 15.2 187.6c-18.8 0-48.8 0-67.6 0l-3.6 0 90 0C895.6 972 903.2 784.4 824.4 574L824.4 574z\" p-id=\"1378\" fill=\"#eeeeee\"></path></svg>"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment