Introduce text editor toolbar (#2315)

Tada!
This commit is contained in:
Jeremy Ruston 2016-04-22 08:36:29 +01:00
parent 4dd701c2dd
commit 2adf09129d
234 changed files with 3899 additions and 999 deletions

View File

@ -1,6 +0,0 @@
title: $:/core/images/auto-height
tags: $:/tags/Image
<svg class="tc-image-auto-height tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<path d="M67.9867828,114.356363 L67.9579626,99.8785426 C67.9550688,98.4248183 67.1636987,97.087107 65.8909901,96.3845863 L49.9251455,87.5716209 L47.992126,95.0735397 L79.8995411,95.0735397 C84.1215894,95.0735397 85.4638131,89.3810359 81.686497,87.4948823 L49.7971476,71.5713518 L48.0101917,79.1500092 L79.992126,79.1500092 C84.2093753,79.1500092 85.5558421,73.4676733 81.7869993,71.5753162 L49.805065,55.517008 L48.0101916,63.0917009 L79.9921259,63.0917015 C84.2035118,63.0917016 85.5551434,57.4217887 81.7966702,55.5218807 L65.7625147,47.4166161 L67.9579705,50.9864368 L67.9579705,35.6148245 L77.1715737,44.8284272 C78.7336709,46.3905243 81.2663308,46.3905243 82.8284279,44.8284271 C84.390525,43.2663299 84.390525,40.7336699 82.8284278,39.1715728 L66.8284271,23.1715728 C65.2663299,21.6094757 62.73367,21.6094757 61.1715729,23.1715729 L45.1715729,39.1715729 C43.6094757,40.73367 43.6094757,43.26633 45.1715729,44.8284271 C46.73367,46.3905243 49.26633,46.3905243 50.8284271,44.8284271 L59.9579705,35.6988837 L59.9579705,50.9864368 C59.9579705,52.495201 60.806922,53.8755997 62.1534263,54.5562576 L78.1875818,62.6615223 L79.9921261,55.0917015 L48.0101917,55.0917009 C43.7929424,55.0917008 42.4464755,60.7740368 46.2153183,62.6663939 L78.1972526,78.7247021 L79.992126,71.1500092 L48.0101917,71.1500092 C43.7881433,71.1500092 42.4459197,76.842513 46.2232358,78.7286665 L78.1125852,94.6521971 L79.8995411,87.0735397 L47.992126,87.0735397 C43.8588276,87.0735397 42.4404876,92.5780219 46.0591064,94.5754586 L62.024951,103.388424 L59.9579785,99.8944677 L59.9867142,114.32986 L50.8284271,105.171573 C49.26633,103.609476 46.73367,103.609476 45.1715729,105.171573 C43.6094757,106.73367 43.6094757,109.26633 45.1715729,110.828427 L61.1715729,126.828427 C62.73367,128.390524 65.2663299,128.390524 66.8284271,126.828427 L82.8284278,110.828427 C84.390525,109.26633 84.390525,106.73367 82.8284279,105.171573 C81.2663308,103.609476 78.7336709,103.609476 77.1715737,105.171573 L67.9867828,114.356363 L67.9867828,114.356363 Z M16,20 L112,20 C114.209139,20 116,18.209139 116,16 C116,13.790861 114.209139,12 112,12 L16,12 C13.790861,12 12,13.790861 12,16 C12,18.209139 13.790861,20 16,20 L16,20 Z"></path>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/bold
tags: $:/tags/Image
<svg class="tc-image-bold tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M41.1456583,51.8095238 L41.1456583,21.8711485 L67.4985994,21.8711485 C70.0084159,21.8711485 72.4285598,22.0802967 74.7591036,22.4985994 C77.0896475,22.9169022 79.1512515,23.6638602 80.9439776,24.7394958 C82.7367036,25.8151314 84.170863,27.3090474 85.2464986,29.2212885 C86.3221342,31.1335296 86.859944,33.5835518 86.859944,36.5714286 C86.859944,41.9496067 85.2465147,45.8337882 82.0196078,48.2240896 C78.792701,50.614391 74.6694929,51.8095238 69.6498599,51.8095238 L41.1456583,51.8095238 Z M13,0 L13,128 L75.0280112,128 C80.7647346,128 86.3519803,127.28292 91.789916,125.848739 C97.2278517,124.414559 102.068139,122.203563 106.310924,119.215686 C110.553709,116.22781 113.929959,112.373506 116.439776,107.652661 C118.949592,102.931816 120.204482,97.3445701 120.204482,90.8907563 C120.204482,82.8832466 118.262391,76.0411115 114.378151,70.3641457 C110.493911,64.6871798 104.607883,60.7133634 96.719888,58.442577 C102.456611,55.6937304 106.788968,52.1680887 109.717087,47.8655462 C112.645206,43.5630037 114.109244,38.1849062 114.109244,31.7310924 C114.109244,25.7553389 113.123259,20.7357813 111.151261,16.6722689 C109.179262,12.6087565 106.400578,9.35201972 102.815126,6.90196078 C99.2296739,4.45190185 94.927196,2.68908101 89.907563,1.61344538 C84.8879301,0.537809748 79.3305627,0 73.2352941,0 L13,0 Z M41.1456583,106.128852 L41.1456583,70.9915966 L71.8011204,70.9915966 C77.896389,70.9915966 82.7964334,72.3958776 86.5014006,75.2044818 C90.2063677,78.0130859 92.0588235,82.7039821 92.0588235,89.2773109 C92.0588235,92.6237329 91.4911355,95.3725383 90.3557423,97.5238095 C89.2203491,99.6750808 87.6965548,101.378145 85.7843137,102.633053 C83.8720726,103.887961 81.661077,104.784311 79.1512605,105.322129 C76.641444,105.859947 74.0121519,106.128852 71.2633053,106.128852 L41.1456583,106.128852 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/erase
tags: $:/tags/Image
<svg class="tc-image-erase tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M60.0870401,127.996166 L123.102318,64.980888 C129.636723,58.4464827 129.629513,47.8655877 123.098967,41.3350425 L99.4657866,17.7018617 C92.927448,11.1635231 82.3486358,11.1698163 75.8199411,17.698511 L4.89768189,88.6207702 C-1.63672343,95.1551755 -1.6295126,105.736071 4.90103262,112.266616 L20.6305829,127.996166 L60.0870401,127.996166 Z M25.1375576,120.682546 L10.812569,106.357558 C7.5455063,103.090495 7.54523836,97.793808 10.8048093,94.5342371 L46.2691086,59.0699377 L81.7308914,94.5317205 L55.5800654,120.682546 L25.1375576,120.682546 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/excise
tags: $:/tags/Image
<svg class="tc-image-excise tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M56,107.313709 L53.6568542,109.656854 C50.5326599,112.781049 45.4673401,112.781049 42.3431457,109.656854 C39.2189514,106.53266 39.2189514,101.46734 42.3431458,98.3431457 L58.3431458,82.3431457 C61.4673401,79.2189514 66.5326599,79.2189514 69.6568542,82.3431458 L85.6568542,98.3431458 C88.7810486,101.46734 88.7810486,106.53266 85.6568542,109.656854 C82.5326599,112.781049 77.4673401,112.781049 74.3431458,109.656854 L72,107.313708 L72,121.597798 C72,125.133636 68.418278,128 64,128 C59.581722,128 56,125.133636 56,121.597798 L56,107.313709 Z M0,40.0070969 C0,35.5848994 3.59071231,32 8,32 C12.418278,32 16,35.5881712 16,40.0070969 L16,71.9929031 C16,76.4151006 12.4092877,80 8,80 C3.581722,80 0,76.4118288 0,71.9929031 L0,40.0070969 Z M32,40.0070969 C32,35.5848994 35.5907123,32 40,32 C44.418278,32 48,35.5881712 48,40.0070969 L48,71.9929031 C48,76.4151006 44.4092877,80 40,80 C35.581722,80 32,76.4118288 32,71.9929031 L32,40.0070969 Z M80,40.0070969 C80,35.5848994 83.5907123,32 88,32 C92.418278,32 96,35.5881712 96,40.0070969 L96,71.9929031 C96,76.4151006 92.4092877,80 88,80 C83.581722,80 80,76.4118288 80,71.9929031 L80,40.0070969 Z M56,8.00709688 C56,3.58489938 59.5907123,0 64,0 C68.418278,0 72,3.58817117 72,8.00709688 L72,39.9929031 C72,44.4151006 68.4092877,48 64,48 C59.581722,48 56,44.4118288 56,39.9929031 L56,8.00709688 Z M112,40.0070969 C112,35.5848994 115.590712,32 120,32 C124.418278,32 128,35.5881712 128,40.0070969 L128,71.9929031 C128,76.4151006 124.409288,80 120,80 C115.581722,80 112,76.4118288 112,71.9929031 L112,40.0070969 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/fixed-height
tags: $:/tags/Image
<svg class="tc-image-fixed-height tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M60,35.6568542 L50.8284271,44.8284271 C49.26633,46.3905243 46.73367,46.3905243 45.1715729,44.8284271 C43.6094757,43.26633 43.6094757,40.73367 45.1715729,39.1715729 L61.1715729,23.1715729 C62.73367,21.6094757 65.2663299,21.6094757 66.8284271,23.1715728 L82.8284278,39.1715728 C84.390525,40.7336699 84.390525,43.2663299 82.8284279,44.8284271 C81.2663308,46.3905243 78.7336709,46.3905243 77.1715737,44.8284272 L68,35.6568539 L68,93.3431461 L77.1715737,84.1715728 C78.7336709,82.6094757 81.2663308,82.6094757 82.8284279,84.1715729 C84.390525,85.7336701 84.390525,88.2663301 82.8284278,89.8284272 L66.8284271,105.828427 C65.2663299,107.390524 62.73367,107.390524 61.1715729,105.828427 L45.1715729,89.8284271 C43.6094757,88.26633 43.6094757,85.73367 45.1715729,84.1715729 C46.73367,82.6094757 49.26633,82.6094757 50.8284271,84.1715729 L60,93.3431458 L60,35.6568542 L60,35.6568542 Z M16,116 L112,116 C114.209139,116 116,114.209139 116,112 C116,109.790861 114.209139,108 112,108 L16,108 C13.790861,108 12,109.790861 12,112 C12,114.209139 13.790861,116 16,116 L16,116 Z M16,20 L112,20 C114.209139,20 116,18.209139 116,16 C116,13.790861 114.209139,12 112,12 L16,12 C13.790861,12 12,13.790861 12,16 C12,18.209139 13.790861,20 16,20 L16,20 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/heading-1
tags: $:/tags/Image
<svg class="tc-image-heading-1 tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M14,30 L27.25,30 L27.25,60.104 L61.7,60.104 L61.7,30 L74.95,30 L74.95,105.684 L61.7,105.684 L61.7,71.552 L27.25,71.552 L27.25,105.684 L14,105.684 L14,30 Z M84.3350766,43.78 C86.8790893,43.78 89.3523979,43.5680021 91.7550766,43.144 C94.1577553,42.7199979 96.3307336,42.0133383 98.2740766,41.024 C100.21742,40.0346617 101.87807,38.7626744 103.256077,37.208 C104.634084,35.6533256 105.535075,33.7453446 105.959077,31.484 L115.817077,31.484 L115.817077,105.684 L102.567077,105.684 L102.567077,53.32 L84.3350766,53.32 L84.3350766,43.78 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/heading-2
tags: $:/tags/Image
<svg class="tc-image-heading-2 tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M125.519077,105.684 L74.8510766,105.684 C74.9217436,99.5359693 76.4057288,94.1653563 79.3030766,89.572 C82.2004244,84.9786437 86.1577182,80.986017 91.1750766,77.594 C93.5777553,75.8273245 96.0863969,74.113675 98.7010766,72.453 C101.315756,70.792325 103.718399,69.0080095 105.909077,67.1 C108.099754,65.1919905 109.901736,63.1250111 111.315077,60.899 C112.728417,58.6729889 113.47041,56.1113478 113.541077,53.214 C113.541077,51.8713266 113.382078,50.4403409 113.064077,48.921 C112.746075,47.4016591 112.127748,45.9883399 111.209077,44.681 C110.290405,43.3736601 109.018418,42.2783377 107.393077,41.395 C105.767735,40.5116622 103.647756,40.07 101.033077,40.07 C98.6303979,40.07 96.6340846,40.5469952 95.0440766,41.501 C93.4540687,42.4550048 92.1820814,43.762325 91.2280766,45.423 C90.2740719,47.083675 89.5674123,49.0446554 89.1080766,51.306 C88.648741,53.5673446 88.3837436,56.0053203 88.3130766,58.62 L76.2290766,58.62 C76.2290766,54.5213128 76.7767378,50.7230175 77.8720766,47.225 C78.9674154,43.7269825 80.610399,40.7060127 82.8010766,38.162 C84.9917542,35.6179873 87.6593942,33.6216739 90.8040766,32.173 C93.948759,30.7243261 97.6057224,30 101.775077,30 C106.297766,30 110.078395,30.7419926 113.117077,32.226 C116.155758,33.7100074 118.611401,35.5826554 120.484077,37.844 C122.356753,40.1053446 123.681739,42.5609868 124.459077,45.211 C125.236414,47.8610133 125.625077,50.3873213 125.625077,52.79 C125.625077,55.7580148 125.165748,58.4433213 124.247077,60.846 C123.328405,63.2486787 122.091751,65.4569899 120.537077,67.471 C118.982402,69.4850101 117.215753,71.3399915 115.237077,73.036 C113.2584,74.7320085 111.209087,76.3219926 109.089077,77.806 C106.969066,79.2900074 104.849087,80.7033266 102.729077,82.046 C100.609066,83.3886734 98.6480856,84.7313266 96.8460766,86.074 C95.0440676,87.4166734 93.47175,88.8123261 92.1290766,90.261 C90.7864032,91.7096739 89.8677458,93.2466585 89.3730766,94.872 L125.519077,94.872 L125.519077,105.684 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/heading-3
tags: $:/tags/Image
<svg class="tc-image-heading-3 tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M94.8850766,62.224 C96.8637532,62.294667 98.8424001,62.1533351 100.821077,61.8 C102.799753,61.4466649 104.566402,60.8283378 106.121077,59.945 C107.675751,59.0616623 108.930072,57.8426744 109.884077,56.288 C110.838081,54.7333256 111.315077,52.8253446 111.315077,50.564 C111.315077,47.3839841 110.237421,44.8400095 108.082077,42.932 C105.926733,41.0239905 103.153094,40.07 99.7610766,40.07 C97.641066,40.07 95.8037511,40.4939958 94.2490766,41.342 C92.6944022,42.1900042 91.4047484,43.3383261 90.3800766,44.787 C89.3554048,46.2356739 88.5957458,47.860991 88.1010766,49.663 C87.6064075,51.465009 87.3944096,53.3199905 87.4650766,55.228 L75.3810766,55.228 C75.5224107,51.623982 76.1937373,48.2850154 77.3950766,45.211 C78.596416,42.1369846 80.2393995,39.4693446 82.3240766,37.208 C84.4087537,34.9466554 86.9350618,33.1800064 89.9030766,31.908 C92.8710915,30.6359936 96.2277246,30 99.9730766,30 C102.870424,30 105.714729,30.4239958 108.506077,31.272 C111.297424,32.1200042 113.806065,33.3566585 116.032077,34.982 C118.258088,36.6073415 120.042403,38.6743208 121.385077,41.183 C122.72775,43.6916792 123.399077,46.5713171 123.399077,49.822 C123.399077,53.5673521 122.551085,56.8356527 120.855077,59.627 C119.159068,62.4183473 116.509095,64.4499936 112.905077,65.722 L112.905077,65.934 C117.145098,66.7820042 120.448731,68.8843166 122.816077,72.241 C125.183422,75.5976835 126.367077,79.6786426 126.367077,84.484 C126.367077,88.017351 125.660417,91.1796527 124.247077,93.971 C122.833736,96.7623473 120.925755,99.129657 118.523077,101.073 C116.120398,103.016343 113.329093,104.517995 110.149077,105.578 C106.969061,106.638005 103.612428,107.168 100.079077,107.168 C95.7683884,107.168 92.005426,106.549673 88.7900766,105.313 C85.5747272,104.076327 82.8894207,102.327345 80.7340766,100.066 C78.5787325,97.8046554 76.9357489,95.0840159 75.8050766,91.904 C74.6744043,88.7239841 74.0737436,85.1906861 74.0030766,81.304 L86.0870766,81.304 C85.9457426,85.8266893 87.0587315,89.5896517 89.4260766,92.593 C91.7934218,95.5963483 95.3443863,97.098 100.079077,97.098 C104.107097,97.098 107.481396,95.9496782 110.202077,93.653 C112.922757,91.3563219 114.283077,88.0880212 114.283077,83.848 C114.283077,80.9506522 113.717749,78.6540085 112.587077,76.958 C111.456404,75.2619915 109.972419,73.9723378 108.135077,73.089 C106.297734,72.2056623 104.230755,71.6580011 101.934077,71.446 C99.6373985,71.2339989 97.2877553,71.163333 94.8850766,71.234 L94.8850766,62.224 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/heading-4
tags: $:/tags/Image
<svg class="tc-image-heading-4 tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M8,30 L21.25,30 L21.25,60.104 L55.7,60.104 L55.7,30 L68.95,30 L68.95,105.684 L55.7,105.684 L55.7,71.552 L21.25,71.552 L21.25,105.684 L8,105.684 L8,30 Z M84.5890766,78.548 L107.061077,78.548 L107.061077,45.9 L106.849077,45.9 L84.5890766,78.548 Z M128.049077,88.088 L118.509077,88.088 L118.509077,105.684 L107.061077,105.684 L107.061077,88.088 L75.2610766,88.088 L75.2610766,76.11 L107.061077,31.484 L118.509077,31.484 L118.509077,78.548 L128.049077,78.548 L128.049077,88.088 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/heading-5
tags: $:/tags/Image
<svg class="tc-image-heading-5 tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M83.7550766,31.484 L122.127077,31.484 L122.127077,42.296 L92.7650766,42.296 L88.9490766,61.164 L89.1610766,61.376 C90.7864181,59.5386575 92.8533974,58.1430048 95.3620766,57.189 C97.8707558,56.2349952 100.361731,55.758 102.835077,55.758 C106.509762,55.758 109.795729,56.3763272 112.693077,57.613 C115.590424,58.8496729 118.0284,60.5809889 120.007077,62.807 C121.985753,65.0330111 123.487405,67.6653181 124.512077,70.704 C125.536748,73.7426819 126.049077,77.028649 126.049077,80.562 C126.049077,83.5300148 125.572081,86.5863176 124.618077,89.731 C123.664072,92.8756824 122.144754,95.7376538 120.060077,98.317 C117.9754,100.896346 115.30776,103.016325 112.057077,104.677 C108.806394,106.337675 104.919766,107.168 100.397077,107.168 C96.7930586,107.168 93.454092,106.691005 90.3800766,105.737 C87.3060613,104.782995 84.6030883,103.35201 82.2710766,101.444 C79.939065,99.5359905 78.0840835,97.1863473 76.7060766,94.395 C75.3280697,91.6036527 74.5684107,88.3353521 74.4270766,84.59 L86.5110766,84.59 C86.8644117,88.6180201 88.2423979,91.7096559 90.6450766,93.865 C93.0477553,96.0203441 96.2277235,97.098 100.185077,97.098 C102.729089,97.098 104.884401,96.6740042 106.651077,95.826 C108.417752,94.9779958 109.848738,93.8120074 110.944077,92.328 C112.039415,90.8439926 112.816741,89.1126766 113.276077,87.134 C113.735412,85.1553234 113.965077,83.0353446 113.965077,80.774 C113.965077,78.7246564 113.682413,76.763676 113.117077,74.891 C112.55174,73.018324 111.703749,71.3753404 110.573077,69.962 C109.442404,68.5486596 107.976086,67.4180042 106.174077,66.57 C104.372068,65.7219958 102.269755,65.298 99.8670766,65.298 C97.3230639,65.298 94.9380878,65.7749952 92.7120766,66.729 C90.4860655,67.6830048 88.8784149,69.4673203 87.8890766,72.082 L75.8050766,72.082 L83.7550766,31.484 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/heading-6
tags: $:/tags/Image
<svg class="tc-image-heading-6 tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M112.587077,50.246 C112.304409,47.2073181 111.226753,44.751676 109.354077,42.879 C107.481401,41.006324 104.955093,40.07 101.775077,40.07 C99.584399,40.07 97.6940846,40.4763293 96.1040766,41.289 C94.5140687,42.1016707 93.1714154,43.1793266 92.0760766,44.522 C90.9807378,45.8646734 90.0974133,47.401658 89.4260766,49.133 C88.7547399,50.864342 88.2070787,52.6839905 87.7830766,54.592 C87.3590745,56.5000095 87.0587442,58.390324 86.8820766,60.263 C86.7054091,62.135676 86.5464107,63.8846585 86.4050766,65.51 L86.6170766,65.722 C88.2424181,62.7539852 90.4860623,60.5456739 93.3480766,59.097 C96.2100909,57.6483261 99.3017267,56.924 102.623077,56.924 C106.297762,56.924 109.583729,57.5599936 112.481077,58.832 C115.378424,60.1040064 117.834067,61.8529889 119.848077,64.079 C121.862087,66.3050111 123.399071,68.9373181 124.459077,71.976 C125.519082,75.0146819 126.049077,78.300649 126.049077,81.834 C126.049077,85.438018 125.466082,88.7769846 124.300077,91.851 C123.134071,94.9250154 121.455754,97.6103219 119.265077,99.907 C117.074399,102.203678 114.459758,103.987994 111.421077,105.26 C108.382395,106.532006 105.025762,107.168 101.351077,107.168 C95.9097161,107.168 91.4400941,106.16101 87.9420766,104.147 C84.4440591,102.13299 81.6880867,99.3770175 79.6740766,95.879 C77.6600666,92.3809825 76.2644138,88.2823568 75.4870766,83.583 C74.7097394,78.8836432 74.3210766,73.8133605 74.3210766,68.372 C74.3210766,63.9199777 74.7980719,59.4326893 75.7520766,54.91 C76.7060814,50.3873107 78.278399,46.2710186 80.4690766,42.561 C82.6597542,38.8509815 85.5393921,35.8300117 89.1080766,33.498 C92.6767611,31.1659883 97.0757171,30 102.305077,30 C105.273091,30 108.064397,30.4946617 110.679077,31.484 C113.293756,32.4733383 115.608067,33.8513245 117.622077,35.618 C119.636087,37.3846755 121.27907,39.5046543 122.551077,41.978 C123.823083,44.4513457 124.529743,47.2073181 124.671077,50.246 L112.587077,50.246 Z M100.927077,97.098 C103.117754,97.098 105.025735,96.6563378 106.651077,95.773 C108.276418,94.8896623 109.636738,93.7413404 110.732077,92.328 C111.827415,90.9146596 112.640074,89.271676 113.170077,87.399 C113.700079,85.526324 113.965077,83.6006766 113.965077,81.622 C113.965077,79.6433234 113.700079,77.7353425 113.170077,75.898 C112.640074,74.0606575 111.827415,72.4530069 110.732077,71.075 C109.636738,69.6969931 108.276418,68.5840042 106.651077,67.736 C105.025735,66.8879958 103.117754,66.464 100.927077,66.464 C98.736399,66.464 96.8107516,66.8703293 95.1500766,67.683 C93.4894017,68.4956707 92.0937489,69.5909931 90.9630766,70.969 C89.8324043,72.3470069 88.9844128,73.9546575 88.4190766,75.792 C87.8537405,77.6293425 87.5710766,79.5726564 87.5710766,81.622 C87.5710766,83.6713436 87.8537405,85.6146575 88.4190766,87.452 C88.9844128,89.2893425 89.8324043,90.9323261 90.9630766,92.381 C92.0937489,93.8296739 93.4894017,94.9779958 95.1500766,95.826 C96.8107516,96.6740042 98.736399,97.098 100.927077,97.098 L100.927077,97.098 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/italic
tags: $:/tags/Image
<svg class="tc-image-italic tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<polygon points="66.7114846 0 89.1204482 0 62.4089636 128 40 128"></polygon>
</g>
</svg>

View File

@ -1,9 +0,0 @@
title: $:/core/images/line-width
tags: $:/tags/Image
<svg class="tc-image-line-width tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M128,-97 L112.992786,-97 C112.452362,-97 112,-96.5522847 112,-96 C112,-95.4438648 112.444486,-95 112.992786,-95 L128,-95 L128,-97 Z M128,-78.6794919 L111.216185,-88.3696322 C110.748163,-88.6398444 110.132549,-88.4782926 109.856406,-88 C109.578339,-87.5183728 109.741342,-86.9117318 110.216185,-86.6375814 L128,-76.3700908 L128,-78.6794919 Z M78.6794919,-128 L88.3696322,-111.216185 C88.6437826,-110.741342 88.4816272,-110.134474 88,-109.856406 C87.5217074,-109.580264 86.9077936,-109.748163 86.6375814,-110.216185 L76.3700908,-128 L78.6794919,-128 Z M97,-128 L97,-112.992786 C97,-112.444486 96.5561352,-112 96,-112 C95.4477153,-112 95,-112.452362 95,-112.992786 L95,-128 L97,-128 Z M115.629909,-128 L105.362419,-110.216185 C105.088268,-109.741342 104.481627,-109.578339 104,-109.856406 C103.521707,-110.132549 103.360156,-110.748163 103.630368,-111.216185 L113.320508,-128 L115.629909,-128 Z M128,-113.320508 L111.216185,-103.630368 C110.741342,-103.356217 110.134474,-103.518373 109.856406,-104 C109.580264,-104.478293 109.748163,-105.092206 110.216185,-105.362419 L128,-115.629909 L128,-113.320508 Z M48,-96 C48,-96.5522847 48.4523621,-97 48.9927864,-97 L79.0072136,-97 C79.5555144,-97 80,-96.5561352 80,-96 C80,-95.4477153 79.5476379,-95 79.0072136,-95 L48.9927864,-95 C48.4444856,-95 48,-95.4438648 48,-96 Z M54.4307806,-120 C54.706923,-120.478293 55.3225377,-120.639844 55.7905589,-120.369632 L81.7838153,-105.362419 C82.2586577,-105.088268 82.4216611,-104.481627 82.1435935,-104 C81.8674512,-103.521707 81.2518365,-103.360156 80.7838153,-103.630368 L54.7905589,-118.637581 C54.3157165,-118.911732 54.152713,-119.518373 54.4307806,-120 Z M104,-82.1435935 C104.478293,-82.4197359 105.092206,-82.2518365 105.362419,-81.7838153 L120.369632,-55.7905589 C120.643783,-55.3157165 120.481627,-54.7088482 120,-54.4307806 C119.521707,-54.1546382 118.907794,-54.3225377 118.637581,-54.7905589 L103.630368,-80.7838153 C103.356217,-81.2586577 103.518373,-81.865526 104,-82.1435935 Z M96,-80 C96.5522847,-80 97,-79.5476379 97,-79.0072136 L97,-48.9927864 C97,-48.4444856 96.5561352,-48 96,-48 C95.4477153,-48 95,-48.4523621 95,-48.9927864 L95,-79.0072136 C95,-79.5555144 95.4438648,-80 96,-80 Z M88,-82.1435935 C88.4782926,-81.8674512 88.6398444,-81.2518365 88.3696322,-80.7838153 L73.3624186,-54.7905589 C73.0882682,-54.3157165 72.4816272,-54.152713 72,-54.4307806 C71.5217074,-54.706923 71.3601556,-55.3225377 71.6303678,-55.7905589 L86.6375814,-81.7838153 C86.9117318,-82.2586577 87.5183728,-82.4216611 88,-82.1435935 Z M82.1435935,-88 C82.4197359,-87.5217074 82.2518365,-86.9077936 81.7838153,-86.6375814 L55.7905589,-71.6303678 C55.3157165,-71.3562174 54.7088482,-71.5183728 54.4307806,-72 C54.1546382,-72.4782926 54.3225377,-73.0922064 54.7905589,-73.3624186 L80.7838153,-88.3696322 C81.2586577,-88.6437826 81.865526,-88.4816272 82.1435935,-88 Z M1.30626177e-08,-41.9868843 L15.0170091,-57.9923909 L20.7983821,-52.9749272 L44.7207091,-81.2095939 L73.4260467,-42.1002685 L85.984793,-56.6159488 L104.48741,-34.0310661 L127.969109,-47.4978019 L127.969109,7.99473128e-07 L1.30626177e-08,7.99473128e-07 L1.30626177e-08,-41.9868843 Z M96,-84 C102.627417,-84 108,-89.372583 108,-96 C108,-102.627417 102.627417,-108 96,-108 C89.372583,-108 84,-102.627417 84,-96 C84,-89.372583 89.372583,-84 96,-84 Z"></path>
<path d="M16,18 L112,18 C113.104569,18 114,17.1045695 114,16 C114,14.8954305 113.104569,14 112,14 L16,14 C14.8954305,14 14,14.8954305 14,16 C14,17.1045695 14.8954305,18 16,18 L16,18 Z M16,35 L112,35 C114.209139,35 116,33.209139 116,31 C116,28.790861 114.209139,27 112,27 L16,27 C13.790861,27 12,28.790861 12,31 C12,33.209139 13.790861,35 16,35 L16,35 Z M16,56 L112,56 C115.313708,56 118,53.3137085 118,50 C118,46.6862915 115.313708,44 112,44 L16,44 C12.6862915,44 10,46.6862915 10,50 C10,53.3137085 12.6862915,56 16,56 L16,56 Z M16,85 L112,85 C117.522847,85 122,80.5228475 122,75 C122,69.4771525 117.522847,65 112,65 L16,65 C10.4771525,65 6,69.4771525 6,75 C6,80.5228475 10.4771525,85 16,85 L16,85 Z M16,128 L112,128 C120.836556,128 128,120.836556 128,112 C128,103.163444 120.836556,96 112,96 L16,96 C7.163444,96 0,103.163444 0,112 C0,120.836556 7.163444,128 16,128 L16,128 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/list-bullet
tags: $:/tags/Image
<svg class="tc-image-list-bullet tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M11.6363636,40.2727273 C18.0629498,40.2727273 23.2727273,35.0629498 23.2727273,28.6363636 C23.2727273,22.2097775 18.0629498,17 11.6363636,17 C5.20977746,17 0,22.2097775 0,28.6363636 C0,35.0629498 5.20977746,40.2727273 11.6363636,40.2727273 Z M11.6363636,75.1818182 C18.0629498,75.1818182 23.2727273,69.9720407 23.2727273,63.5454545 C23.2727273,57.1188684 18.0629498,51.9090909 11.6363636,51.9090909 C5.20977746,51.9090909 0,57.1188684 0,63.5454545 C0,69.9720407 5.20977746,75.1818182 11.6363636,75.1818182 Z M11.6363636,110.090909 C18.0629498,110.090909 23.2727273,104.881132 23.2727273,98.4545455 C23.2727273,92.0279593 18.0629498,86.8181818 11.6363636,86.8181818 C5.20977746,86.8181818 0,92.0279593 0,98.4545455 C0,104.881132 5.20977746,110.090909 11.6363636,110.090909 Z M34.9090909,22.8181818 L128,22.8181818 L128,34.4545455 L34.9090909,34.4545455 L34.9090909,22.8181818 Z M34.9090909,57.7272727 L128,57.7272727 L128,69.3636364 L34.9090909,69.3636364 L34.9090909,57.7272727 Z M34.9090909,92.6363636 L128,92.6363636 L128,104.272727 L34.9090909,104.272727 L34.9090909,92.6363636 Z"></path>
</g>
</svg>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
title: $:/core/images/mono-line
tags: $:/tags/Image
<svg class="tc-image-mono-line tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M60.4374591,84.522627 L61.3450888,84.522627 C63.2671377,84.522627 64.7264493,85.0120303 65.7230673,85.9908515 C66.7196852,86.9696727 67.2179868,88.4022896 67.2179868,90.288745 C67.2179868,92.3887615 66.6929905,93.9014625 65.6429823,94.8268935 C64.5929741,95.7523244 62.857817,96.215033 60.4374591,96.215033 L44.3670747,96.215033 C41.9111232,96.215033 40.1670679,95.7612227 39.1348565,94.8535884 C38.102645,93.9459542 37.586547,92.424355 37.586547,90.288745 C37.586547,88.2243221 38.102645,86.747214 39.1348565,85.8573766 C40.1670679,84.9675391 41.9111232,84.522627 44.3670747,84.522627 L46.235724,84.522627 L44.0467348,78.2759992 L20.9822627,78.2759992 L18.6864935,84.522627 L20.5551429,84.522627 C22.9755008,84.522627 24.7106579,84.9764373 25.7606661,85.8840716 C26.8106743,86.7917058 27.3356705,88.2599156 27.3356705,90.288745 C27.3356705,92.3887615 26.8106743,93.9014625 25.7606661,94.8268935 C24.7106579,95.7523244 22.9755008,96.215033 20.5551429,96.215033 L6.78052766,96.215033 C4.32457622,96.215033 2.58052094,95.7523244 1.54830946,94.8268935 C0.516097994,93.9014625 0,92.3887615 0,90.288745 C0,88.4022896 0.498301511,86.9696727 1.49491948,85.9908515 C2.49153745,85.0120303 3.95084902,84.522627 5.87289797,84.522627 L6.78052766,84.522627 L21.0890427,44.6937008 L16.8178442,44.6937008 C14.3974863,44.6937008 12.6623292,44.2309922 11.612321,43.3055613 C10.5623128,42.3801303 10.0373165,40.8852258 10.0373165,38.8208028 C10.0373165,36.7207864 10.5623128,35.2080854 11.612321,34.2826544 C12.6623292,33.3572234 14.3974863,32.8945149 16.8178442,32.8945149 L36.8390873,32.8945149 C40.0069087,32.8945149 42.231469,34.6029772 43.512835,38.0199531 L43.512835,38.180123 L60.4374591,84.522627 Z M32.4611088,44.6937008 L24.7195615,67.224273 L40.2026561,67.224273 L32.4611088,44.6937008 Z M89.5058233,68.5590225 L89.5058233,84.8429669 L97.5143205,84.8429669 C103.173687,84.8429669 107.160099,84.22009 109.473676,82.9743176 C111.787254,81.7285451 112.944025,79.6463566 112.944025,76.7276897 C112.944025,73.7734293 111.840643,71.6734444 109.633846,70.4276719 C107.427049,69.1818994 103.565213,68.5590225 98.0482204,68.5590225 L89.5058233,68.5590225 Z M116.734714,62.6327346 C120.614405,64.0564746 123.461842,66.0051894 125.277111,68.4789376 C127.092379,70.9526857 128,74.1115614 128,77.9556593 C128,81.1946677 127.216955,84.1488838 125.650841,86.8183962 C124.084727,89.4879087 121.84237,91.676876 118.923703,93.385364 C117.215215,94.3819819 115.302093,95.1027395 113.18428,95.5476582 C111.066467,95.9925769 108.06776,96.215033 104.188068,96.215033 L99.7033098,96.215033 L76.3184979,96.215033 C73.9693269,96.215033 72.2875593,95.7523244 71.2731446,94.8268935 C70.2587299,93.9014625 69.7515301,92.3887615 69.7515301,90.288745 C69.7515301,88.4022896 70.2320352,86.9696727 71.1930596,85.9908515 C72.1540841,85.0120303 73.5600062,84.522627 75.4108682,84.522627 L76.3184979,84.522627 L76.3184979,44.6937008 L75.4108682,44.6937008 C73.5600062,44.6937008 72.1540841,44.1953993 71.1930596,43.1987813 C70.2320352,42.2021633 69.7515301,40.7428518 69.7515301,38.8208028 C69.7515301,36.7563799 70.2676281,35.2525771 71.2998396,34.3093494 C72.3320511,33.3661217 74.0049204,32.8945149 76.3184979,32.8945149 L100.877889,32.8945149 C108.388118,32.8945149 114.09189,34.3538264 117.989378,37.2724934 C121.886867,40.1911603 123.835581,44.4623161 123.835581,50.0860889 C123.835581,52.8623819 123.239399,55.3093982 122.047017,57.4272114 C120.854635,59.5450246 119.083885,61.2801816 116.734714,62.6327346 L116.734714,62.6327346 Z M89.5058233,44.3733609 L89.5058233,57.8276363 L96.7134708,57.8276363 C101.091471,57.8276363 104.179161,57.3115383 105.976633,56.2793268 C107.774104,55.2471153 108.672827,53.50306 108.672827,51.0471086 C108.672827,48.7335312 107.863087,47.0428653 106.243583,45.9750604 C104.624078,44.9072554 101.999097,44.3733609 98.3685602,44.3733609 L89.5058233,44.3733609 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/new-image-button
tags: $:/tags/Image
<svg class="tc-image-new-image-button tc-image-button" viewBox="0 0 128 128" width="22pt" height="22pt">
<g fill-rule="evenodd">
<path d="M81.3619177,73.6270062 L97.1875317,46.2162388 C97.91364,44.9585822 97.4824378,43.3533085 96.2260476,42.6279312 L46.2162388,13.7547547 C44.9585822,13.0286463 43.3533085,13.4598485 42.6279312,14.7162388 L30.0575956,36.4886988 L40.0978909,31.2276186 C43.1404959,29.6333041 46.8692155,31.3421319 47.6479264,34.6877101 L51.2545483,52.3903732 L61.1353556,53.2399953 C63.2899974,53.4346096 65.1046382,54.9309951 65.706105,57.0091178 C65.7395572,57.1246982 65.8069154,57.3539875 65.9047035,57.6813669 C66.0696435,58.2335608 66.2581528,58.852952 66.4667073,59.5238092 C67.0618822,61.4383079 67.6960725,63.3742727 68.3393254,65.2021174 C68.5462918,65.7902259 68.7511789,66.3583016 68.953259,66.9034738 C69.5777086,68.5881157 70.1617856,70.0172008 70.6783305,71.110045 C70.9334784,71.6498566 71.1627732,72.0871602 71.4035746,72.5373068 C71.6178999,72.7492946 71.9508843,72.9623307 72.4151452,73.1586945 C73.5561502,73.6412938 75.1990755,73.899146 77.0720271,73.9171651 C77.9355886,73.9254732 78.7819239,73.8832103 79.5638842,73.8072782 C80.0123946,73.7637257 80.3172916,73.7224469 80.4352582,73.7027375 C80.7503629,73.6500912 81.0598053,73.6256267 81.3619177,73.6270062 L81.3619177,73.6270062 L81.3619177,73.6270062 L81.3619177,73.6270062 Z M37.4707881,2.64867269 C38.9217993,0.135447653 42.1388058,-0.723707984 44.6486727,0.725364314 L108.293614,37.4707881 C110.806839,38.9217993 111.665994,42.1388058 110.216922,44.6486727 L73.4714982,108.293614 C72.0204871,110.806839 68.8034805,111.665994 66.2936136,110.216922 L2.64867269,73.4714982 C0.135447653,72.0204871 -0.723707984,68.8034805 0.725364314,66.2936136 L37.4707881,2.64867269 L37.4707881,2.64867269 L37.4707881,2.64867269 L37.4707881,2.64867269 Z M80.3080975,53.1397764 C82.8191338,54.5895239 86.0299834,53.7291793 87.4797308,51.218143 C88.9294783,48.7071068 88.0691338,45.4962571 85.5580975,44.0465097 C83.0470612,42.5967622 79.8362116,43.4571068 78.3864641,45.968143 C76.9367166,48.4791793 77.7970612,51.6900289 80.3080975,53.1397764 L80.3080975,53.1397764 L80.3080975,53.1397764 L80.3080975,53.1397764 Z M96,112 L88.0070969,112 C83.5881712,112 80,108.418278 80,104 C80,99.5907123 83.5848994,96 88.0070969,96 L96,96 L96,88.0070969 C96,83.5881712 99.581722,80 104,80 C108.409288,80 112,83.5848994 112,88.0070969 L112,96 L119.992903,96 C124.411829,96 128,99.581722 128,104 C128,108.409288 124.415101,112 119.992903,112 L112,112 L112,119.992903 C112,124.411829 108.418278,128 104,128 C99.5907123,128 96,124.415101 96,119.992903 L96,112 L96,112 Z M33.3471097,51.7910932 C40.7754579,59.7394511 42.3564368,62.4818351 40.7958321,65.1848818 C39.2352273,67.8879286 26.9581062,62.8571718 24.7019652,66.7649227 C22.4458242,70.6726735 23.7947046,70.0228006 22.2648667,72.6725575 L41.9944593,84.0634431 C41.9944593,84.0634431 36.3904568,75.8079231 37.7602356,73.4353966 C40.2754811,69.0788636 46.5298923,72.1787882 48.1248275,69.4162793 C50.538989,65.234829 43.0222016,59.7770885 33.3471097,51.7910932 L33.3471097,51.7910932 Z"></path>
</g>
</svg>

View File

@ -1,10 +0,0 @@
title: $:/core/images/opacity
tags: $:/tags/Image
<svg class="tc-image-opacity tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M102.361773,65 C101.833691,67.051742 101.183534,69.0544767 100.419508,71 L82.5835324,71 C83.7602504,69.1098924 84.7666304,67.1027366 85.581205,65 L102.361773,65 Z M102.834311,63 C103.256674,61.0388326 103.568427,59.0365486 103.762717,57 L87.6555706,57 C87.3692052,59.0609452 86.9083652,61.0660782 86.2884493,63 L102.834311,63 Z M99.5852583,73 C98.6682925,75.0747721 97.6196148,77.0783056 96.4498253,79 L75.8124196,79 C77.8387053,77.2115633 79.6621163,75.1985844 81.2437158,73 L99.5852583,73 Z M95.1689122,81 C93.7449202,83.1155572 92.1695234,85.1207336 90.458251,87 L60.4614747,87 C65.1836162,85.86248 69.5430327,83.794147 73.3347255,81 L95.1689122,81 Z M87.6555706,47 L103.762717,47 C101.246684,20.6269305 79.0321807,0 52,0 C23.281193,0 0,23.281193 0,52 C0,77.2277755 17.9651296,98.2595701 41.8000051,103 L62.1999949,103 C67.8794003,101.870444 73.2255333,99.8158975 78.074754,97 L39,97 L39,95 L81.2493857,95 C83.8589242,93.2215015 86.2981855,91.2116653 88.5376609,89 L39,89 L39,87 L43.5385253,87 C27.7389671,83.1940333 16,68.967908 16,52 C16,32.117749 32.117749,16 52,16 C70.1856127,16 85.2217929,29.4843233 87.6555706,47 Z M87.8767787,49 L103.914907,49 C103.971379,49.9928025 104,50.9930589 104,52 C104,53.0069411 103.971379,54.0071975 103.914907,55 L87.8767787,55 C87.958386,54.0107999 88,53.0102597 88,52 C88,50.9897403 87.958386,49.9892001 87.8767787,49 Z"></path>
<path d="M76,128 C104.718807,128 128,104.718807 128,76 C128,47.281193 104.718807,24 76,24 C47.281193,24 24,47.281193 24,76 C24,104.718807 47.281193,128 76,128 L76,128 Z M76,112 C95.882251,112 112,95.882251 112,76 C112,56.117749 95.882251,40 76,40 C56.117749,40 40,56.117749 40,76 C40,95.882251 56.117749,112 76,112 L76,112 Z"></path>
<path d="M37,58 L90,58 L90,62 L37,62 L37,58 L37,58 Z M40,50 L93,50 L93,54 L40,54 L40,50 L40,50 Z M40,42 L93,42 L93,46 L40,46 L40,42 L40,42 Z M32,66 L85,66 L85,70 L32,70 L32,66 L32,66 Z M30,74 L83,74 L83,78 L30,78 L30,74 L30,74 Z M27,82 L80,82 L80,86 L27,86 L27,82 L27,82 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/paint
tags: $:/tags/Image
<svg class="tc-image-paint tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M83.5265806,76.1907935 C90.430962,69.2864121 91.8921169,59.0000433 87.9100453,50.6642209 L125.812763,12.7615036 C128.732035,9.84223095 128.72611,5.10322984 125.812796,2.18991592 C122.893542,-0.729338085 118.161775,-0.730617045 115.241209,2.18994966 L77.3384914,40.092667 C69.002669,36.1105954 58.7163002,37.5717503 51.8119188,44.4761317 L83.5265806,76.1907935 L83.5265806,76.1907935 L83.5265806,76.1907935 L83.5265806,76.1907935 Z M80.8836921,78.8336819 L49.1690303,47.1190201 C49.1690303,47.1190201 8.50573364,81.242543 0,80.2820711 C0,80.2820711 3.78222974,85.8744423 6.82737483,88.320684 C20.8514801,82.630792 44.1526049,63.720771 44.1526049,63.720771 L44.8144806,64.3803375 C44.8144806,64.3803375 19.450356,90.2231043 9.18040433,92.0477601 C10.4017154,93.4877138 13.5343883,96.1014812 15.4269991,97.8235871 C20.8439164,96.3356979 50.1595367,69.253789 50.1595367,69.253789 L50.8214124,69.9133555 L18.4136144,100.936036 L23.6993903,106.221812 L56.1060358,75.2002881 L56.7679115,75.8598546 C56.7679115,75.8598546 28.9040131,106.396168 28.0841366,108.291555 C28.0841366,108.291555 34.1159238,115.144621 35.6529617,116.115796 C36.3545333,113.280171 63.5365402,82.6307925 63.5365402,82.6307925 L64.1984159,83.290359 C64.1984159,83.290359 43.6013016,107.04575 39.2343772,120.022559 C42.443736,123.571575 46.7339155,125.159692 50.1595362,126.321151 C47.9699978,114.504469 80.8836921,78.8336819 80.8836921,78.8336819 L80.8836921,78.8336819 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/picture
tags: $:/tags/Image
<svg class="tc-image-picture tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M112,68.2332211 L112,20.0027785 C112,17.7898769 110.207895,16 107.997221,16 L20.0027785,16 C17.7898769,16 16,17.792105 16,20.0027785 L16,58.312373 L25.2413115,43.7197989 C28.041793,39.297674 34.2643908,38.7118128 37.8410347,42.5335275 L56.0882845,63.1470817 L69.7748997,56.7400579 C72.766567,55.3552503 76.3013751,55.9473836 78.678437,58.2315339 C78.8106437,58.3585731 79.0742301,58.609836 79.4527088,58.9673596 C80.0910923,59.570398 80.8117772,60.2441563 81.598127,60.9705595 C83.8422198,63.043576 86.1541548,65.1151944 88.3956721,67.0372264 C89.1168795,67.6556396 89.8200801,68.2492007 90.5021258,68.8146755 C92.6097224,70.5620551 94.4693308,72.0029474 95.9836366,73.0515697 C96.7316295,73.5695379 97.3674038,73.9719282 98.0281481,74.3824999 C98.4724987,74.4989557 99.0742374,74.5263881 99.8365134,74.4317984 C101.709944,74.1993272 104.074502,73.2878514 106.559886,71.8846196 C107.705822,71.2376318 108.790494,70.5370325 109.764561,69.8410487 C110.323259,69.4418522 110.694168,69.1550757 110.834827,69.0391868 C111.210545,68.7296319 111.600264,68.4615815 112,68.2332211 L112,68.2332211 Z M0,8.00697327 C0,3.58484404 3.59075293,0 8.00697327,0 L119.993027,0 C124.415156,0 128,3.59075293 128,8.00697327 L128,119.993027 C128,124.415156 124.409247,128 119.993027,128 L8.00697327,128 C3.58484404,128 0,124.409247 0,119.993027 L0,8.00697327 L0,8.00697327 Z M95,42 C99.418278,42 103,38.418278 103,34 C103,29.581722 99.418278,26 95,26 C90.581722,26 87,29.581722 87,34 C87,38.418278 90.581722,42 95,42 L95,42 Z M32,76 C47.8587691,80.8294182 52.0345556,83.2438712 52.0345556,88 C52.0345556,92.7561288 32,95.4712486 32,102.347107 C32,109.222965 33.2849191,107.337637 33.2849191,112 L67.999999,112 C67.999999,112 54.3147136,105.375255 54.3147136,101.200691 C54.3147136,93.535181 64.9302432,92.860755 64.9302432,88 C64.9302432,80.6425555 50.8523779,79.167282 32,76 L32,76 Z"></path>
</g>
</svg>

View File

@ -1,15 +0,0 @@
title: $:/core/images/preview-closed
tags: $:/tags/Image
<svg class="tc-image-preview-closed tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M0.0881363238,64 C-0.210292223,65.8846266 0.249135869,67.8634737 1.4664206,69.4579969 C16.2465319,88.8184886 39.1692554,100.414336 64,100.414336 C88.8307446,100.414336 111.753468,88.8184886 126.533579,69.4579969 C127.750864,67.8634737 128.210292,65.8846266 127.911864,64 C110.582357,78.4158332 88.3036732,87.0858436 64,87.0858436 C39.6963268,87.0858436 17.4176431,78.4158332 0.0881363238,64 Z"></path>
<rect x="62" y="96" width="4" height="16" rx="8"></rect>
<rect transform="translate(80.000000, 101.000000) rotate(-5.000000) translate(-80.000000, -101.000000) " x="78" y="93" width="4" height="16" rx="8"></rect>
<rect transform="translate(48.000000, 101.000000) rotate(-355.000000) translate(-48.000000, -101.000000) " x="46" y="93" width="4" height="16" rx="8"></rect>
<rect transform="translate(32.000000, 96.000000) rotate(-350.000000) translate(-32.000000, -96.000000) " x="30" y="88" width="4" height="16" rx="8"></rect>
<rect transform="translate(96.000000, 96.000000) rotate(-10.000000) translate(-96.000000, -96.000000) " x="94" y="88" width="4" height="16" rx="8"></rect>
<rect transform="translate(112.000000, 88.000000) rotate(-20.000000) translate(-112.000000, -88.000000) " x="110" y="80" width="4" height="16" rx="8"></rect>
<rect transform="translate(16.000000, 88.000000) rotate(-340.000000) translate(-16.000000, -88.000000) " x="14" y="80" width="4" height="16" rx="8"></rect>
</g>
</svg>

View File

@ -1,9 +0,0 @@
title: $:/core/images/preview-open
tags: $:/tags/Image
<svg class="tc-image-preview-open tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M64.1099282,99.5876785 C39.2791836,99.5876785 16.3564602,87.9918313 1.57634884,68.6313396 C-0.378878622,66.070184 -0.378878622,62.5174945 1.57634884,59.9563389 C16.3564602,40.5958472 39.2791836,29 64.1099282,29 C88.9406729,29 111.863396,40.5958472 126.643508,59.9563389 C128.598735,62.5174945 128.598735,66.070184 126.643508,68.6313396 C111.863396,87.9918313 88.9406729,99.5876785 64.1099282,99.5876785 Z M110.213805,67.5808331 C111.654168,66.0569335 111.654168,63.9430665 110.213805,62.4191669 C99.3257042,50.8995835 82.4391647,44 64.1470385,44 C45.8549124,44 28.9683729,50.8995835 18.0802717,62.4191669 C16.6399094,63.9430665 16.6399094,66.0569335 18.0802717,67.5808331 C28.9683729,79.1004165 45.8549124,86 64.1470385,86 C82.4391647,86 99.3257042,79.1004165 110.213805,67.5808331 Z"></path>
<path d="M63.5,88 C76.4786916,88 87,77.4786916 87,64.5 C87,51.5213084 76.4786916,41 63.5,41 C50.5213084,41 40,51.5213084 40,64.5 C40,77.4786916 50.5213084,88 63.5,88 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/quote
tags: $:/tags/Image
<svg class="tc-image-quote tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M51.2188077,117.712501 L51.2188077,62.1993386 L27.4274524,62.1993386 C27.4274524,53.3075754 29.1096526,45.797753 32.4741035,39.669646 C35.8385544,33.541539 42.0867267,28.9154883 51.2188077,25.7913554 L51.2188077,2 C43.7689521,2.96127169 36.8599155,5.18417913 30.4914905,8.668789 C24.1230656,12.1533989 18.6559149,16.5391352 14.0898743,21.8261295 C9.52383382,27.1131238 5.97919764,33.2411389 3.45585945,40.2103586 C0.932521268,47.1795784 -0.208971741,54.6293222 0.0313461819,62.5598136 L0.0313461819,117.712501 L51.2188077,117.712501 Z M128,117.712501 L128,62.1993386 L104.208645,62.1993386 C104.208645,53.3075754 105.890845,45.797753 109.255296,39.669646 C112.619747,33.541539 118.867919,28.9154883 128,25.7913554 L128,2 C120.550144,2.96127169 113.641108,5.18417913 107.272683,8.668789 C100.904258,12.1533989 95.4371072,16.5391352 90.8710666,21.8261295 C86.3050261,27.1131238 82.7603899,33.2411389 80.2370517,40.2103586 C77.7137136,47.1795784 76.5722206,54.6293222 76.8125385,62.5598136 L76.8125385,117.712501 L128,117.712501 Z"></path>
</g>
</svg>

View File

@ -1,11 +0,0 @@
title: $:/core/images/redo
tags: $:/tags/Image
<svg class="tc-image-redo tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<g transform="translate(180.233611, 192.389922) rotate(75.000000) translate(-180.233611, -192.389922) translate(120.265583, 131.702450)">
<path d="M18.9270186,45.959338 L18.9080585,49.6521741 C18.8884833,53.4648378 21.0574548,58.7482162 23.7526408,61.4434022 L78.5671839,116.257945 C81.2617332,118.952495 85.6348701,118.950391 88.3334363,116.251825 L115.863237,88.7220241 C118.555265,86.0299959 118.564544,81.6509578 115.869358,78.9557717 L61.0548144,24.1412286 C58.3602652,21.4466794 53.0787224,19.2788426 49.2595808,19.3006519 L25.9781737,19.4336012 C22.1633003,19.4553862 19.0471195,22.5673232 19.0275223,26.3842526 L18.9871663,34.2443819 C19.0818862,34.255617 19.1779758,34.2665345 19.2754441,34.2771502 C22.6891275,34.6489512 27.0485594,34.2348566 31.513244,33.2285542 C31.7789418,32.8671684 32.075337,32.5211298 32.4024112,32.1940556 C34.8567584,29.7397084 38.3789778,29.0128681 41.4406288,30.0213822 C41.5958829,29.9543375 41.7503946,29.8866669 41.9041198,29.8183808 L42.1110981,30.2733467 C43.1114373,30.6972371 44.0473796,31.3160521 44.8614145,32.1300869 C48.2842088,35.5528813 48.2555691,41.130967 44.7974459,44.5890903 C41.4339531,47.952583 36.0649346,48.0717177 32.6241879,44.9262969 C27.8170558,45.8919233 23.0726921,46.2881596 18.9270186,45.959338 Z"></path>
</g>
<path d="M18.8529698,78.5795551 C23.3328659,63.5664388 36.4624607,51.963543 53.0163903,50.2236549 C71.9131923,48.237521 89.1174496,59.7506654 95.0305381,76.990276 L81.4478553,74.2761325 C77.1152305,73.4103709 72.9011058,76.2208188 72.0353441,80.5534435 C71.1695825,84.8860683 73.9800304,89.1001931 78.3126552,89.9659547 L110.20387,96.3385789 C114.552025,97.2074438 118.777398,94.374003 119.624223,90.0215022 L125.868734,57.9260056 C126.712534,53.5890501 123.880771,49.3892183 119.543816,48.5454187 C115.20686,47.7016191 111.007029,50.5333814 110.163229,54.8703368 L107.942537,66.2842329 C98.1106587,45.2478605 75.7343285,31.7477709 51.3439349,34.3113046 C27.7065732,36.7956914 9.05626438,53.6441356 3.1546605,75.271795 L3.19465925,75.28219 C2.54845483,78.156707 3.52095928,81.28061 5.9657019,83.2603235 C9.3993488,86.040836 14.4369203,85.5113659 17.2174327,82.077719 C18.0696751,81.0252872 18.6109591,79.8221738 18.8529698,78.5795551 L18.8529698,78.5795551 L18.8529698,78.5795551 Z M112.379785,80.4570687 C112.422777,80.7070229 112.464145,80.9576094 112.503877,81.2088183 L113.33907,80.6487567 L112.379785,80.4570687 L112.379785,80.4570687 L112.379785,80.4570687 Z"></path>
</g>
</svg>

View File

@ -1,6 +0,0 @@
title: $:/core/images/size
tags: $:/tags/Image
<svg class="tc-image-size tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<path d="M92.3431458,26 L83.1715729,35.1715729 C81.6094757,36.73367 81.6094757,39.26633 83.1715729,40.8284271 C84.73367,42.3905243 87.26633,42.3905243 88.8284271,40.8284271 L104.828427,24.8284271 C106.390524,23.26633 106.390524,20.73367 104.828427,19.1715729 L88.8284271,3.17157288 C87.26633,1.60947571 84.73367,1.60947571 83.1715729,3.17157288 C81.6094757,4.73367004 81.6094757,7.26632996 83.1715729,8.82842712 L92.3431457,18 L22,18 C19.790861,18 18,19.790861 18,22 L18,92.3431458 L8.82842712,83.1715729 C7.26632996,81.6094757 4.73367004,81.6094757 3.17157288,83.1715729 C1.60947571,84.73367 1.60947571,87.26633 3.17157288,88.8284271 L19.1715729,104.828427 C20.73367,106.390524 23.26633,106.390524 24.8284271,104.828427 L40.8284271,88.8284271 C42.3905243,87.26633 42.3905243,84.73367 40.8284271,83.1715729 C39.26633,81.6094757 36.73367,81.6094757 35.1715729,83.1715729 L26,92.3431458 L26,22 L22,26 L92.3431458,26 L92.3431458,26 Z M112,52 L112,116 L116,112 L52,112 C49.790861,112 48,113.790861 48,116 C48,118.209139 49.790861,120 52,120 L116,120 C118.209139,120 120,118.209139 120,116 L120,52 C120,49.790861 118.209139,48 116,48 C113.790861,48 112,49.790861 112,52 L112,52 Z"></path>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/stamp
tags: $:/tags/Image
<svg class="tc-image-stamp tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M49.7334301,64 L16.0098166,64 C11.5838751,64 8,67.5829053 8,72.002643 L8,74.4986785 L8,97 L120,97 L120,74.4986785 L120,72.002643 C120,67.5737547 116.413883,64 111.990183,64 L78.2665699,64 C76.502049,60.7519149 75.5,57.0311962 75.5,53.0769231 C75.5,46.6017951 78.1869052,40.7529228 82.5087769,36.5800577 C85.3313113,32.7688808 87,28.0549983 87,22.952183 C87,10.2760423 76.7025492,0 64,0 C51.2974508,0 41,10.2760423 41,22.952183 C41,28.0549983 42.6686887,32.7688808 45.4912231,36.5800577 C49.8130948,40.7529228 52.5,46.6017951 52.5,53.0769231 C52.5,57.0311962 51.497951,60.7519149 49.7334301,64 Z M8,104 L120,104 L120,112 L8,112 L8,104 Z"></path>
</g>
</svg>

View File

@ -1,9 +0,0 @@
title: $:/core/images/strikethrough
tags: $:/tags/Image
<svg class="tc-image-strikethrough tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M92.793842,38.7255689 L108.215529,38.7255689 C107.987058,31.985687 106.70193,26.1883331 104.360107,21.3333333 C102.018284,16.4783336 98.8197436,12.4516001 94.7643909,9.25301205 C90.7090382,6.05442399 85.9969032,3.71263572 80.6278447,2.22757697 C75.2587862,0.742518233 69.4328739,0 63.1499331,0 C57.552404,0 52.0977508,0.713959839 46.7858099,2.14190094 C41.473869,3.56984203 36.7331757,5.74027995 32.5635877,8.65327979 C28.3939997,11.5662796 25.0526676,15.2788708 22.5394913,19.7911647 C20.026315,24.3034585 18.7697456,29.6438781 18.7697456,35.8125837 C18.7697456,41.4101128 19.883523,46.0651309 22.1111111,49.7777778 C24.3386992,53.4904246 27.3087722,56.5176144 31.021419,58.8594378 C34.7340659,61.2012612 38.9321497,63.0861151 43.6157965,64.5140562 C48.2994433,65.9419973 53.068695,67.1985666 57.9236948,68.2838019 C62.7786945,69.3690371 67.5479462,70.4256977 72.231593,71.4538153 C76.9152398,72.4819329 81.1133237,73.8241773 84.8259705,75.480589 C88.5386174,77.1370007 91.5086903,79.2788802 93.7362784,81.9062918 C95.9638666,84.5337035 97.0776439,87.9607107 97.0776439,92.1874163 C97.0776439,96.6425926 96.1637753,100.298067 94.3360107,103.153949 C92.5082461,106.009831 90.109341,108.265944 87.1392236,109.922356 C84.1691061,111.578768 80.827774,112.749662 77.1151272,113.435074 C73.4024803,114.120485 69.7184476,114.463186 66.0629183,114.463186 C61.4935068,114.463186 57.0383974,113.892018 52.6974565,112.749665 C48.3565156,111.607312 44.5582492,109.836692 41.3025435,107.437751 C38.0468378,105.03881 35.4194656,101.983062 33.4203481,98.270415 C31.4212305,94.5577681 30.4216867,90.1312171 30.4216867,84.9906292 L15,84.9906292 C15,92.4159229 16.3422445,98.8415614 19.0267738,104.267738 C21.711303,109.693914 25.3667774,114.149023 29.9933066,117.633199 C34.6198357,121.117376 39.9888137,123.71619 46.1004016,125.429719 C52.2119895,127.143248 58.6947448,128 65.5488621,128 C71.1463912,128 76.7723948,127.343157 82.4270415,126.029451 C88.0816882,124.715745 93.1936407,122.602424 97.7630522,119.689424 C102.332464,116.776425 106.073613,113.006717 108.986613,108.380187 C111.899613,103.753658 113.356091,98.1847715 113.356091,91.6733601 C113.356091,85.6188899 112.242314,80.5926126 110.014726,76.5943775 C107.787137,72.5961424 104.817065,69.2833688 101.104418,66.6559572 C97.3917708,64.0285455 93.193687,61.9437828 88.5100402,60.4016064 C83.8263934,58.85943 79.0571416,57.5171855 74.2021419,56.3748327 C69.3471422,55.2324798 64.5778904,54.1758192 59.8942436,53.2048193 C55.2105968,52.2338193 51.012513,51.0058084 47.2998661,49.5207497 C43.5872193,48.0356909 40.6171463,46.1222786 38.3895582,43.7804552 C36.1619701,41.4386318 35.0481928,38.3828836 35.0481928,34.6131191 C35.0481928,30.6148841 35.8192694,27.273552 37.3614458,24.5890228 C38.9036222,21.9044935 40.9598265,19.762614 43.5301205,18.1633199 C46.1004145,16.5640259 49.041929,15.4216902 52.3547523,14.7362784 C55.6675757,14.0508667 59.0374661,13.708166 62.4645248,13.708166 C70.9179361,13.708166 77.8576257,15.6786952 83.2838019,19.6198126 C88.709978,23.56093 91.8799597,29.9294518 92.793842,38.7255689 L92.793842,38.7255689 Z"></path>
<rect x="5" y="54" width="118" height="16"></rect>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/subscript
tags: $:/tags/Image
<svg class="tc-image-subscript tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M2.27170276,16 L22.1825093,16 L43.8305003,49.6746527 L66.4138983,16 L85.1220387,16 L53.5854592,61.9685735 L87.3937414,111.411516 L67.0820462,111.411516 L43.295982,74.9306422 L19.1090291,111.411516 L0,111.411516 L33.8082822,61.9685735 L2.27170276,16 Z M127.910914,128.411516 L85.3276227,128.411516 C85.3870139,123.24448 86.6342108,118.730815 89.0692508,114.870386 C91.5042907,111.009956 94.8301491,107.654403 99.0469256,104.803624 C101.066227,103.318844 103.174584,101.878629 105.372059,100.482935 C107.569534,99.0872413 109.588805,97.5876355 111.429933,95.9840726 C113.271061,94.3805097 114.785514,92.6433426 115.973338,90.7725192 C117.161163,88.9016958 117.784761,86.7487964 117.844152,84.3137564 C117.844152,83.1853233 117.710524,81.9826691 117.443264,80.7057579 C117.176003,79.4288467 116.656338,78.2410402 115.884252,77.1423026 C115.112166,76.0435651 114.04314,75.123015 112.677142,74.3806248 C111.311144,73.6382345 109.529434,73.267045 107.331959,73.267045 C105.312658,73.267045 103.634881,73.6679297 102.298579,74.4697112 C100.962276,75.2714926 99.8932503,76.3702137 99.0914688,77.7659073 C98.2896874,79.161601 97.6957841,80.8096826 97.3097412,82.7102016 C96.9236982,84.6107206 96.7009845,86.6596869 96.6415933,88.857162 L86.4857457,88.857162 C86.4857457,85.4124713 86.9460207,82.2202411 87.8665846,79.2803758 C88.7871485,76.3405105 90.1679736,73.801574 92.0091014,71.6634901 C93.8502292,69.5254062 96.092214,67.8476295 98.7351233,66.6301095 C101.378033,65.4125895 104.451482,64.8038386 107.955564,64.8038386 C111.756602,64.8038386 114.933984,65.4274371 117.487807,66.6746527 C120.041629,67.9218683 122.105443,69.4957119 123.67931,71.3962309 C125.253178,73.2967499 126.366746,75.3605638 127.02005,77.5877345 C127.673353,79.8149053 128,81.9381095 128,83.9574109 C128,86.4518421 127.613963,88.7086746 126.841877,90.727976 C126.069791,92.7472774 125.03046,94.6032252 123.723854,96.2958749 C122.417247,97.9885247 120.932489,99.5475208 119.269534,100.97291 C117.60658,102.398299 115.884261,103.734582 114.102524,104.981797 C112.320788,106.229013 110.539078,107.416819 108.757341,108.545253 C106.975605,109.673686 105.327523,110.802102 103.813047,111.930535 C102.298571,113.058968 100.977136,114.231927 99.8487031,115.449447 C98.7202699,116.666967 97.9481956,117.958707 97.5324571,119.324705 L127.910914,119.324705 L127.910914,128.411516 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/superscript
tags: $:/tags/Image
<svg class="tc-image-superscript tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M2.27170276,16 L22.1825093,16 L43.8305003,49.6746527 L66.4138983,16 L85.1220387,16 L53.5854592,61.9685735 L87.3937414,111.411516 L67.0820462,111.411516 L43.295982,74.9306422 L19.1090291,111.411516 L0,111.411516 L33.8082822,61.9685735 L2.27170276,16 Z M127.910914,63.4115159 L85.3276227,63.4115159 C85.3870139,58.2444799 86.6342108,53.7308149 89.0692508,49.8703857 C91.5042907,46.0099565 94.8301491,42.654403 99.0469256,39.8036245 C101.066227,38.318844 103.174584,36.8786285 105.372059,35.4829349 C107.569534,34.0872413 109.588805,32.5876355 111.429933,30.9840726 C113.271061,29.3805097 114.785514,27.6433426 115.973338,25.7725192 C117.161163,23.9016958 117.784761,21.7487964 117.844152,19.3137564 C117.844152,18.1853233 117.710524,16.9826691 117.443264,15.7057579 C117.176003,14.4288467 116.656338,13.2410402 115.884252,12.1423026 C115.112166,11.0435651 114.04314,10.123015 112.677142,9.38062477 C111.311144,8.63823453 109.529434,8.26704499 107.331959,8.26704499 C105.312658,8.26704499 103.634881,8.6679297 102.298579,9.46971115 C100.962276,10.2714926 99.8932503,11.3702137 99.0914688,12.7659073 C98.2896874,14.161601 97.6957841,15.8096826 97.3097412,17.7102016 C96.9236982,19.6107206 96.7009845,21.6596869 96.6415933,23.857162 L86.4857457,23.857162 C86.4857457,20.4124713 86.9460207,17.2202411 87.8665846,14.2803758 C88.7871485,11.3405105 90.1679736,8.80157397 92.0091014,6.6634901 C93.8502292,4.52540622 96.092214,2.84762946 98.7351233,1.63010947 C101.378033,0.412589489 104.451482,-0.196161372 107.955564,-0.196161372 C111.756602,-0.196161372 114.933984,0.427437071 117.487807,1.67465266 C120.041629,2.92186826 122.105443,4.49571195 123.67931,6.39623095 C125.253178,8.29674995 126.366746,10.3605638 127.02005,12.5877345 C127.673353,14.8149053 128,16.9381095 128,18.9574109 C128,21.4518421 127.613963,23.7086746 126.841877,25.727976 C126.069791,27.7472774 125.03046,29.6032252 123.723854,31.2958749 C122.417247,32.9885247 120.932489,34.5475208 119.269534,35.97291 C117.60658,37.3982993 115.884261,38.7345816 114.102524,39.9817972 C112.320788,41.2290128 110.539078,42.4168194 108.757341,43.5452525 C106.975605,44.6736857 105.327523,45.8021019 103.813047,46.9305351 C102.298571,48.0589682 100.977136,49.2319272 99.8487031,50.4494472 C98.7202699,51.6669672 97.9481956,52.9587068 97.5324571,54.3247048 L127.910914,54.3247048 L127.910914,63.4115159 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/underline
tags: $:/tags/Image
<svg class="tc-image-underline tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M7,117.421488 L121.247934,117.421488 L121.247934,128 L7,128 L7,117.421488 Z M104.871212,98.8958333 L104.871212,0 L88.6117424,0 L88.6117424,55.8560606 C88.6117424,60.3194668 88.0060035,64.432115 86.7945076,68.1941288 C85.5830116,71.9561425 83.7657949,75.239885 81.342803,78.0454545 C78.9198111,80.8510241 75.8911167,83.0189317 72.2566288,84.5492424 C68.6221409,86.0795531 64.3182067,86.844697 59.344697,86.844697 C53.0959284,86.844697 48.1862552,85.0593613 44.6155303,81.4886364 C41.0448054,77.9179114 39.2594697,73.0720003 39.2594697,66.9507576 L39.2594697,0 L23,0 L23,65.0378788 C23,70.3939662 23.5419769,75.2717583 24.625947,79.6714015 C25.709917,84.0710447 27.5908957,87.864883 30.2689394,91.0530303 C32.9469831,94.2411776 36.4538925,96.6960141 40.7897727,98.4176136 C45.125653,100.139213 50.545422,101 57.0492424,101 C64.3182182,101 70.630655,99.5653553 75.9867424,96.6960227 C81.3428298,93.8266902 85.742407,89.33147 89.1856061,83.2102273 L89.5681818,83.2102273 L89.5681818,98.8958333 L104.871212,98.8958333 Z"></path>
</g>
</svg>

View File

@ -1,8 +0,0 @@
title: $:/core/images/undo
tags: $:/tags/Image
<svg class="tc-image-undo tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
<g fill-rule="evenodd">
<path d="M110.164509,78.5795551 C105.684613,63.5664388 92.5550183,51.963543 76.0010887,50.2236549 C57.1042867,48.237521 39.9000294,59.7506654 33.9869408,76.990276 L47.5696237,74.2761325 C51.9022484,73.4103709 56.1163732,76.2208188 56.9821348,80.5534435 C57.8478965,84.8860683 55.0374486,89.1001931 50.7048238,89.9659547 L18.813609,96.3385789 C14.4654544,97.2074438 10.2400805,94.374003 9.39325638,90.0215022 L3.148745,57.9260056 C2.30494538,53.5890501 5.1367077,49.3892183 9.47366316,48.5454187 C13.8106186,47.7016191 18.0104504,50.5333814 18.85425,54.8703368 L21.0749418,66.2842329 C30.9068203,45.2478605 53.2831505,31.7477709 77.6735441,34.3113046 C101.310906,36.7956914 119.961215,53.6441356 125.862818,75.271795 L125.82282,75.28219 C126.469024,78.156707 125.49652,81.28061 123.051777,83.2603235 C119.61813,86.040836 114.580559,85.5113659 111.800046,82.077719 C110.947804,81.0252872 110.40652,79.8221738 110.164509,78.5795551 L110.164509,78.5795551 Z M16.6376942,80.4570687 C16.594702,80.7070229 16.5533338,80.9576094 16.5136018,81.2088183 L15.6784088,80.6487567 L16.6376942,80.4570687 L16.6376942,80.4570687 Z"></path>
</g>
</svg>

View File

@ -62,6 +62,10 @@ NewJournal/Caption: new journal
NewJournal/Hint: Create a new journal tiddler
NewJournalHere/Caption: new journal here
NewJournalHere/Hint: Create a new journal tiddler tagged with this one
NewImage/Caption: new image
NewImage/Hint: Create a new image tiddler
NewMarkdown/Caption: new Markdown tiddler
NewMarkdown/Hint: Create a new Markdown tiddler
NewTiddler/Caption: new tiddler
NewTiddler/Hint: Create a new tiddler
OpenWindow/Caption: open in new window
@ -88,3 +92,81 @@ TagManager/Caption: tag manager
TagManager/Hint: Open tag manager
Theme/Caption: theme
Theme/Hint: Choose the display theme
Bold/Caption: bold
Bold/Hint: Apply bold formatting to selection
Clear/Caption: clear
Clear/Hint: Clear image to solid colour
EditorHeight/Caption: editor height
EditorHeight/Caption/Auto: Automatically adjust height to fit content
EditorHeight/Caption/Fixed: Fixed height:
EditorHeight/Hint: Choose the height of the text editor
Excise/Caption: excise
Excise/Caption/Excise: Perform excision
Excise/Caption/MacroName: Macro name:
Excise/Caption/NewTitle: Title of new tiddler:
Excise/Caption/Replace: Replace excised text with:
Excise/Caption/Replace/Macro: macro
Excise/Caption/Replace/Link: link
Excise/Caption/Replace/Transclusion: transclusion
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
Excise/Caption/TiddlerExists: Warning: tiddler already exists
Excise/Hint: Excise the selected text into a new tiddler
Heading1/Caption: heading 1
Heading1/Hint: Apply heading level 1 formatting to lines containing selection
Heading2/Caption: heading 2
Heading2/Hint: Apply heading level 2 formatting to lines containing selection
Heading3/Caption: heading 3
Heading3/Hint: Apply heading level 3 formatting to lines containing selection
Heading4/Caption: heading 4
Heading4/Hint: Apply heading level 4 formatting to lines containing selection
Heading5/Caption: heading 5
Heading5/Hint: Apply heading level 5 formatting to lines containing selection
Heading6/Caption: heading 6
Heading6/Hint: Apply heading level 6 formatting to lines containing selection
Italic/Caption: italic
Italic/Hint: Apply italic formatting to selection
LineWidth/Caption: line width
LineWidth/Hint: Set line width for painting
ListBullet/Caption: bulleted list
ListBullet/Hint: Apply bulleted list formatting to lines containing selection
ListNumber/Caption: numbered list
ListNumber/Hint: Apply numbered list formatting to lines containing selection
MonoBlock/Caption: monospaced block
MonoBlock/Hint: Apply monospaced block formatting to lines containing selection
MonoLine/Caption: monospaced
MonoLine/Hint: Apply monospaced character formatting to selection
Opacity/Caption: opacity
Opacity/Hint: Set painting opacity
Paint/Caption: paint colour
Paint/Hint: Set painting colour
Picture/Caption: picture
Picture/Hint: Insert picture
Preview/Caption: preview
Preview/Hint: Show preview pane
PreviewType/Caption: preview type
PreviewType/Hint: Choose preview type
Quote/Caption: quote
Quote/Hint: Apply quoted text formatting to lines containing selection
Redo/Caption: redo
Redo/Hint: Redo the last action to be undone
Size/Caption: image size
Size/Caption/Height: Height:
Size/Caption/Resize: Resize image
Size/Caption/Width: Width:
Size/Hint: Set image size
Stamp/Caption: stamp
Stamp/Caption/New: Add your own
Stamp/Hint: Insert a preconfigured snippet of text
Stamp/New/Title: Name as shown in menu
Stamp/New/Text: Text of snippet. (Remember to add a descriptive title in the caption field).
Strikethrough/Caption: strikethrough
Strikethrough/Hint: Apply strikethrough formatting to selection
Subscript/Caption: subscript
Subscript/Hint: Apply subscript formatting to selection
Superscript/Caption: superscript
Superscript/Hint: Apply superscript formatting to selection
Underline/Caption: underline
Underline/Hint: Apply underline formatting to selection
Undo/Caption: undo
Undo/Hint: Undo the last action

View File

@ -27,6 +27,19 @@ EditorTypes/Hint: These tiddlers determine which editor is used to edit specific
EditorTypes/Type/Caption: Type
Info/Caption: Info
Info/Hint: Information about this TiddlyWiki
KeyboardShortcuts/Add/Prompt: Type shortcut here
KeyboardShortcuts/Add/Caption: add shortcut
KeyboardShortcuts/Caption: Keyboard Shortcuts
KeyboardShortcuts/Hint: Manage keyboard shortcut assignments
KeyboardShortcuts/NoShortcuts/Caption: No keyboard shortcuts assigned
KeyboardShortcuts/Remove/Hint: remove keyboard shortcut
KeyboardShortcuts/Platform/All: All platforms
KeyboardShortcuts/Platform/Mac: Macintosh platform only
KeyboardShortcuts/Platform/NonMac: Non-Macintosh platforms only
KeyboardShortcuts/Platform/Linux: Linux platform only
KeyboardShortcuts/Platform/NonLinux: Non-Linux platforms only
KeyboardShortcuts/Platform/Windows: Windows platform only
KeyboardShortcuts/Platform/NonWindows: Non-Windows platforms only
LoadedModules/Caption: Loaded Modules
LoadedModules/Hint: These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process.
Palette/Caption: Palette
@ -136,6 +149,8 @@ Toolbars/EditToolbar/Hint: Choose which buttons are displayed for tiddlers in ed
Toolbars/Hint: Select which toolbar buttons are displayed
Toolbars/PageControls/Caption: Page Toolbar
Toolbars/PageControls/Hint: Choose which buttons are displayed on the main page toolbar
Toolbars/EditorToolbar/Caption: Editor Toolbar
Toolbars/EditorToolbar/Hint: Choose which buttons are displayed in the editor toolbar. Note that some buttons will only appear when editing tiddlers of a certain type
Toolbars/ViewToolbar/Caption: View Toolbar
Toolbars/ViewToolbar/Hint: Choose which buttons are displayed for tiddlers in view mode
Tools/Download/Full/Caption: Download full wiki

View File

@ -1,11 +1,7 @@
title: $:/language/EditTemplate/
Body/External/Hint: This is an external tiddler stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself
Body/Hint: Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features
Body/Placeholder: Type the text for this tiddler
Body/Preview/Button/Hide: hide preview
Body/Preview/Button/Show: show preview
Body/Preview/Type: preview type:
Body/Preview/Type/Output: output
Field/Remove/Caption: remove field
Field/Remove/Hint: Remove field

View File

@ -11,7 +11,7 @@ Before you start storing important information in ~TiddlyWiki it is important to
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
</div>
See the [[control panel|$:/ControlPanel]] for more options.

View File

@ -5,6 +5,7 @@ BinaryWarning/Prompt: This tiddler contains binary data
ClassicWarning/Hint: This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details.
ClassicWarning/Upgrade/Caption: upgrade
CloseAll/Button: close all
ColourPicker/Recent: Recent:
ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text=<<title>>/>"?
ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<<title>>/>"?
ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<<title>>/>"?

View File

@ -0,0 +1,6 @@
title: $:/language/Snippets/ListByTag
tags: $:/tags/TextEditor/Snippet
caption: List of tiddlers by tag
mode: wikified
<<list-links "[tag[task]sort[title]]">>

View File

@ -0,0 +1,8 @@
title: $:/language/Snippets/MacroDefinition
tags: $:/tags/TextEditor/Snippet
caption: Macro definition
mode: wikified
\define macroName(param1:"default value",param2)
Text of the macro
\end

View File

@ -0,0 +1,9 @@
title: $:/language/Snippets/Table4x3
tags: $:/tags/TextEditor/Snippet
caption: Table with 4 columns by 3 rows
mode: wikified
|! |!Alpha |!Beta |!Gamma |!Delta |
|!One | | | | |
|!Two | | | | |
|!Three | | | | |

View File

@ -0,0 +1,10 @@
title: $:/language/Snippets/TableOfContents
tags: $:/tags/TextEditor/Snippet
caption: Table of Contents
mode: wikified
<div class="tc-table-of-contents">
<<toc-selective-expandable 'TableOfContents'>>
</div>

View File

@ -0,0 +1,211 @@
/*\
title: $:/core/modules/editor/engines/framed.js
type: application/javascript
module-type: library
Text editor engine based on a simple input or textarea within an iframe. This is done so that the selection is preserved even when clicking away from the textarea
\*/
(function(){
var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height"
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function FramedEngine(options) {
// Save our options
options = options || {};
this.widget = options.widget;
this.value = options.value;
this.parentNode = options.parentNode;
this.nextSibling = options.nextSibling;
// Create our hidden dummy text area for reading styles
this.dummyTextArea = this.widget.document.createElement("textarea");
if(this.widget.editClass) {
this.dummyTextArea.className = this.widget.editClass;
}
this.dummyTextArea.setAttribute("hidden","true");
this.parentNode.insertBefore(this.dummyTextArea,this.nextSibling);
this.widget.domNodes.push(this.dummyTextArea);
// Create the iframe
this.iframeNode = this.widget.document.createElement("iframe");
this.parentNode.insertBefore(this.iframeNode,this.nextSibling);
this.iframeDoc = this.iframeNode.contentWindow.document;
// (Firefox requires us to put some empty content in the iframe)
this.iframeDoc.open();
this.iframeDoc.write("");
this.iframeDoc.close();
// Style the iframe
this.iframeNode.className = this.dummyTextArea.className;
this.iframeNode.style.border = "none";
this.iframeNode.style.padding = "0";
this.iframeNode.style.resize = "none";
this.iframeDoc.body.style.margin = "0";
this.iframeDoc.body.style.padding = "0";
this.widget.domNodes.push(this.iframeNode);
// Construct the textarea or input node
var tag = this.widget.editTag;
if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {
tag = "input";
}
this.domNode = this.iframeDoc.createElement(tag);
if(this.widget.editType) {
this.domNode.setAttribute("type",this.widget.editType);
}
if(this.widget.editPlaceholder) {
this.domNode.setAttribute("placeholder",this.widget.editPlaceholder);
}
if(this.widget.editSize) {
this.domNode.setAttribute("size",this.widget.editSize);
}
if(this.widget.editRows) {
this.domNode.setAttribute("rows",this.widget.editRows);
}
// Copy the styles from the dummy textarea
$tw.utils.copyStyles(this.dummyTextArea,this.domNode);
this.domNode.style.display = "block";
this.domNode.style.width = "100%";
this.domNode.style.margin = "0";
// Set the text
if(this.widget.editTag === "textarea") {
this.domNode.appendChild(this.iframeDoc.createTextNode(this.value));
} else {
this.domNode.value = this.value;
}
// Add event listeners
$tw.utils.addEventListeners(this.domNode,[
{name: "input", handlerObject: this, handlerMethod: "handleInputEvent"},
{name: "keydown", handlerObject: this.widget, handlerMethod: "handleKeydownEvent"}
]);
// Insert the element into the DOM
this.iframeDoc.body.appendChild(this.domNode);
}
/*
Set the text of the engine if it doesn't currently have focus
*/
FramedEngine.prototype.setText = function(text,type) {
if(!this.domNode.isTiddlyWikiFakeDom) {
if(this.domNode.ownerDocument.activeElement !== this.domNode) {
this.domNode.value = text;
}
// Fix the height if needed
this.fixHeight();
}
};
/*
Get the text of the engine
*/
FramedEngine.prototype.getText = function() {
return this.domNode.value;
};
/*
Fix the height of textarea to fit content
*/
FramedEngine.prototype.fixHeight = function() {
if(this.widget.editTag === "textarea") {
if(this.widget.editAutoHeight) {
if(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {
var newHeight = $tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);
this.iframeNode.style.height = (newHeight + 14) + "px"; // +14 for the border on the textarea
}
} else {
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
fixedHeight = Math.max(fixedHeight,20);
this.domNode.style.height = fixedHeight + "px";
this.iframeNode.style.height = (fixedHeight + 14) + "px";
}
}
};
/*
Focus the engine node
*/
FramedEngine.prototype.focus = function() {
if(this.domNode.focus && this.domNode.select) {
this.domNode.focus();
this.domNode.select();
}
}
/*
Handle a dom "input" event which occurs when the text has changed
*/
FramedEngine.prototype.handleInputEvent = function(event) {
this.widget.saveChanges(this.getText());
this.fixHeight();
return true;
};
/*
Create a blank structure representing a text operation
*/
FramedEngine.prototype.createTextOperation = function() {
var operation = {
text: this.domNode.value,
selStart: this.domNode.selectionStart,
selEnd: this.domNode.selectionEnd,
cutStart: null,
cutEnd: null,
replacement: null,
newSelStart: null,
newSelEnd: null
};
operation.selection = operation.text.substring(operation.selStart,operation.selEnd);
return operation;
};
/*
Execute a text operation
*/
FramedEngine.prototype.executeTextOperation = function(operation) {
// Perform the required changes to the text area and the underlying tiddler
var newText = operation.text;
if(operation.replacement !== null) {
// Work around the problem that textInput can't be used directly to delete text without also replacing it with a non-zero length string
if(operation.replacement === "") {
operation.replacement = operation.text.substring(0,operation.cutStart) + operation.text.substring(operation.cutEnd);
operation.cutStart = 0;
operation.cutEnd = operation.text.length;
}
newText = operation.text.substring(0,operation.cutStart) + operation.replacement + operation.text.substring(operation.cutEnd);
// Attempt to use a TextEvent to modify the value of the control
var textEvent = this.domNode.ownerDocument.createEvent("TextEvent");
if(textEvent.initTextEvent) {
textEvent.initTextEvent("textInput", true, true, null, operation.replacement, 9, "en-US");
this.domNode.focus();
this.domNode.setSelectionRange(operation.cutStart,operation.cutEnd);
this.domNode.dispatchEvent(textEvent);
} else {
this.domNode.value = newText;
}
this.domNode.focus();
this.domNode.setSelectionRange(operation.newSelStart,operation.newSelEnd);
}
this.domNode.focus();
return newText;
};
/*
Execute a command
*/
FramedEngine.prototype.execCommand = function(command) {
this.iframeNode.focus();
this.domNode.focus();
switch(command) {
case "undo":
this.iframeDoc.execCommand("undo", false, null);
break;
case "redo":
this.iframeDoc.execCommand("redo", false, null);
break;
}
};
exports.FramedEngine = FramedEngine;
})();

View File

@ -0,0 +1,153 @@
/*\
title: $:/core/modules/editor/engines/simple.js
type: application/javascript
module-type: library
Text editor engine based on a simple input or textarea tag
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var HEIGHT_VALUE_TITLE = "$:/config/TextEditor/EditorHeight/Height";
function SimpleEngine(options) {
// Save our options
options = options || {};
this.widget = options.widget;
this.value = options.value;
this.parentNode = options.parentNode;
this.nextSibling = options.nextSibling;
// Construct the textarea or input node
var tag = this.widget.editTag;
if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {
tag = "input";
}
this.domNode = this.widget.document.createElement(tag);
if(this.widget.editType) {
this.domNode.setAttribute("type",this.widget.editType);
}
if(this.widget.editPlaceholder) {
this.domNode.setAttribute("placeholder",this.widget.editPlaceholder);
}
if(this.widget.editSize) {
this.domNode.setAttribute("size",this.widget.editSize);
}
if(this.widget.editRows) {
this.domNode.setAttribute("rows",this.widget.editRows);
}
if(this.widget.editClass) {
this.domNode.className = this.widget.editClass;
}
// Set the text
if(this.widget.editTag === "textarea") {
this.domNode.appendChild(this.widget.document.createTextNode(this.value));
} else {
this.domNode.value = this.value;
}
// Add an input event handler
$tw.utils.addEventListeners(this.domNode,[
{name: "focus", handlerObject: this, handlerMethod: "handleFocusEvent"},
{name: "input", handlerObject: this, handlerMethod: "handleInputEvent"}
]);
// Insert the element into the DOM
this.parentNode.insertBefore(this.domNode,this.nextSibling);
this.widget.domNodes.push(this.domNode);
}
/*
Set the text of the engine if it doesn't currently have focus
*/
SimpleEngine.prototype.setText = function(text,type) {
if(!this.domNode.isTiddlyWikiFakeDom) {
if(this.domNode.ownerDocument.activeElement !== this.domNode) {
this.domNode.value = text;
}
// Fix the height if needed
this.fixHeight();
}
};
/*
Get the text of the engine
*/
SimpleEngine.prototype.getText = function() {
return this.domNode.value;
};
/*
Fix the height of textarea to fit content
*/
SimpleEngine.prototype.fixHeight = function() {
if(this.widget.editTag === "textarea") {
if(this.widget.editAutoHeight) {
if(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {
$tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);
}
} else {
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
fixedHeight = Math.max(fixedHeight,20);
this.domNode.style.height = fixedHeight + "px";
}
}
};
/*
Focus the engine node
*/
SimpleEngine.prototype.focus = function() {
if(this.domNode.focus && this.domNode.select) {
this.domNode.focus();
this.domNode.select();
}
}
/*
Handle a dom "input" event which occurs when the text has changed
*/
SimpleEngine.prototype.handleInputEvent = function(event) {
this.widget.saveChanges(this.getText());
this.fixHeight();
return true;
};
/*
Handle a dom "focus" event
*/
SimpleEngine.prototype.handleFocusEvent = function(event) {
if(this.widget.editFocusPopup) {
$tw.popup.triggerPopup({
domNode: this.domNode,
title: this.widget.editFocusPopup,
wiki: this.widget.wiki,
force: true
});
}
return true;
};
/*
Create a blank structure representing a text operation
*/
SimpleEngine.prototype.createTextOperation = function() {
return null;
};
/*
Execute a command
*/
SimpleEngine.prototype.execCommand = function() {
};
/*
Execute a text operation
*/
SimpleEngine.prototype.executeTextOperation = function(operation) {
};
exports.SimpleEngine = SimpleEngine;
})();

View File

@ -0,0 +1,309 @@
/*\
title: $:/core/modules/editor/factory.js
type: application/javascript
module-type: library
Factory for constructing text editor widgets with specified engines for the toolbar and non-toolbar cases
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas in pixels
// Configuration tiddlers
var HEIGHT_MODE_TITLE = "$:/config/TextEditor/EditorHeight/Mode";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
var EditTextWidget = function(parseTreeNode,options) {
// Initialise the editor operations if they've not been done already
if(!this.editorOperations) {
EditTextWidget.prototype.editorOperations = {};
$tw.modules.applyMethods("texteditoroperation",this.editorOperations);
}
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
EditTextWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
EditTextWidget.prototype.render = function(parent,nextSibling) {
var self = this;
// Save the parent dom node
this.parentDomNode = parent;
// Compute our attributes
this.computeAttributes();
// Execute our logic
this.execute();
// Create the wrapper for the toolbar and render its content
if(this.editShowToolbar) {
this.toolbarNode = this.document.createElement("div");
this.toolbarNode.className = "tc-editor-toolbar";
parent.insertBefore(this.toolbarNode,nextSibling);
this.renderChildren(this.toolbarNode,null);
this.domNodes.push(this.toolbarNode);
}
// Create our element
var editInfo = this.getEditInfo(),
Engine = this.editShowToolbar ? toolbarEngine : nonToolbarEngine;
this.engine = new Engine({
widget: this,
value: editInfo.value,
type: editInfo.type,
parentNode: parent,
nextSibling: nextSibling
});
// Call the postRender hook
if(this.postRender) {
this.postRender();
}
// Fix height
this.engine.fixHeight();
// Focus if required
if(this.editFocus === "true") {
this.engine.focus();
}
// Add widget message listeners
this.addEventListeners([
{type: "tm-edit-text-operation", handler: "handleEditTextOperationMessage"}
]);
};
/*
Get the tiddler being edited and current value
*/
EditTextWidget.prototype.getEditInfo = function() {
// Get the edit value
var self = this,
value,
type = "text/plain",
update;
if(this.editIndex) {
value = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);
update = function(value) {
var data = self.wiki.getTiddlerData(self.editTitle,{});
if(data[self.editIndex] !== value) {
data[self.editIndex] = value;
self.wiki.setTiddlerData(self.editTitle,data);
}
};
} else {
// Get the current tiddler and the field name
var tiddler = this.wiki.getTiddler(this.editTitle);
if(tiddler) {
// If we've got a tiddler, the value to display is the field string value
value = tiddler.getFieldString(this.editField);
if(this.editField === "text") {
type = tiddler.fields.type || "text/vnd.tiddlywiki";
}
} else {
// Otherwise, we need to construct a default value for the editor
switch(this.editField) {
case "text":
value = "Type the text for the tiddler '" + this.editTitle + "'";
type = "text/vnd.tiddlywiki";
break;
case "title":
value = this.editTitle;
break;
default:
value = "";
break;
}
if(this.editDefault !== undefined) {
value = this.editDefault;
}
}
update = function(value) {
var tiddler = self.wiki.getTiddler(self.editTitle),
updateFields = {
title: self.editTitle
};
updateFields[self.editField] = value;
self.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));
};
}
if(this.editType) {
type = this.editType;
}
return {value: value || "", type: type, update: update};
};
/*
Handle an edit text operation message from the toolbar
*/
EditTextWidget.prototype.handleEditTextOperationMessage = function(event) {
// Prepare information about the operation
var operation = this.engine.createTextOperation();
// Invoke the handler for the selected operation
var handler = this.editorOperations[event.param];
if(handler) {
handler.call(this,event,operation);
}
// Execute the operation via the engine
var newText = this.engine.executeTextOperation(operation);
// Fix the tiddler height and save changes
this.engine.fixHeight();
this.saveChanges(newText);
};
/*
Compute the internal state of the widget
*/
EditTextWidget.prototype.execute = function() {
// Get our parameters
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
this.editField = this.getAttribute("field","text");
this.editIndex = this.getAttribute("index");
this.editDefault = this.getAttribute("default");
this.editClass = this.getAttribute("class");
this.editPlaceholder = this.getAttribute("placeholder");
this.editSize = this.getAttribute("size");
this.editRows = this.getAttribute("rows");
this.editAutoHeight = this.wiki.getTiddlerText(HEIGHT_MODE_TITLE,"auto");
this.editAutoHeight = this.getAttribute("autoHeight",this.editAutoHeight === "auto" ? "yes" : "no") === "yes";
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
this.editFocusPopup = this.getAttribute("focusPopup");
this.editFocus = this.getAttribute("focus");
// Get the default editor element tag and type
var tag,type;
if(this.editField === "text") {
tag = "textarea";
} else {
tag = "input";
var fieldModule = $tw.Tiddler.fieldModules[this.editField];
if(fieldModule && fieldModule.editTag) {
tag = fieldModule.editTag;
}
if(fieldModule && fieldModule.editType) {
type = fieldModule.editType;
}
type = type || "text";
}
// Get the rest of our parameters
this.editTag = this.getAttribute("tag",tag);
this.editType = this.getAttribute("type",type);
// Make the child widgets
this.makeChildWidgets();
// Determine whether to show the toolbar
this.editShowToolbar = !!(this.children && this.children.length > 0);
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
EditTextWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// Completely rerender if any of our attributes have changed
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedTiddlers[HEIGHT_MODE_TITLE]) {
this.refreshSelf();
return true;
} else if(changedTiddlers[this.editTitle]) {
var editInfo = this.getEditInfo();
this.updateEditor(editInfo.value,editInfo.type);
}
this.engine.fixHeight();
return this.refreshChildren(changedTiddlers);
};
/*
Update the editor with new text. This method is separate from updateEditorDomNode()
so that subclasses can override updateEditor() and still use updateEditorDomNode()
*/
EditTextWidget.prototype.updateEditor = function(text,type) {
this.updateEditorDomNode(text,type);
};
/*
Update the editor dom node with new text
*/
EditTextWidget.prototype.updateEditorDomNode = function(text,type) {
this.engine.setText(text,type);
};
/*
Save changes back to the tiddler store
*/
EditTextWidget.prototype.saveChanges = function(text) {
var editInfo = this.getEditInfo();
if(text !== editInfo.value) {
editInfo.update(text);
}
};
/*
Handle a dom "keydown" event, which we'll bubble up to our container for the keyboard widgets benefit
*/
EditTextWidget.prototype.handleKeydownEvent = function(event) {
// Check for a keyboard shortcut
if(this.toolbarNode) {
var shortcutElements = this.toolbarNode.querySelectorAll("[data-tw-keyboard-shortcut]");
for(var index=0; index<shortcutElements.length; index++) {
var el = shortcutElements[index],
shortcutData = el.getAttribute("data-tw-keyboard-shortcut"),
keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(shortcutData,{
wiki: this.wiki
});
if($tw.keyboardManager.checkKeyDescriptors(event,keyInfoArray)) {
var clickEvent = this.document.createEvent("Events");
clickEvent.initEvent("click",true,false);
el.dispatchEvent(clickEvent);
event.preventDefault();
event.stopPropagation();
return true;
}
}
}
// Propogate the event to the container
if(this.propogateKeydownEvent(event)) {
// Ignore the keydown if it was already handled
event.preventDefault();
event.stopPropagation();
return true;
}
// Otherwise, process the keydown normally
return false;
};
/*
Propogate keydown events to our container for the keyboard widgets benefit
*/
EditTextWidget.prototype.propogateKeydownEvent = function(event) {
var newEvent = this.document.createEventObject ? this.document.createEventObject() : this.document.createEvent("Events");
if(newEvent.initEvent) {
newEvent.initEvent("keydown", true, true);
}
newEvent.keyCode = event.keyCode;
newEvent.which = event.which;
newEvent.metaKey = event.metaKey;
newEvent.ctrlKey = event.ctrlKey;
newEvent.altKey = event.altKey;
newEvent.shiftKey = event.shiftKey;
return !this.parentDomNode.dispatchEvent(newEvent);
};
/*
Execute the specified command on the current engine
*/
EditTextWidget.prototype.execCommand = function(command /*, <args> */) {
this.engine.execCommand.apply(this.engine,Array.prototype.slice.call(arguments,0));
};
return EditTextWidget;
}
exports.editTextWidgetFactory = editTextWidgetFactory;
})();

View File

@ -0,0 +1,24 @@
/*\
title: $:/core/modules/editor/operations/bitmap/clear.js
type: application/javascript
module-type: bitmapeditoroperation
Bitmap editor operation to clear the image
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["clear"] = function(event) {
var ctx = this.canvasDomNode.getContext("2d");
ctx.globalAlpha = 1;
ctx.fillStyle = event.paramObject.colour || "white";
ctx.fillRect(0,0,this.canvasDomNode.width,this.canvasDomNode.height);
// Save changes
this.strokeEnd();
};
})();

View File

@ -0,0 +1,29 @@
/*\
title: $:/core/modules/editor/operations/bitmap/resize.js
type: application/javascript
module-type: bitmapeditoroperation
Bitmap editor operation to resize the image
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["resize"] = function(event) {
// Get the new width
var newWidth = parseInt(event.paramObject.width || this.canvasDomNode.width,10),
newHeight = parseInt(event.paramObject.height || this.canvasDomNode.height,10);
// Update if necessary
if(newWidth > 0 && newHeight > 0 && !(newWidth === this.currCanvas.width && newHeight === this.currCanvas.height)) {
this.changeCanvasSize(newWidth,newHeight);
}
// Update the input controls
this.refreshToolbar();
// Save the image into the tiddler
this.saveChanges();
};
})();

View File

@ -0,0 +1,49 @@
/*\
title: $:/core/modules/editor/operations/text/excise.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to excise the selection to a new tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["excise"] = function(event,operation) {
var editTiddler = this.wiki.getTiddler(this.editTitle),
editTiddlerTitle = this.editTitle;
if(editTiddler && editTiddler.fields["draft.of"]) {
editTiddlerTitle = editTiddler.fields["draft.of"];
}
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle("New Excision");
this.wiki.addTiddler(new $tw.Tiddler(
this.wiki.getCreationFields(),
this.wiki.getModificationFields(),
{
title: excisionTitle,
text: operation.selection,
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : []
}
));
operation.replacement = excisionTitle;
switch(event.paramObject.type || "transclude") {
case "transclude":
operation.replacement = "{{" + operation.replacement+ "}}";
break;
case "link":
operation.replacement = "[[" + operation.replacement+ "]]";
break;
case "macro":
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";
break;
}
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
};
})();

View File

@ -0,0 +1,59 @@
/*\
title: $:/core/modules/editor/operations/text/prefix-lines.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to add a prefix to the selected lines
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["prefix-lines"] = function(event,operation) {
// Cut just past the preceding line break, or the start of the text
operation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);
// Cut to just past the following line break, or to the end of the text
operation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);
// Process each line
var lines = operation.text.substring(operation.cutStart,operation.cutEnd).split(/\r?\n/mg);
$tw.utils.each(lines,function(line,index) {
// Compose the required prefix
var prefix = event.paramObject.character.repeat(event.paramObject.count);
// Check if we already have the required prefix
if(line.substring(0,prefix.length) === prefix) {
// If so, remove the prefix
line = line.substring(prefix.length);
// Remove any whitespace
while(line.charAt(0) === " ") {
line = line.substring(1);
}
} else {
// If we didn't have the prefix, remove any existing prefix characters
while(line.charAt(0) === event.paramObject.character) {
line = line.substring(1);
}
// Remove any whitespace
while(line.charAt(0) === " ") {
line = line.substring(1);
}
// Apply the prefix
line = prefix + " " + line;
}
// Save the modified line
lines[index] = line;
});
// Stitch the replacement text together and set the selection
operation.replacement = lines.join("\n");
if(lines.length === 1) {
operation.newSelStart = operation.cutStart + operation.replacement.length;
operation.newSelEnd = operation.newSelStart;
} else {
operation.newSelStart = operation.cutStart;
operation.newSelEnd = operation.newSelStart + operation.replacement.length;
}
};
})();

View File

@ -0,0 +1,19 @@
/*\
title: $:/core/modules/editor/operations/text/redo.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to tell the browser to perform an redo
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["redo"] = function(event,operation) {
this.execCommand("redo");
};
})();

View File

@ -0,0 +1,23 @@
/*\
title: $:/core/modules/editor/operations/text/replace-all.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to replace the entire text
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["replace-all"] = function(event,operation) {
operation.cutStart = 0;
operation.cutEnd = operation.text.length;
operation.replacement = event.paramObject.text;
operation.newSelStart = 0;
operation.newSelEnd = operation.replacement.length;
};
})();

View File

@ -0,0 +1,23 @@
/*\
title: $:/core/modules/editor/operations/text/replace-selection.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to replace the selection
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["replace-selection"] = function(event,operation) {
operation.replacement = event.paramObject.text;
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
};
})();

View File

@ -0,0 +1,19 @@
/*\
title: $:/core/modules/editor/operations/text/undo.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to tell the browser to perform an undo
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["undo"] = function(event,operation) {
this.execCommand("undo");
};
})();

View File

@ -0,0 +1,28 @@
/*\
title: $:/core/modules/editor/operations/text/wrap-lines.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to wrap the selected lines with a prefix and suffix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["wrap-lines"] = function(event,operation) {
// Cut just past the preceding line break, or the start of the text
operation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);
// Cut to just past the following line break, or to the end of the text
operation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);
// Add the prefix and suffix
operation.replacement = event.paramObject.prefix + "\n" +
operation.text.substring(operation.cutStart,operation.cutEnd) + "\n" +
event.paramObject.suffix + "\n";
operation.newSelStart = operation.cutStart + event.paramObject.prefix.length + 1;
operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);
};
})();

View File

@ -0,0 +1,52 @@
/*\
title: $:/core/modules/editor/operations/text/wrap-selection.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to wrap the selection with the specified prefix and suffix
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["wrap-selection"] = function(event,operation) {
if(operation.selStart === operation.selEnd) {
// No selection; check if we're within the prefix/suffix
if(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) {
// Remove the prefix and suffix unless they comprise the entire text
if(operation.selStart > event.paramObject.prefix.length || (operation.selEnd + event.paramObject.suffix.length) < operation.text.length ) {
operation.cutStart = operation.selStart - event.paramObject.prefix.length;
operation.cutEnd = operation.selEnd + event.paramObject.suffix.length;
operation.replacement = "";
operation.newSelStart = operation.cutStart;
operation.newSelEnd = operation.newSelStart;
}
} else {
// Wrap the cursor instead
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.replacement = event.paramObject.prefix + event.paramObject.suffix;
operation.newSelStart = operation.selStart + event.paramObject.prefix.length;
operation.newSelEnd = operation.newSelStart;
}
} else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) {
// Prefix and suffix are already present, so remove them
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length);
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
} else {
// Add the prefix and suffix
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix;
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
}
};
})();

279
core/modules/keyboard.js Normal file
View File

@ -0,0 +1,279 @@
/*\
title: $:/core/modules/keyboard.js
type: application/javascript
module-type: global
Keyboard handling utilities
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var namedKeys = {
"cancel": 3,
"help": 6,
"backspace": 8,
"tab": 9,
"clear": 12,
"return": 13,
"enter": 13,
"pause": 19,
"escape": 27,
"space": 32,
"page_up": 33,
"page_down": 34,
"end": 35,
"home": 36,
"left": 37,
"up": 38,
"right": 39,
"down": 40,
"printscreen": 44,
"insert": 45,
"delete": 46,
"0": 48,
"1": 49,
"2": 50,
"3": 51,
"4": 52,
"5": 53,
"6": 54,
"7": 55,
"8": 56,
"9": 57,
"firefoxsemicolon": 59,
"firefoxequals": 61,
"a": 65,
"b": 66,
"c": 67,
"d": 68,
"e": 69,
"f": 70,
"g": 71,
"h": 72,
"i": 73,
"j": 74,
"k": 75,
"l": 76,
"m": 77,
"n": 78,
"o": 79,
"p": 80,
"q": 81,
"r": 82,
"s": 83,
"t": 84,
"u": 85,
"v": 86,
"w": 87,
"x": 88,
"y": 89,
"z": 90,
"numpad0": 96,
"numpad1": 97,
"numpad2": 98,
"numpad3": 99,
"numpad4": 100,
"numpad5": 101,
"numpad6": 102,
"numpad7": 103,
"numpad8": 104,
"numpad9": 105,
"multiply": 106,
"add": 107,
"separator": 108,
"subtract": 109,
"decimal": 110,
"divide": 111,
"f1": 112,
"f2": 113,
"f3": 114,
"f4": 115,
"f5": 116,
"f6": 117,
"f7": 118,
"f8": 119,
"f9": 120,
"f10": 121,
"f11": 122,
"f12": 123,
"f13": 124,
"f14": 125,
"f15": 126,
"f16": 127,
"f17": 128,
"f18": 129,
"f19": 130,
"f20": 131,
"f21": 132,
"f22": 133,
"f23": 134,
"f24": 135,
"firefoxminus": 173,
"semicolon": 186,
"equals": 187,
"comma": 188,
"dash": 189,
"period": 190,
"slash": 191,
"backquote": 192,
"openbracket": 219,
"backslash": 220,
"closebracket": 221,
"quote": 222
};
function KeyboardManager(options) {
var self = this;
options = options || "";
// Save the named key hashmap
this.namedKeys = namedKeys;
// Create a reverse mapping of code to keyname
this.keyNames = [];
$tw.utils.each(namedKeys,function(keyCode,name) {
self.keyNames[keyCode] = name.substr(0,1).toUpperCase() + name.substr(1);
});
// Save the platform-specific name of the "meta" key
this.metaKeyName = $tw.platform.isMac ? "cmd-" : "win-";
}
/*
Return an array of keycodes for the modifier keys ctrl, shift, alt, meta
*/
KeyboardManager.prototype.getModifierKeys = function() {
return [
16, // Shift
17, // Ctrl
18, // Alt
20, // CAPS LOCK
91, // Meta (left)
93, // Meta (right)
224 // Meta (Firefox)
]
};
/*
Parses a key descriptor into the structure:
{
keyCode: numeric keycode
shiftKey: boolean
altKey: boolean
ctrlKey: boolean
metaKey: boolean
}
Key descriptors have the following format:
ctrl+enter
ctrl+shift+alt+A
*/
KeyboardManager.prototype.parseKeyDescriptor = function(keyDescriptor) {
var components = keyDescriptor.split(/\+|\-/),
info = {
keyCode: 0,
shiftKey: false,
altKey: false,
ctrlKey: false,
metaKey: false
};
for(var t=0; t<components.length; t++) {
var s = components[t].toLowerCase(),
c = s.charCodeAt(0);
// Look for modifier keys
if(s === "ctrl") {
info.ctrlKey = true;
} else if(s === "shift") {
info.shiftKey = true;
} else if(s === "alt") {
info.altKey = true;
} else if(s === "meta" || s === "cmd" || s === "win") {
info.metaKey = true;
}
// Replace named keys with their code
if(this.namedKeys[s]) {
info.keyCode = this.namedKeys[s];
}
}
if(info.keyCode) {
return info;
} else {
return null;
}
};
/*
Parse a list of key descriptors into an array of keyInfo objects. The key descriptors can be passed as an array of strings or a space separated string
*/
KeyboardManager.prototype.parseKeyDescriptors = function(keyDescriptors,options) {
var self = this;
options = options || {};
options.stack = options.stack || [];
var wiki = options.wiki || $tw.wiki;
if(typeof keyDescriptors === "string" && keyDescriptors === "") {
return [];
}
if(!$tw.utils.isArray(keyDescriptors)) {
keyDescriptors = keyDescriptors.split(" ");
}
var result = [];
$tw.utils.each(keyDescriptors,function(keyDescriptor) {
// Look for a named shortcut
if(keyDescriptor.substr(0,2) === "((" && keyDescriptor.substr(-2,2) === "))") {
if(options.stack.indexOf(keyDescriptor) === -1) {
options.stack.push(keyDescriptor);
var name = keyDescriptor.substring(2,keyDescriptor.length - 2),
lookupName = function(configName) {
var keyDescriptors = wiki.getTiddlerText("$:/config/" + configName + "/" + name);
if(keyDescriptors) {
result.push.apply(result,self.parseKeyDescriptors(keyDescriptors,options));
}
};
lookupName("shortcuts");
lookupName($tw.platform.isMac ? "shortcuts-mac" : "shortcuts-not-mac");
lookupName($tw.platform.isWindows ? "shortcuts-windows" : "shortcuts-not-windows");
lookupName($tw.platform.isLinux ? "shortcuts-linux" : "shortcuts-not-linux");
}
} else {
result.push(self.parseKeyDescriptor(keyDescriptor));
}
});
return result;
};
KeyboardManager.prototype.getPrintableShortcuts = function(keyInfoArray) {
var self = this,
result = [];
$tw.utils.each(keyInfoArray,function(keyInfo) {
if(keyInfo) {
result.push((keyInfo.ctrlKey ? "ctrl-" : "") +
(keyInfo.shiftKey ? "shift-" : "") +
(keyInfo.altKey ? "alt-" : "") +
(keyInfo.metaKey ? self.metaKeyName : "") +
(self.keyNames[keyInfo.keyCode]));
}
});
return result;
}
KeyboardManager.prototype.checkKeyDescriptor = function(event,keyInfo) {
return keyInfo &&
event.keyCode === keyInfo.keyCode &&
event.shiftKey === keyInfo.shiftKey &&
event.altKey === keyInfo.altKey &&
event.ctrlKey === keyInfo.ctrlKey &&
event.metaKey === keyInfo.metaKey;
};
KeyboardManager.prototype.checkKeyDescriptors = function(event,keyInfoArray) {
for(var t=0; t<keyInfoArray.length; t++) {
if(this.checkKeyDescriptor(event,keyInfoArray[t])) {
return true;
}
}
return false;
};
exports.KeyboardManager = KeyboardManager;
})();

View File

@ -0,0 +1,45 @@
/*\
title: $:/core/modules/macros/displayshortcuts.js
type: application/javascript
module-type: macro
Macro to display a list of keyboard shortcuts in human readable form. Notably, it resolves named shortcuts like `((bold))` to the underlying keystrokes.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = "displayshortcuts";
exports.params = [
{name: "shortcuts"},
{name: "prefix"},
{name: "separator"},
{name: "suffix"}
];
/*
Run the macro
*/
exports.run = function(shortcuts,prefix,separator,suffix) {
var shortcutArray = $tw.keyboardManager.getPrintableShortcuts($tw.keyboardManager.parseKeyDescriptors(shortcuts,{
wiki: this.wiki
}));
if(shortcutArray.length > 0) {
shortcutArray.sort(function(a,b) {
return a.toLowerCase().localeCompare(b.toLowerCase());
})
return prefix + shortcutArray.join(separator) + suffix;
} else {
return "";
}
};
})();

View File

@ -24,9 +24,33 @@ var widget = require("$:/core/modules/widgets/widget.js");
exports.startup = function() {
var modules,n,m,f;
// Minimal browser detection
if($tw.browser) {
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));
}
// Platform detection
$tw.platform = {};
if($tw.browser) {
$tw.platform.isMac = /Mac/.test(navigator.platform);
$tw.platform.isWindows = /win/i.test(navigator.platform);
$tw.platform.isLinux = /Linux/i.test(navigator.appVersion);
} else {
switch(require("os").platform()) {
case "darwin":
$tw.platform.isMac = true;
break;
case "win32":
$tw.platform.isWindows = true;
break;
case "freebsd":
$tw.platform.isLinux = true;
break;
case "linux":
$tw.platform.isLinux = true;
break;
}
}
// Initialise version
$tw.version = $tw.utils.extractVersionInfo();
// Set up the performance framework
$tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,"no") === "yes");
@ -50,6 +74,8 @@ exports.startup = function() {
"$:/themes/tiddlywiki/vanilla"
]
});
// Kick off the keyboard manager
$tw.keyboardManager = new $tw.KeyboardManager();
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
$tw.wiki.clearTiddlerEventQueue();
// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers

View File

@ -60,6 +60,20 @@ exports.toggleClass = function(el,className,status) {
}
};
/*
Get the first parent element that has scrollbars or use the body as fallback.
*/
exports.getScrollContainer = function(el) {
var doc = el.ownerDocument;
while(el.parentNode) {
el = el.parentNode;
if(el.scrollTop) {
return el;
}
}
return doc.body;
};
/*
Get the scroll position of the viewport
Returns:
@ -76,6 +90,31 @@ exports.getScrollPosition = function() {
}
};
/*
Adjust the height of a textarea to fit its content, preserving scroll position, and return the height
*/
exports.resizeTextAreaToFit = function(domNode,minHeight) {
// Get the scroll container and register the current scroll position
var container = $tw.utils.getScrollContainer(domNode),
scrollTop = container.scrollTop;
// Measure the specified minimum height
domNode.style.height = minHeight;
var measuredHeight = domNode.offsetHeight;
// Set its height to auto so that it snaps to the correct height
domNode.style.height = "auto";
// Calculate the revised height
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,measuredHeight);
// Only try to change the height if it has changed
if(newHeight !== domNode.offsetHeight) {
domNode.style.height = newHeight + "px";
// Make sure that the dimensions of the textarea are recalculated
$tw.utils.forceLayout(domNode);
// Set the container to the position we registered at the beginning
container.scrollTop = scrollTop;
}
return newHeight;
};
/*
Gets the bounding rectangle of an element in absolute page coordinates
*/
@ -164,5 +203,30 @@ exports.addEventListeners = function(domNode,events) {
});
};
/*
Get the computed styles applied to an element as an array of strings of individual CSS properties
*/
exports.getComputedStyles = function(domNode) {
var textAreaStyles = window.getComputedStyle(domNode,null),
styleDefs = [];
$tw.utils.each(Object.keys(textAreaStyles),function(name) {
styleDefs.push(name + ": " + textAreaStyles[name] + ";");
});
return styleDefs;
};
/*
Apply a set of styles passed as an array of strings of individual CSS properties
*/
exports.setStyles = function(domNode,styleDefs) {
domNode.style.cssText = styleDefs.join("");
};
/*
Copy the computed styles from a source element to a destination element
*/
exports.copyStyles = function(srcDomNode,dstDomNode) {
$tw.utils.setStyles(dstDomNode,$tw.utils.getComputedStyles(srcDomNode));
};
})();

View File

@ -3,7 +3,7 @@ title: $:/core/modules/utils/dom/keyboard.js
type: application/javascript
module-type: utils
Keyboard utilities
Keyboard utilities; now deprecated. Instead, use $tw.keyboardManager
\*/
(function(){
@ -12,60 +12,14 @@ Keyboard utilities
/*global $tw: false */
"use strict";
var namedKeys = {
"backspace": 8,
"tab": 9,
"enter": 13,
"escape": 27
};
/*
Parses a key descriptor into the structure:
{
keyCode: numeric keycode
shiftKey: boolean
altKey: boolean
ctrlKey: boolean
}
Key descriptors have the following format:
ctrl+enter
ctrl+shift+alt+A
*/
exports.parseKeyDescriptor = function(keyDescriptor) {
var components = keyDescriptor.split("+"),
info = {
keyCode: 0,
shiftKey: false,
altKey: false,
ctrlKey: false
};
for(var t=0; t<components.length; t++) {
var s = components[t].toLowerCase();
// Look for modifier keys
if(s === "ctrl") {
info.ctrlKey = true;
} else if(s === "shift") {
info.shiftKey = true;
} else if(s === "alt") {
info.altKey = true;
} else if(s === "meta") {
info.metaKey = true;
["parseKeyDescriptor","checkKeyDescriptor"].forEach(function(method) {
exports[method] = function() {
if($tw.keyboardManager) {
return $tw.keyboardManager[method].apply($tw.keyboardManager,Array.prototype.slice.call(arguments,0));
} else {
return null
}
// Replace named keys with their code
if(namedKeys[s]) {
info.keyCode = namedKeys[s];
}
}
return info;
};
exports.checkKeyDescriptor = function(event,keyInfo) {
var metaKeyStatus = !!keyInfo.metaKey; // Using a temporary variable to keep JSHint happy
return event.keyCode === keyInfo.keyCode &&
event.shiftKey === keyInfo.shiftKey &&
event.altKey === keyInfo.altKey &&
event.ctrlKey === keyInfo.ctrlKey &&
event.metaKey === metaKeyStatus;
};
};
});
})();

View File

@ -31,6 +31,39 @@ exports.trim = function(str) {
}
};
/*
Find the line break preceding a given position in a string
Returns position immediately after that line break, or the start of the string
*/
exports.findPrecedingLineBreak = function(text,pos) {
var result = text.lastIndexOf("\n",pos - 1);
if(result === -1) {
result = 0;
} else {
result++;
if(text.charAt(result) === "\r") {
result++;
}
}
return result;
};
/*
Find the line break following a given position in a string
*/
exports.findFollowingLineBreak = function(text,pos) {
// Cut to just past the following line break, or to the end of the text
var result = text.indexOf("\n",pos);
if(result === -1) {
result = text.length;
} else {
if(text.charAt(result) === "\r") {
result++;
}
}
return result;
};
/*
Return the number of keys in an object
*/

View File

@ -13,16 +13,22 @@ Edit-bitmap widget
"use strict";
// Default image sizes
var DEFAULT_IMAGE_WIDTH = 300,
DEFAULT_IMAGE_HEIGHT = 185;
var DEFAULT_IMAGE_WIDTH = 600,
DEFAULT_IMAGE_HEIGHT = 370;
// Configuration tiddlers
var LINE_WIDTH_TITLE = "$:/config/BitmapEditor/LineWidth",
LINE_COLOUR_TITLE = "$:/config/BitmapEditor/Colour";
LINE_COLOUR_TITLE = "$:/config/BitmapEditor/Colour",
LINE_OPACITY_TITLE = "$:/config/BitmapEditor/Opacity";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var EditBitmapWidget = function(parseTreeNode,options) {
// Initialise the editor operations if they've not been done already
if(!this.editorOperations) {
EditBitmapWidget.prototype.editorOperations = {};
$tw.modules.applyMethods("bitmapeditoroperation",this.editorOperations);
}
this.initialise(parseTreeNode,options);
};
@ -42,7 +48,12 @@ EditBitmapWidget.prototype.render = function(parent,nextSibling) {
this.computeAttributes();
// Execute our logic
this.execute();
// Create our element
// Create the wrapper for the toolbar and render its content
this.toolbarNode = this.document.createElement("div");
this.toolbarNode.className = "tc-editor-toolbar";
parent.insertBefore(this.toolbarNode,nextSibling);
this.domNodes.push(this.toolbarNode);
// Create the on-screen canvas
this.canvasDomNode = $tw.utils.domMaker("canvas",{
document: this.document,
"class":"tc-edit-bitmapeditor",
@ -60,29 +71,33 @@ EditBitmapWidget.prototype.render = function(parent,nextSibling) {
name: "mouseup", handlerObject: this, handlerMethod: "handleMouseUpEvent"
}]
});
this.widthDomNode = $tw.utils.domMaker("input",{
document: this.document,
"class":"tc-edit-bitmapeditor-width",
eventListeners: [{
name: "change", handlerObject: this, handlerMethod: "handleWidthChangeEvent"
}]
});
this.heightDomNode = $tw.utils.domMaker("input",{
document: this.document,
"class":"tc-edit-bitmapeditor-height",
eventListeners: [{
name: "change", handlerObject: this, handlerMethod: "handleHeightChangeEvent"
}]
});
// Insert the elements into the DOM
// Set the width and height variables
this.setVariable("tv-bitmap-editor-width",this.canvasDomNode.width + "px");
this.setVariable("tv-bitmap-editor-height",this.canvasDomNode.height + "px");
// Render toolbar child widgets
this.renderChildren(this.toolbarNode,null);
// // Insert the elements into the DOM
parent.insertBefore(this.canvasDomNode,nextSibling);
parent.insertBefore(this.widthDomNode,nextSibling);
parent.insertBefore(this.heightDomNode,nextSibling);
this.domNodes.push(this.canvasDomNode,this.widthDomNode,this.heightDomNode);
this.domNodes.push(this.canvasDomNode);
// Load the image into the canvas
if($tw.browser) {
this.loadCanvas();
}
// Add widget message listeners
this.addEventListeners([
{type: "tm-edit-bitmap-operation", handler: "handleEditBitmapOperationMessage"}
]);
};
/*
Handle an edit bitmap operation message from the toolbar
*/
EditBitmapWidget.prototype.handleEditBitmapOperationMessage = function(event) {
// Invoke the handler
var handler = this.editorOperations[event.param];
if(handler) {
handler.call(this,event);
}
};
/*
@ -91,13 +106,28 @@ Compute the internal state of the widget
EditBitmapWidget.prototype.execute = function() {
// Get our parameters
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
// Make the child widgets
this.makeChildWidgets();
};
/*
Note that the bitmap editor intentionally doesn't try to refresh itself because it would be confusing to have the image changing spontaneously while editting it
Just refresh the toolbar
*/
EditBitmapWidget.prototype.refresh = function(changedTiddlers) {
return false;
return this.refreshChildren(changedTiddlers);
};
/*
Set the bitmap size variables and refresh the toolbar
*/
EditBitmapWidget.prototype.refreshToolbar = function() {
// Set the width and height variables
this.setVariable("tv-bitmap-editor-width",this.canvasDomNode.width + "px");
this.setVariable("tv-bitmap-editor-height",this.canvasDomNode.height + "px");
// Refresh each of our child widgets
$tw.utils.each(this.children,function(childWidget) {
childWidget.refreshSelf();
});
};
EditBitmapWidget.prototype.loadCanvas = function() {
@ -112,7 +142,7 @@ EditBitmapWidget.prototype.loadCanvas = function() {
self.currCanvas = self.document.createElement("canvas");
self.initCanvas(self.currCanvas,currImage.width,currImage.height,currImage);
// Set the width and height input boxes
self.updateSize();
self.refreshToolbar();
};
currImage.onerror = function() {
// Set the on-screen canvas size and clear it
@ -121,7 +151,7 @@ EditBitmapWidget.prototype.loadCanvas = function() {
self.currCanvas = self.document.createElement("canvas");
self.initCanvas(self.currCanvas,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);
// Set the width and height input boxes
self.updateSize();
self.refreshToolbar();
};
// Get the current bitmap into an image object
currImage.src = "data:" + tiddler.fields.type + ";base64," + tiddler.fields.text;
@ -139,14 +169,6 @@ EditBitmapWidget.prototype.initCanvas = function(canvas,width,height,image) {
}
};
/*
** Update the input boxes with the actual size of the canvas
*/
EditBitmapWidget.prototype.updateSize = function() {
this.widthDomNode.value = this.currCanvas.width;
this.heightDomNode.value = this.currCanvas.height;
};
/*
** Change the size of the canvas, preserving the current image
*/
@ -167,28 +189,6 @@ EditBitmapWidget.prototype.changeCanvasSize = function(newWidth,newHeight) {
ctx.drawImage(this.currCanvas,0,0);
};
EditBitmapWidget.prototype.handleWidthChangeEvent = function(event) {
// Get the new width
var newWidth = parseInt(this.widthDomNode.value,10);
// Update if necessary
if(newWidth > 0 && newWidth !== this.currCanvas.width) {
this.changeCanvasSize(newWidth,this.currCanvas.height);
}
// Update the input controls
this.updateSize();
};
EditBitmapWidget.prototype.handleHeightChangeEvent = function(event) {
// Get the new width
var newHeight = parseInt(this.heightDomNode.value,10);
// Update if necessary
if(newHeight > 0 && newHeight !== this.currCanvas.height) {
this.changeCanvasSize(this.currCanvas.width,newHeight);
}
// Update the input controls
this.updateSize();
};
EditBitmapWidget.prototype.handleTouchStartEvent = function(event) {
this.brushDown = true;
this.strokeStart(event.touches[0].clientX,event.touches[0].clientY);
@ -264,8 +264,9 @@ EditBitmapWidget.prototype.strokeMove = function(x,y) {
// Redraw the previous image
ctx.drawImage(this.currCanvas,0,0);
// Render the stroke
ctx.globalAlpha = parseFloat(this.wiki.getTiddlerText(LINE_OPACITY_TITLE,"1.0"));
ctx.strokeStyle = this.wiki.getTiddlerText(LINE_COLOUR_TITLE,"#ff0");
ctx.lineWidth = parseInt(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,"3"),10);
ctx.lineWidth = parseFloat(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,"3"));
ctx.lineCap = "round";
ctx.lineJoin = "round";
ctx.beginPath();
@ -292,7 +293,7 @@ EditBitmapWidget.prototype.saveChanges = function() {
var tiddler = this.wiki.getTiddler(this.editTitle);
if(tiddler) {
// data URIs look like "data:<type>;base64,<text>"
var dataURL = this.canvasDomNode.toDataURL(tiddler.fields.type,1.0),
var dataURL = this.canvasDomNode.toDataURL(tiddler.fields.type),
posColon = dataURL.indexOf(":"),
posSemiColon = dataURL.indexOf(";"),
posComma = dataURL.indexOf(","),

View File

@ -0,0 +1,139 @@
/*\
title: $:/core/modules/widgets/edit-shortcut.js
type: application/javascript
module-type: widget
Widget to display an editable keyboard shortcut
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var EditShortcutWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
EditShortcutWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
EditShortcutWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
this.inputNode = this.document.createElement("input");
// Assign classes
if(this.shortcutClass) {
this.inputNode.className = this.shortcutClass;
}
// Assign other attributes
if(this.shortcutStyle) {
this.inputNode.setAttribute("style",this.shortcutStyle);
}
if(this.shortcutTooltip) {
this.inputNode.setAttribute("title",this.shortcutTooltip);
}
if(this.shortcutPlaceholder) {
this.inputNode.setAttribute("placeholder",this.shortcutPlaceholder);
}
if(this.shortcutAriaLabel) {
this.inputNode.setAttribute("aria-label",this.shortcutAriaLabel);
}
// Assign the current shortcut
this.updateInputNode();
// Add event handlers
$tw.utils.addEventListeners(this.inputNode,[
{name: "keydown", handlerObject: this, handlerMethod: "handleKeydownEvent"}
]);
// Link into the DOM
parent.insertBefore(this.inputNode,nextSibling);
this.domNodes.push(this.inputNode);
};
/*
Compute the internal state of the widget
*/
EditShortcutWidget.prototype.execute = function() {
this.shortcutTiddler = this.getAttribute("tiddler");
this.shortcutField = this.getAttribute("field");
this.shortcutIndex = this.getAttribute("index");
this.shortcutPlaceholder = this.getAttribute("placeholder");
this.shortcutDefault = this.getAttribute("default","");
this.shortcutClass = this.getAttribute("class");
this.shortcutStyle = this.getAttribute("style");
this.shortcutTooltip = this.getAttribute("tooltip");
this.shortcutAriaLabel = this.getAttribute("aria-label");
};
/*
Update the value of the input node
*/
EditShortcutWidget.prototype.updateInputNode = function() {
if(this.shortcutField) {
var tiddler = this.wiki.getTiddler(this.shortcutTiddler);
if(tiddler && $tw.utils.hop(tiddler.fields,this.shortcutField)) {
this.inputNode.value = tiddler.getFieldString(this.shortcutField);
} else {
this.inputNode.value = this.shortcutDefault;
}
} else if(this.shortcutIndex) {
this.inputNode.value = this.wiki.extractTiddlerDataItem(this.shortcutTiddler,this.shortcutIndex,this.shortcutDefault);
} else {
this.inputNode.value = this.wiki.getTiddlerText(this.shortcutTiddler,this.shortcutDefault);
}
};
/*
Handle a dom "keydown" event
*/
EditShortcutWidget.prototype.handleKeydownEvent = function(event) {
// Ignore shift, ctrl, meta, alt
if(event.keyCode && $tw.keyboardManager.getModifierKeys().indexOf(event.keyCode) === -1) {
// Get the shortcut text representation
var value = $tw.keyboardManager.getPrintableShortcuts([{
ctrlKey: event.ctrlKey,
shiftKey: event.shiftKey,
altKey: event.altKey,
metaKey: event.metaKey,
keyCode: event.keyCode
}]);
if(value.length > 0) {
this.wiki.setText(this.shortcutTiddler,this.shortcutField,this.shortcutIndex,value[0]);
}
// Ignore the keydown if it was already handled
event.preventDefault();
event.stopPropagation();
return true;
} else {
return false;
}
};
/*
Selectively refreshes the widget if needed. Returns true if the widget needed re-rendering
*/
EditShortcutWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.placeholder || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.style || changedAttributes.tooltip || changedAttributes["aria-label"]) {
this.refreshSelf();
return true;
} else if(changedTiddlers[this.shortcutTiddler]) {
this.updateInputNode();
return true;
} else {
return false;
}
};
exports["edit-shortcut"] = EditShortcutWidget;
})();

View File

@ -12,280 +12,10 @@ Edit-text widget
/*global $tw: false */
"use strict";
var DEFAULT_MIN_TEXT_AREA_HEIGHT = "100px"; // Minimum height of textareas in pixels
var editTextWidgetFactory = require("$:/core/modules/editor/factory.js").editTextWidgetFactory,
FramedEngine = require("$:/core/modules/editor/engines/framed.js").FramedEngine,
SimpleEngine = require("$:/core/modules/editor/engines/simple.js").SimpleEngine;
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var EditTextWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
EditTextWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
EditTextWidget.prototype.render = function(parent,nextSibling) {
var self = this;
// Save the parent dom node
this.parentDomNode = parent;
// Compute our attributes
this.computeAttributes();
// Execute our logic
this.execute();
// Create our element
var editInfo = this.getEditInfo(),
tag = this.editTag;
if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {
tag = "input";
}
var domNode = this.document.createElement(tag);
if(this.editType) {
domNode.setAttribute("type",this.editType);
}
if(editInfo.value === "" && this.editPlaceholder) {
domNode.setAttribute("placeholder",this.editPlaceholder);
}
if(this.editSize) {
domNode.setAttribute("size",this.editSize);
}
if(this.editRows) {
domNode.setAttribute("rows",this.editRows);
}
// Assign classes
if(this.editClass) {
domNode.className = this.editClass;
}
// Set the text
if(this.editTag === "textarea") {
domNode.appendChild(this.document.createTextNode(editInfo.value));
} else {
domNode.value = editInfo.value;
}
// Add an input event handler
$tw.utils.addEventListeners(domNode,[
{name: "focus", handlerObject: this, handlerMethod: "handleFocusEvent"},
{name: "input", handlerObject: this, handlerMethod: "handleInputEvent"}
]);
// Insert the element into the DOM
parent.insertBefore(domNode,nextSibling);
this.domNodes.push(domNode);
if(this.postRender) {
this.postRender();
}
// Fix height
this.fixHeight();
// Focus field
if(this.editFocus === "true") {
if(domNode.focus && domNode.select) {
domNode.focus();
domNode.select();
}
}
};
/*
Get the tiddler being edited and current value
*/
EditTextWidget.prototype.getEditInfo = function() {
// Get the edit value
var self = this,
value,
update;
if(this.editIndex) {
value = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);
update = function(value) {
var data = self.wiki.getTiddlerData(self.editTitle,{});
if(data[self.editIndex] !== value) {
data[self.editIndex] = value;
self.wiki.setTiddlerData(self.editTitle,data);
}
};
} else {
// Get the current tiddler and the field name
var tiddler = this.wiki.getTiddler(this.editTitle);
if(tiddler) {
// If we've got a tiddler, the value to display is the field string value
value = tiddler.getFieldString(this.editField);
} else {
// Otherwise, we need to construct a default value for the editor
switch(this.editField) {
case "text":
value = "Type the text for the tiddler '" + this.editTitle + "'";
break;
case "title":
value = this.editTitle;
break;
default:
value = "";
break;
}
if(this.editDefault !== undefined) {
value = this.editDefault;
}
}
update = function(value) {
var tiddler = self.wiki.getTiddler(self.editTitle),
updateFields = {
title: self.editTitle
};
updateFields[self.editField] = value;
self.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));
};
}
return {value: value, update: update};
};
/*
Compute the internal state of the widget
*/
EditTextWidget.prototype.execute = function() {
// Get our parameters
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
this.editField = this.getAttribute("field","text");
this.editIndex = this.getAttribute("index");
this.editDefault = this.getAttribute("default");
this.editClass = this.getAttribute("class");
this.editPlaceholder = this.getAttribute("placeholder");
this.editSize = this.getAttribute("size");
this.editRows = this.getAttribute("rows");
this.editAutoHeight = this.getAttribute("autoHeight","yes") === "yes";
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
this.editFocusPopup = this.getAttribute("focusPopup");
this.editFocus = this.getAttribute("focus");
// Get the editor element tag and type
var tag,type;
if(this.editField === "text") {
tag = "textarea";
} else {
tag = "input";
var fieldModule = $tw.Tiddler.fieldModules[this.editField];
if(fieldModule && fieldModule.editTag) {
tag = fieldModule.editTag;
}
if(fieldModule && fieldModule.editType) {
type = fieldModule.editType;
}
type = type || "text";
}
// Get the rest of our parameters
this.editTag = this.getAttribute("tag",tag);
this.editType = this.getAttribute("type",type);
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
EditTextWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// Completely rerender if any of our attributes have changed
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows) {
this.refreshSelf();
return true;
} else if(changedTiddlers[this.editTitle]) {
this.updateEditor(this.getEditInfo().value);
return true;
}
// Fix the height anyway in case there has been a reflow
this.fixHeight();
return false;
};
/*
Update the editor with new text. This method is separate from updateEditorDomNode()
so that subclasses can override updateEditor() and still use updateEditorDomNode()
*/
EditTextWidget.prototype.updateEditor = function(text) {
this.updateEditorDomNode(text);
};
/*
Update the editor dom node with new text
*/
EditTextWidget.prototype.updateEditorDomNode = function(text) {
// Replace the edit value if the tiddler we're editing has changed
var domNode = this.domNodes[0];
if(!domNode.isTiddlyWikiFakeDom) {
if(this.document.activeElement !== domNode) {
domNode.value = text;
}
// Fix the height if needed
this.fixHeight();
}
};
/*
Get the first parent element that has scrollbars or use the body as fallback.
*/
EditTextWidget.prototype.getScrollContainer = function(el) {
while(el.parentNode) {
el = el.parentNode;
if(el.scrollTop) {
return el;
}
}
return this.document.body;
};
/*
Fix the height of textareas to fit their content
*/
EditTextWidget.prototype.fixHeight = function() {
var domNode = this.domNodes[0];
if(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === "textarea") {
// Resize the textarea to fit its content, preserving scroll position
// Get the scroll container and register the current scroll position
var container = this.getScrollContainer(domNode),
scrollTop = container.scrollTop;
// Measure the specified minimum height
domNode.style.height = this.editMinHeight;
var minHeight = domNode.offsetHeight;
// Set its height to auto so that it snaps to the correct height
domNode.style.height = "auto";
// Calculate the revised height
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,minHeight);
// Only try to change the height if it has changed
if(newHeight !== domNode.offsetHeight) {
domNode.style.height = newHeight + "px";
// Make sure that the dimensions of the textarea are recalculated
$tw.utils.forceLayout(domNode);
// Set the container to the position we registered at the beginning
container.scrollTop = scrollTop;
}
}
};
/*
Handle a dom "input" event
*/
EditTextWidget.prototype.handleInputEvent = function(event) {
this.saveChanges(this.domNodes[0].value);
this.fixHeight();
return true;
};
EditTextWidget.prototype.handleFocusEvent = function(event) {
if(this.editFocusPopup) {
$tw.popup.triggerPopup({
domNode: this.domNodes[0],
title: this.editFocusPopup,
wiki: this.wiki,
force: true
});
}
return true;
};
EditTextWidget.prototype.saveChanges = function(text) {
var editInfo = this.getEditInfo();
if(text !== editInfo.value) {
editInfo.update(text);
}
};
exports["edit-text"] = EditTextWidget;
exports["edit-text"] = editTextWidgetFactory(FramedEngine,SimpleEngine);
})();

View File

@ -57,7 +57,8 @@ EditWidget.prototype.execute = function() {
index: {type: "string", value: this.editIndex},
"class": {type: "string", value: this.editClass},
"placeholder": {type: "string", value: this.editPlaceholder}
}
},
children: this.parseTreeNode.children
}]);
};

View File

@ -29,7 +29,8 @@ Render this widget into the DOM
EntityWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.execute();
var textNode = this.document.createTextNode($tw.utils.entityDecode(this.parseTreeNode.entity));
var entityString = this.getAttribute("entity",this.parseTreeNode.entity || ""),
textNode = this.document.createTextNode($tw.utils.entityDecode(entityString));
parent.insertBefore(textNode,nextSibling);
this.domNodes.push(textNode);
};
@ -44,7 +45,13 @@ EntityWidget.prototype.execute = function() {
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
EntityWidget.prototype.refresh = function(changedTiddlers) {
return false;
var changedAttributes = this.computeAttributes();
if(changedAttributes.entity) {
this.refreshSelf();
return true;
} else {
return false;
}
};
exports.entity = EntityWidget;

View File

@ -41,7 +41,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
domNode.className = classes.join(" ");
// Add a keyboard event handler
domNode.addEventListener("keydown",function (event) {
if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {
if($tw.keyboardManager.checkKeyDescriptors(event,self.keyInfoArray)) {
self.invokeActions(this,event);
self.dispatchMessage(event);
event.preventDefault();
@ -68,7 +68,7 @@ KeyboardWidget.prototype.execute = function() {
this.message = this.getAttribute("message");
this.param = this.getAttribute("param");
this.key = this.getAttribute("key");
this.keyInfo = $tw.utils.parseKeyDescriptor(this.key);
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
this["class"] = this.getAttribute("class");
// Make child widgets
this.makeChildWidgets();

View File

@ -0,0 +1,154 @@
/*\
title: $:/core/modules/widgets/wikify.js
type: application/javascript
module-type: widget
Widget to wikify text into a variable
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var WikifyWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
WikifyWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
WikifyWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
};
/*
Compute the internal state of the widget
*/
WikifyWidget.prototype.execute = function() {
// Get our parameters
this.wikifyName = this.getAttribute("name");
this.wikifyText = this.getAttribute("text");
this.wikifyType = this.getAttribute("type");
this.wikifyMode = this.getAttribute("mode","block");
this.wikifyOutput = this.getAttribute("output","text");
// Create the parse tree
this.wikifyParser = this.wiki.parseText(this.wikifyType,this.wikifyText,{
parseAsInline: this.wikifyMode === "inline"
});
// Create the widget tree
this.wikifyWidgetNode = this.wiki.makeWidget(this.wikifyParser,{
document: $tw.fakeDocument,
parentWidget: this
});
// Render the widget tree to the container
this.wikifyContainer = $tw.fakeDocument.createElement("div");
this.wikifyWidgetNode.render(this.wikifyContainer,null);
this.wikifyResult = this.getResult();
// Set context variable
this.setVariable(this.wikifyName,this.wikifyResult);
// Construct the child widgets
this.makeChildWidgets();
};
/*
Return the result string
*/
WikifyWidget.prototype.getResult = function() {
var result;
switch(this.wikifyOutput) {
case "text":
result = this.wikifyContainer.textContent;
break;
case "html":
result = this.wikifyContainer.innerHTML;
break;
case "parsetree":
result = JSON.stringify(this.wikifyParser.tree,0,$tw.config.preferences.jsonSpaces);
break;
case "widgettree":
result = JSON.stringify(this.getWidgetTree(),0,$tw.config.preferences.jsonSpaces);
break;
}
return result;
};
/*
Return a string of the widget tree
*/
WikifyWidget.prototype.getWidgetTree = function() {
var copyNode = function(widgetNode,resultNode) {
var type = widgetNode.parseTreeNode.type;
resultNode.type = type;
switch(type) {
case "element":
resultNode.tag = widgetNode.parseTreeNode.tag;
break;
case "text":
resultNode.text = widgetNode.parseTreeNode.text;
break;
}
if(Object.keys(widgetNode.attributes || {}).length > 0) {
resultNode.attributes = {};
$tw.utils.each(widgetNode.attributes,function(attr,attrName) {
resultNode.attributes[attrName] = widgetNode.getAttribute(attrName);
});
}
if(Object.keys(widgetNode.children || {}).length > 0) {
resultNode.children = [];
$tw.utils.each(widgetNode.children,function(widgetChildNode) {
var node = {};
resultNode.children.push(node);
copyNode(widgetChildNode,node);
});
}
},
results = {};
copyNode(this.wikifyWidgetNode,results);
return results;
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
WikifyWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// Refresh ourselves entirely if any of our attributes have changed
if(changedAttributes.name || changedAttributes.text || changedAttributes.type || changedAttributes.mode || changedAttributes.output) {
this.refreshSelf();
return true;
} else {
// Refresh the widget tree
if(this.wikifyWidgetNode.refresh(changedTiddlers)) {
// Check if there was any change
var result = this.getResult();
if(result !== this.wikifyResult) {
// If so, save the change
this.wikifyResult = result;
this.setVariable(this.wikifyName,this.wikifyResult);
// Refresh each of our child widgets
$tw.utils.each(this.children,function(childWidget) {
childWidget.refreshSelf();
});
return true;
}
}
// Just refresh the children
return this.refreshChildren(changedTiddlers);
}
};
exports.wikify = WikifyWidget;
})();

View File

@ -19,7 +19,7 @@ caption: {{$:/language/ControlPanel/Basics/Caption}}
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|<$link to="$:/status/UserName"><<lingo Username/Prompt>></$link> |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|<$link to="$:/config/AnimationDuration"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit tag="textarea" tiddler="$:/DefaultTiddlers" class="tc-edit-texteditor"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|<$link to="$:/config/NewJournal/Title"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Title" default="" tag="input"/> |
|<$link to="$:/config/NewJournal/Tags"><<lingo NewJournal/Tags/Prompt>></$link> |<$edit-text tiddler="$:/config/NewJournal/Tags" default="" tag="input"/> |
|<<lingo Language/Prompt>> |{{$:/snippets/minilanguageswitcher}} |

View File

@ -0,0 +1,140 @@
title: $:/core/ui/ControlPanel/KeyboardShortcuts
tags: $:/tags/ControlPanel
caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
\define lingo-base() $:/language/ControlPanel/KeyboardShortcuts/
\define new-shortcut(title)
<div class="tc-dropdown-item-plain">
<$edit-shortcut tiddler="$title$" placeholder={{$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt}} style="width:auto;"/> <$button>
<<lingo Add/Caption>>
<$action-listops
$tiddler="$(shortcutTitle)$"
$field="text"
$subfilter="[{$title$}]"
/>
<$action-deletetiddler
$tiddler="$title$"
/>
</$button>
</div>
\end
\define shortcut-list-item(caption)
<td>
</td>
<td style="text-align:right;font-size:0.7em;">
<<lingo Platform/$caption$>>
</td>
<td>
<div style="position:relative;">
<$button popup=<<qualify "$:/state/dropdown/$(shortcutTitle)$">> class="tc-btn-invisible">
{{$:/core/images/edit-button}}
</$button>
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts={{$(shortcutTitle)$}} prefix="<kbd>" separator="</kbd> <kbd>" suffix="</kbd>"/>
<$reveal state=<<qualify "$:/state/dropdown/$(shortcutTitle)$">> type="popup" position="below" animate="yes">
<div class="tc-block-dropdown-wrapper">
<div class="tc-block-dropdown tc-edit-type-dropdown tc-popup-keep">
<$list filter="[list[$(shortcutTitle)$!!text]sort[title]]" variable="shortcut" emptyMessage="""
<div class="tc-dropdown-item-plain">
//<<lingo NoShortcuts/Caption>>//
</div>
""">
<div class="tc-dropdown-item-plain">
<$button class="tc-btn-invisible" tooltip=<<lingo Remove/Hint>>>
<$action-listops
$tiddler="$(shortcutTitle)$"
$field="text"
$subfilter="+[remove<shortcut>]"
/>
&times;
</$button>
<kbd>
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts=<<shortcut>>/>
</kbd>
</div>
</$list>
<hr/>
<$macrocall $name="new-shortcut" title=<<qualify "$:/state/new-shortcut/$(shortcutTitle)$">>/>
</div>
</div>
</$reveal>
</div>
</td>
\end
\define shortcut-list(caption,prefix)
<tr>
<$list filter="[all[tiddlers+shadows][$prefix$$(shortcutName)$]]" variable="shortcutTitle">
<<shortcut-list-item "$caption$">>
</$list>
</tr>
\end
\define shortcut-editor()
<<shortcut-list "All" "$:/config/shortcuts/">>
<<shortcut-list "Mac" "$:/config/shortcuts-mac/">>
<<shortcut-list "NonMac" "$:/config/shortcuts-not-mac/">>
<<shortcut-list "Linux" "$:/config/shortcuts-linux/">>
<<shortcut-list "NonLinux" "$:/config/shortcuts-not-linux/">>
<<shortcut-list "Windows" "$:/config/shortcuts-windows/">>
<<shortcut-list "NonWindows" "$:/config/shortcuts-not-windows/">>
\end
\define shortcut-preview()
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts={{$(shortcutPrefix)$$(shortcutName)$}} prefix="<kbd>" separator="</kbd> <kbd>" suffix="</kbd>"/>
\end
\define shortcut-item-inner()
<tr>
<td>
<$reveal type="nomatch" state=<<dropdownStateTitle>> text="open">
<$button class="tc-btn-invisible">
<$action-setfield
$tiddler=<<dropdownStateTitle>>
$value="open"
/>
{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<dropdownStateTitle>> text="open">
<$button class="tc-btn-invisible">
<$action-setfield
$tiddler=<<dropdownStateTitle>>
$value="close"
/>
{{$:/core/images/down-arrow}}
</$button>
</$reveal>
''<$text text=<<shortcutName>>/>''
</td>
<td>
<$transclude tiddler="$:/config/ShortcutInfo/$(shortcutName)$"/>
</td>
<td>
<$list filter="$:/config/shortcuts/ $:/config/shortcuts-mac/ $:/config/shortcuts-not-mac/ $:/config/shortcuts-linux/ $:/config/shortcuts-not-linux/ $:/config/shortcuts-windows/ $:/config/shortcuts-not-windows/" variable="shortcutPrefix">
<<shortcut-preview>>
</$list>
</td>
</tr>
<$set name="dropdownState" value={{$(dropdownStateTitle)$}}>
<$list filter="[<dropdownState>prefix[open]]" variable="listItem">
<<shortcut-editor>>
</$list>
</$set>
\end
\define shortcut-item()
<$set name="dropdownStateTitle" value=<<qualify "$:/state/dropdown/keyboardshortcut/$(shortcutName)$">>>
<<shortcut-item-inner>>
</$set>
\end
<table>
<tbody>
<$list filter="[all[shadows+tiddlers]removeprefix[$:/config/ShortcutInfo/]]" variable="shortcutName">
<<shortcut-item>>
</$list>
</tbody>
</table>

View File

@ -0,0 +1,21 @@
title: $:/core/ui/ControlPanel/Toolbars/EditorToolbar
tags: $:/tags/ControlPanel/Toolbars
caption: {{$:/language/ControlPanel/Toolbars/EditorToolbar/Caption}}
\define lingo-base() $:/language/TiddlerInfo/
\define config-title()
$:/config/EditorToolbarButtons/Visibility/$(listItem)$
\end
\define toolbar-button()
<$checkbox tiddler=<<config-title>> field="text" checked="show" unchecked="hide" default="show"> <$transclude tiddler={{$(listItem)$!!icon}}/> <$transclude tiddler=<<listItem>> field="caption"/> -- <i class="tc-muted"><$transclude tiddler=<<listItem>> field="description"/></i></$checkbox>
\end
{{$:/language/ControlPanel/Toolbars/EditorToolbar/Hint}}
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]" variable="listItem">
<<toolbar-button>>
</$list>

View File

@ -5,8 +5,8 @@ tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerCl
\end
<div class=<<frame-classes>>>
<$set name="storyTiddler" value=<<currentTiddler>>>
<$keyboard key={{$:/config/shortcuts/cancel-edit-tiddler}} message="tm-cancel-tiddler">
<$keyboard key={{$:/config/shortcuts/save-tiddler}} message="tm-save-tiddler">
<$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
<$keyboard key="((save-tiddler))" message="tm-save-tiddler">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/>
</$list>

View File

@ -0,0 +1,11 @@
title: $:/core/ui/EditTemplate/body/editor
<$edit field="text" class="tc-edit-texteditor" placeholder={{$:/language/EditTemplate/Body/Placeholder}}>
<$set name="targetTiddler" value=<<currentTiddler>>>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]">
<$reveal type="nomatch" state=<<config-visibility-title>> text="hide" class="tc-text-editor-toolbar-item-wrapper">
<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/>
</$reveal>
</$list>
</$set>
</$edit>

View File

@ -0,0 +1,47 @@
title: $:/core/ui/EditTemplate/body/toolbar/button
\define toolbar-button-icon()
<$list filter="[all[current]!has[custom-icon]]" variable="no-custom-icon">
<$transclude tiddler={{!!icon}}/>
</$list>
\end
\define toolbar-button-tooltip()
{{!!description}}<$macrocall $name="displayshortcuts" $output="text/plain" shortcuts={{!!shortcuts}} prefix="` - [" separator="] [" suffix="]`"/>
\end
\define toolbar-button()
<$list filter={{!!condition}} variable="list-condition">
<$wikify name="tooltip-text" text=<<toolbar-button-tooltip>> mode="inline" output="text">
<$list filter="[all[current]!has[dropdown]]" variable="no-dropdown">
<$button class="tc-btn-invisible $(buttonClasses)$" tooltip=<<tooltip-text>>>
<span data-tw-keyboard-shortcut={{!!shortcuts}}/>
<<toolbar-button-icon>>
<$transclude tiddler=<<currentTiddler>> field="text"/>
</$button>
</$list>
<$list filter="[all[current]has[dropdown]]" variable="dropdown">
<$set name="dropdown-state" value=<<qualify "$:/state/EditorToolbarDropdown">>>
<$button popup=<<dropdown-state>> class="tc-popup-keep tc-btn-invisible $(buttonClasses)$" selectedClass="tc-selected" tooltip=<<tooltip-text>>>
<span data-tw-keyboard-shortcut={{!!shortcuts}}/>
<<toolbar-button-icon>>
<$transclude tiddler=<<currentTiddler>> field="text"/>
</$button>
<$reveal state=<<dropdown-state>> type="popup" position="below" animate="yes" tag="span">
<div class="tc-drop-down tc-popup-keep" style="max-width: 75%;">
<$transclude tiddler={{!!dropdown}} mode="block"/>
</div>
</$reveal>
</$set>
</$list>
</$wikify>
</$list>
\end
\define toolbar-button-outer()
<$set name="buttonClasses" value={{!!button-classes}}>
<<toolbar-button>>
</$set>
\end
<<toolbar-button-outer>>

View File

@ -2,6 +2,9 @@ title: $:/core/ui/EditTemplate/body
tags: $:/tags/EditTemplate
\define lingo-base() $:/language/EditTemplate/Body/
\define config-visibility-title()
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\end
<$list filter="[is[current]has[_canonical_uri]]">
<div class="tc-message-box">
@ -20,16 +23,10 @@ tags: $:/tags/EditTemplate
<$reveal state="$:/state/showeditpreview" type="match" text="yes">
<em class="tc-edit"><<lingo Hint>></em> <$button type="set" set="$:/state/showeditpreview" setTo="no"><<lingo Preview/Button/Hide>></$button> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]butfirst[]limit[1]]" variable="listItem">
<em class="tc-edit"><<lingo Preview/Type>></em> <$select tiddler="$:/state/editpreviewtype" default="$:/core/ui/EditTemplate/body/preview/output">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]]">
<option value=<<currentTiddler>>>{{!!caption}}</option>
</$list>
</$select>
</$list>
<div class="tc-tiddler-preview">
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
<div class="tc-tiddler-preview-preview">
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
@ -40,19 +37,13 @@ tags: $:/tags/EditTemplate
</div>
<div class="tc-tiddler-preview-edit">
<$edit field="text" class="tc-edit-texteditor" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>
</div>
</div>
</$reveal>
<$reveal state="$:/state/showeditpreview" type="nomatch" text="yes">
<em class="tc-edit"><<lingo Hint>></em> <$button type="set" set="$:/state/showeditpreview" setTo="yes"><<lingo Preview/Button/Show>></$button>
<$edit field="text" class="tc-edit-texteditor" placeholder={{$:/language/EditTemplate/Body/Placeholder}}/>
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
</$reveal>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/bold
tags: $:/tags/EditorToolbar
icon: $:/core/images/bold
caption: {{$:/language/Buttons/Bold/Caption}}
description: {{$:/language/Buttons/Bold/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((bold))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="wrap-selection"
prefix="''"
suffix="''"
/>

View File

@ -0,0 +1,21 @@
title: $:/core/ui/EditorToolbar/clear-dropdown
''{{$:/language/Buttons/Clear/Hint}}''
<div class="tc-colour-chooser">
<$macrocall $name="colour-picker" actions="""
<$action-sendmessage
$message="tm-edit-bitmap-operation"
$param="clear"
colour=<<colour-picker-value>>
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
"""/>
</div>

View File

@ -0,0 +1,8 @@
title: $:/core/ui/EditorToolbar/clear
tags: $:/tags/EditorToolbar
icon: $:/core/images/erase
caption: {{$:/language/Buttons/Clear/Caption}}
description: {{$:/language/Buttons/Clear/Hint}}
condition: [<targetTiddler>is[image]]
dropdown: $:/core/ui/EditorToolbar/clear-dropdown

View File

@ -0,0 +1,8 @@
title: $:/core/ui/EditorToolbar/editor-height-dropdown
\define lingo-base() $:/language/Buttons/EditorHeight/
''<<lingo Hint>>''
<$radio tiddler="$:/config/TextEditor/EditorHeight/Mode" value="auto"> {{$:/core/images/auto-height}} <<lingo Caption/Auto>></$radio>
<$radio tiddler="$:/config/TextEditor/EditorHeight/Mode" value="fixed"> {{$:/core/images/fixed-height}} <<lingo Caption/Fixed>> <$edit-text tag="input" tiddler="$:/config/TextEditor/EditorHeight/Height" default="100px"/></$radio>

View File

@ -0,0 +1,15 @@
title: $:/core/ui/EditorToolbar/editor-height
tags: $:/tags/EditorToolbar
icon: $:/core/images/fixed-height
custom-icon: yes
caption: {{$:/language/Buttons/EditorHeight/Caption}}
description: {{$:/language/Buttons/EditorHeight/Hint}}
condition: [<targetTiddler>!is[image]]
dropdown: $:/core/ui/EditorToolbar/editor-height-dropdown
<$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="fixed">
{{$:/core/images/fixed-height}}
</$reveal>
<$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="auto">
{{$:/core/images/auto-height}}
</$reveal>

View File

@ -0,0 +1,45 @@
title: $:/core/ui/EditorToolbar/excise-dropdown
\define lingo-base() $:/language/Buttons/Excise/
''<<lingo Hint>>''
<<lingo Caption/NewTitle>> <$edit-text tag="input" tiddler="""$(config-title)$/new-title""" default="" focus="true"/>
<$set name="new-title" value={{$(config-title)$/new-title}}>
<$list filter="""[<new-title>is[tiddler]]""">
<div class="tc-error">
<<lingo Caption/TiddlerExists>>
</div>
</$list>
</$set>
<$checkbox tiddler="""$(config-title)$/tagnew""" field="text" checked="yes" unchecked="no" default="false"> <<lingo Caption/Tag>></$checkbox>
<<lingo Caption/Replace>> <$select tiddler="""$(config-title)$/type""" default="transclude">
<option value="link"><<lingo Caption/Replace/Link>></option>
<option value="transclude"><<lingo Caption/Replace/Transclusion>></option>
<option value="macro"><<lingo Caption/Replace/Macro>></option>
</$select>
<$reveal state="""$(config-title)$/type""" type="match" text="macro">
<<lingo Caption/MacroName>> <$edit-text tag="input" tiddler="""$(config-title)$/macro-title""" default="translink"/>
</$reveal>
<$button>
<$action-sendmessage
$message="tm-edit-text-operation"
$param="excise"
title={{$(config-title)$/new-title}}
type={{$(config-title)$/type}}
macro={{$(config-title)$/macro-title}}
tagnew={{$(config-title)$/tagnew}}
/>
<$action-deletetiddler
$tiddler="""$(config-title)$/new-title"""
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
<<lingo Caption/Excise>>
</$button>

View File

@ -0,0 +1,9 @@
title: $:/core/ui/EditorToolbar/excise
tags: $:/tags/EditorToolbar
icon: $:/core/images/excise
caption: {{$:/language/Buttons/Excise/Caption}}
description: {{$:/language/Buttons/Excise/Hint}}
condition: [<targetTiddler>!is[image]]
shortcuts: ((excise))
dropdown: $:/core/ui/EditorToolbar/excise-dropdown

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/heading-1
tags: $:/tags/EditorToolbar
icon: $:/core/images/heading-1
caption: {{$:/language/Buttons/Heading1/Caption}}
description: {{$:/language/Buttons/Heading1/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((heading-1))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="!"
count="1"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/heading-2
tags: $:/tags/EditorToolbar
icon: $:/core/images/heading-2
caption: {{$:/language/Buttons/Heading2/Caption}}
description: {{$:/language/Buttons/Heading2/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((heading-2))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="!"
count="2"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/heading-3
tags: $:/tags/EditorToolbar
icon: $:/core/images/heading-3
caption: {{$:/language/Buttons/Heading3/Caption}}
description: {{$:/language/Buttons/Heading3/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((heading-3))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="!"
count="3"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/heading-4
tags: $:/tags/EditorToolbar
icon: $:/core/images/heading-4
caption: {{$:/language/Buttons/Heading4/Caption}}
description: {{$:/language/Buttons/Heading4/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((heading-4))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="!"
count="4"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/heading-5
tags: $:/tags/EditorToolbar
icon: $:/core/images/heading-5
caption: {{$:/language/Buttons/Heading5/Caption}}
description: {{$:/language/Buttons/Heading5/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((heading-5))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="!"
count="5"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/heading-6
tags: $:/tags/EditorToolbar
icon: $:/core/images/heading-6
caption: {{$:/language/Buttons/Heading6/Caption}}
description: {{$:/language/Buttons/Heading6/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((heading-6))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="!"
count="6"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/italic
tags: $:/tags/EditorToolbar
icon: $:/core/images/italic
caption: {{$:/language/Buttons/Italic/Caption}}
description: {{$:/language/Buttons/Italic/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((italic))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="wrap-selection"
prefix="//"
suffix="//"
/>

View File

@ -0,0 +1,42 @@
title: $:/core/ui/EditorToolbar/line-width-dropdown
\define lingo-base() $:/language/Buttons/LineWidth/
\define toolbar-line-width-inner()
<$button tag="a" tooltip="""$(line-width)$""">
<$action-setfield
$tiddler="$:/config/BitmapEditor/LineWidth"
$value="$(line-width)$"
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
<div style="display: inline-block; margin: 4px calc(80px - $(line-width)$); background-color: #000; width: calc(100px + $(line-width)$ * 2); height: $(line-width)$; border-radius: 120px; vertical-align: middle;"/>
<span style="margin-left: 8px;">
<$text text="""$(line-width)$"""/>
<$reveal state="$:/config/BitmapEditor/LineWidth" type="match" text="""$(line-width)$""" tag="span">
<$entity entity="&nbsp;"/>
<$entity entity="&#x2713;"/>
</$reveal>
</span>
</$button>
\end
''<<lingo Hint>>''
<$list filter={{$:/config/BitmapEditor/LineWidths}} variable="line-width">
<<toolbar-line-width-inner>>
</$list>

View File

@ -0,0 +1,9 @@
title: $:/core/ui/EditorToolbar/line-width
tags: $:/tags/EditorToolbar
icon: $:/core/images/line-width
caption: {{$:/language/Buttons/LineWidth/Caption}}
description: {{$:/language/Buttons/LineWidth/Hint}}
condition: [<targetTiddler>is[image]]
dropdown: $:/core/ui/EditorToolbar/line-width-dropdown
<$text text={{$:/config/BitmapEditor/LineWidth}}/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/list-bullet
tags: $:/tags/EditorToolbar
icon: $:/core/images/list-bullet
caption: {{$:/language/Buttons/ListBullet/Caption}}
description: {{$:/language/Buttons/ListBullet/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((list-bullet))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="*"
count="1"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/list-number
tags: $:/tags/EditorToolbar
icon: $:/core/images/list-number
caption: {{$:/language/Buttons/ListNumber/Caption}}
description: {{$:/language/Buttons/ListNumber/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((list-number))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="prefix-lines"
character="#"
count="1"
/>

View File

@ -0,0 +1,15 @@
title: $:/core/ui/EditorToolbar/mono-block
tags: $:/tags/EditorToolbar
icon: $:/core/images/mono-block
caption: {{$:/language/Buttons/MonoBlock/Caption}}
description: {{$:/language/Buttons/MonoBlock/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((mono-block))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="wrap-lines"
prefix="
```"
suffix="```"
/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/mono-line
tags: $:/tags/EditorToolbar
icon: $:/core/images/mono-line
caption: {{$:/language/Buttons/MonoLine/Caption}}
description: {{$:/language/Buttons/MonoLine/Hint}}
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
shortcuts: ((mono-line))
<$action-sendmessage
$message="tm-edit-text-operation"
$param="wrap-selection"
prefix="`"
suffix="`"
/>

View File

@ -0,0 +1,19 @@
title: $:/core/ui/EditorToolbar/more-dropdown
\define config-title()
$:/config/EditorToolbarButtons/Visibility/$(toolbarItem)$
\end
\define conditional-button()
<$list filter={{$(toolbarItem)$!!condition}} variable="condition">
<$transclude tiddler="$:/core/ui/EditTemplate/body/toolbar/button" mode="inline"/> <$transclude tiddler=<<toolbarItem>> field="description"/>
</$list>
\end
<div class="tc-text-editor-toolbar-more">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]] -[[$:/core/ui/EditorToolbar/more]]">
<$reveal type="match" state=<<config-visibility-title>> text="hide" tag="div">
<<conditional-button>>
</$reveal>
</$list>
</div>

View File

@ -0,0 +1,8 @@
title: $:/core/ui/EditorToolbar/more
tags: $:/tags/EditorToolbar
icon: $:/core/images/down-arrow
caption: {{$:/language/Buttons/More/Caption}}
description: {{$:/language/Buttons/More/Hint}}
condition: [<targetTiddler>]
dropdown: $:/core/ui/EditorToolbar/more-dropdown
text:

View File

@ -0,0 +1,54 @@
title: $:/core/ui/EditorToolbar/opacity-dropdown
\define lingo-base() $:/language/Buttons/Opacity/
\define toolbar-opacity-inner()
<$button tag="a" tooltip="""$(opacity)$""">
<$action-setfield
$tiddler="$:/config/BitmapEditor/Opacity"
$value="$(opacity)$"
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
<div style="display: inline-block; vertical-align: middle; background-color: $(current-paint-colour)$; opacity: $(opacity)$; width: 1em; height: 1em; border-radius: 50%;"/>
<span style="margin-left: 8px;">
<$text text="""$(opacity)$"""/>
<$reveal state="$:/config/BitmapEditor/Opacity" type="match" text="""$(opacity)$""" tag="span">
<$entity entity="&nbsp;"/>
<$entity entity="&#x2713;"/>
</$reveal>
</span>
</$button>
\end
\define toolbar-opacity()
''<<lingo Hint>>''
<$list filter={{$:/config/BitmapEditor/Opacities}} variable="opacity">
<<toolbar-opacity-inner>>
</$list>
\end
<$set name="current-paint-colour" value={{$:/config/BitmapEditor/Colour}}>
<$set name="current-opacity" value={{$:/config/BitmapEditor/Opacity}}>
<<toolbar-opacity>>
</$set>
</$set>

View File

@ -0,0 +1,9 @@
title: $:/core/ui/EditorToolbar/opacity
tags: $:/tags/EditorToolbar
icon: $:/core/images/opacity
caption: {{$:/language/Buttons/Opacity/Caption}}
description: {{$:/language/Buttons/Opacity/Hint}}
condition: [<targetTiddler>is[image]]
dropdown: $:/core/ui/EditorToolbar/opacity-dropdown
<$text text={{$:/config/BitmapEditor/Opacity}}/>

View File

@ -0,0 +1,16 @@
title: $:/core/ui/EditorToolbar/paint-dropdown
''{{$:/language/Buttons/Paint/Hint}}''
<$macrocall $name="colour-picker" actions="""
<$action-setfield
$tiddler="$:/config/BitmapEditor/Colour"
$value=<<colour-picker-value>>
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
"""/>

View File

@ -0,0 +1,14 @@
title: $:/core/ui/EditorToolbar/paint
tags: $:/tags/EditorToolbar
icon: $:/core/images/paint
caption: {{$:/language/Buttons/Paint/Caption}}
description: {{$:/language/Buttons/Paint/Hint}}
condition: [<targetTiddler>is[image]]
dropdown: $:/core/ui/EditorToolbar/paint-dropdown
\define toolbar-paint()
<div style="display: inline-block; vertical-align: middle; background-color: $(colour-picker-value)$; width: 1em; height: 1em; border-radius: 50%;"/>
\end
<$set name="colour-picker-value" value={{$:/config/BitmapEditor/Colour}}>
<<toolbar-paint>>
</$set>

Some files were not shown because too many files have changed in this diff Show More