Block menu implementation
This commit is contained in:
parent
2334862083
commit
baf388039e
@ -77,7 +77,7 @@
|
||||
"pluralize": "^3.0.0",
|
||||
"react-portal": "^2.2.1",
|
||||
"selection-position": "^1.0.0",
|
||||
"slate": "^0.10.1",
|
||||
"slate-markdown-serializer": "^0.1.2"
|
||||
"slate": "^0.11.0",
|
||||
"slate-markdown-serializer": "^0.1.3"
|
||||
}
|
||||
}
|
||||
|
@ -57,8 +57,8 @@
|
||||
.user:before { content: '\e816'; } /* '' */
|
||||
.users:before { content: '\e817'; } /* '' */
|
||||
.user-add:before { content: '\e818'; } /* '' */
|
||||
.video:before { content: '\e819'; } /* '' */
|
||||
.picture:before { content: '\e81a'; } /* '' */
|
||||
.video-alt:before { content: '\e819'; } /* '' */
|
||||
.picture-alt:before { content: '\e81a'; } /* '' */
|
||||
.camera:before { content: '\e81b'; } /* '' */
|
||||
.layout:before { content: '\e81c'; } /* '' */
|
||||
.menu:before { content: '\e81d'; } /* '' */
|
||||
@ -130,12 +130,12 @@
|
||||
.fast-forward:before { content: '\e85f'; } /* '' */
|
||||
.fast-backward:before { content: '\e860'; } /* '' */
|
||||
.progress-0:before { content: '\e861'; } /* '' */
|
||||
.progress-1:before { content: '\e862'; } /* '' */
|
||||
.progress-alt:before { content: '\e862'; } /* '' */
|
||||
.progress-2:before { content: '\e863'; } /* '' */
|
||||
.progress-3:before { content: '\e864'; } /* '' */
|
||||
.target:before { content: '\e865'; } /* '' */
|
||||
.palette:before { content: '\e866'; } /* '' */
|
||||
.list-1:before { content: '\e867'; } /* '' */
|
||||
.list-alt:before { content: '\e867'; } /* '' */
|
||||
.list-add:before { content: '\e868'; } /* '' */
|
||||
.signal:before { content: '\e869'; } /* '' */
|
||||
.trophy:before { content: '\e86a'; } /* '' */
|
||||
@ -280,16 +280,22 @@
|
||||
.clock:before { content: '\e8f5'; } /* '' */
|
||||
.hourglass:before { content: '\e8f6'; } /* '' */
|
||||
.link-alt:before { content: '\e8f7'; } /* '' */
|
||||
.h1:before { content: '\e8f8'; } /* '' */
|
||||
.h2:before { content: '\e8f9'; } /* '' */
|
||||
.video:before { content: '\e8f8'; } /* '' */
|
||||
.h1:before { content: '\e8f9'; } /* '' */
|
||||
.picture:before { content: '\e8fa'; } /* '' */
|
||||
.scissors:before { content: '\e8fb'; } /* '' */
|
||||
.h2:before { content: '\e8fc'; } /* '' */
|
||||
.list-bullet:before { content: '\f0ca'; } /* '' */
|
||||
.list-numbered:before { content: '\f0cb'; } /* '' */
|
||||
.strike:before { content: '\f0cc'; } /* '' */
|
||||
.underline:before { content: '\f0cd'; } /* '' */
|
||||
.table:before { content: '\f0ce'; } /* '' */
|
||||
.columns:before { content: '\f0db'; } /* '' */
|
||||
.paste:before { content: '\f0ea'; } /* '' */
|
||||
.quote-left:before { content: '\f10d'; } /* '' */
|
||||
.quote-right:before { content: '\f10e'; } /* '' */
|
||||
.code-alt:before { content: '\f121'; } /* '' */
|
||||
.crop:before { content: '\f125'; } /* '' */
|
||||
.unlink:before { content: '\f127'; } /* '' */
|
||||
.superscript:before { content: '\f12b'; } /* '' */
|
||||
.subscript:before { content: '\f12c'; } /* '' */
|
||||
|
@ -6,6 +6,7 @@ const availableIcons = [
|
||||
'bold', 'italic', 'list', 'font', 'text-height', 'text-width', 'align-left', 'align-center', 'align-right',
|
||||
'align-justify', 'indent-left', 'indent-right', 'list-bullet', 'list-numbered', 'strike', 'underline', 'table',
|
||||
'superscript', 'subscript', 'header', 'h1', 'h2', 'paragraph', 'link', 'unlink', 'quote-left', 'quote-right', 'code',
|
||||
'picture','video',
|
||||
// Entypo
|
||||
'note', 'note-beamed',
|
||||
'music',
|
||||
@ -15,8 +16,8 @@ const availableIcons = [
|
||||
'heart', 'heart-empty',
|
||||
'star', 'star-empty',
|
||||
'user', 'users', 'user-add',
|
||||
'video',
|
||||
'picture',
|
||||
'video-alt',
|
||||
'picture-alt',
|
||||
'camera',
|
||||
'layout',
|
||||
'menu',
|
||||
@ -196,8 +197,10 @@ const iconPropType = (props, propName) => {
|
||||
}
|
||||
};
|
||||
|
||||
export default function Icon({ style, className = '', type }) {
|
||||
return <span className={`${styles.root} ${styles[type]} ${className}`} style={style}/>;
|
||||
const noop = function() {};
|
||||
|
||||
export default function Icon({ style, className = '', type, onClick = noop}) {
|
||||
return <span className={`${styles.root} ${styles[type]} ${className}`} style={style} onClick={onClick} />;
|
||||
}
|
||||
|
||||
Icon.propTypes = {
|
||||
|
Binary file not shown.
@ -6,17 +6,17 @@
|
||||
<font id="icons" horiz-adv-x="1000" >
|
||||
<font-face font-family="icons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="bold" unicode="" d="M310 1q41-18 78-18 210 0 210 187 0 64-23 101-15 24-35 41t-37 26-45 14-47 6-53 1q-40 0-56-6 0-29 0-88t-1-89q0-4 0-37t0-54 2-47 7-37z m-8 417q23-4 61-4 46 0 80 7t61 25 41 50 15 79q0 39-16 68t-45 46-60 24-69 8q-28 0-73-7 0-28 3-84t2-85q0-15 0-45t-1-44q0-26 1-38z m-302-497l1 53q9 2 48 9t59 15q4 7 7 15t4 19 4 18 1 21 0 19v36q0 548-12 572-2 5-12 8t-25 6-28 4-27 3-17 2l-2 46q55 1 190 6t208 6q13 0 38-1t38 0q39 0 76-7t72-24 60-39 41-59 16-76q0-29-9-54t-22-40-36-32-41-25-47-22q86-20 144-75t57-138q0-56-20-101t-52-72-77-48-91-27-98-8q-25 0-74 2t-74 1q-59 0-171-6t-129-7z" horiz-adv-x="785.7" />
|
||||
<glyph glyph-name="bold" unicode="" d="M310 1q41-18 78-18 210 0 210 187 0 64-23 101-15 24-34 41t-38 26-45 14-47 6-53 1q-40 0-56-6 0-29 0-88t-1-88q0-5 0-38t0-54 2-47 7-37z m-8 417q23-4 61-4 46 0 80 7t61 25 42 50 14 79q0 39-16 68t-45 46-60 24-69 8q-28 0-73-7 0-28 3-84t2-85q0-15 0-45t-1-44q0-26 1-38z m-302-497l1 53q9 2 48 9t59 15q4 7 7 15t4 19 4 18 1 21 0 19v36q0 548-12 572-2 5-12 8t-25 6-28 4-27 3-17 2l-2 46q55 1 190 6t208 6q13 0 38-1t38 0q39 0 76-7t72-24 60-39 41-59 16-76q0-29-9-54t-22-40-36-32-41-25-47-22q86-20 144-75t57-138q0-56-20-101t-52-72-77-48-91-27-98-8q-25 0-74 2t-74 1q-59 0-171-6t-129-7z" horiz-adv-x="785.7" />
|
||||
|
||||
<glyph glyph-name="italic" unicode="" d="M0-78l10 48q3 1 45 12t62 21q16 19 23 56 1 4 35 162t63 303 29 165v14q-13 7-30 11t-39 4-32 3l10 58q19-2 67-4t84-4 67-1q27 0 55 1t67 4 55 4q-2-22-10-50-17-6-57-16t-60-19q-5-10-8-23t-5-23-4-25-4-24q-15-82-49-234t-43-198q-1-5-7-32t-11-51-9-46-4-32l1-10q9-3 103-18-2-24-9-55-6 0-18-1t-18-1q-16 0-49 6t-48 6q-77 1-115 1-28 0-79-5t-68-7z" horiz-adv-x="571.4" />
|
||||
<glyph glyph-name="italic" unicode="" d="M0-78l10 48q3 1 45 12t62 21q16 19 23 56 1 4 35 162t63 303 29 165v14q-13 8-30 11t-39 4-32 3l10 58q19-1 67-4t84-4 67-1q27 0 55 1t68 4 54 4q-2-22-10-50-17-6-57-16t-60-19q-5-10-8-23t-5-23-4-25-4-24q-15-82-49-234t-43-198q-1-5-7-32t-11-51-9-46-4-32l1-10q9-3 103-18-2-24-9-55-6 0-18-1t-18-1q-16 0-49 6t-48 6q-77 1-115 1-28 0-79-5t-68-7z" horiz-adv-x="571.4" />
|
||||
|
||||
<glyph glyph-name="list" unicode="" d="M143 118v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 13t13 5h107q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-107q-7 0-13 6t-5 12v107q0 8 5 13t13 5h107q7 0 13-5t5-13z m857-428v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z m-857 643v-107q0-8-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m857-429v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 13t12 5h750q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-750q-7 0-12 6t-6 12v107q0 8 6 13t12 5h750q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="font" unicode="" d="M405 538l-95-251q18 0 76-1t89-1q11 0 32 1-48 141-102 252z m-405-617l1 44q13 4 31 7t32 6 28 8 25 17 17 28l132 344 156 404h72q4-8 6-12l114-268q19-44 60-144t63-153q9-19 33-80t40-95q11-25 19-31 11-9 49-17t47-11q4-22 4-32 0-2-1-7t0-8q-35 0-106 5t-107 4q-42 0-120-4t-99-4q0 24 2 43l73 16q1 0 7 1t9 2 8 3 9 4 6 4 5 6 1 8q0 9-17 54t-40 99-24 56l-251 1q-14-32-43-109t-28-91q0-12 8-21t24-14 27-7 32-5 23-2q1-11 1-32 0-5-2-16-32 0-97 6t-97 6q-5 0-15-3t-12-2q-45-8-105-8z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="font" unicode="" d="M405 538l-95-251q18 0 76-1t89-1q11 0 32 1-48 141-102 252z m-405-617l1 44q13 4 31 7t32 6 28 8 25 17 17 28l132 344 156 404h72q4-8 6-12l114-268q19-43 60-144t63-153q9-19 33-80t40-94q11-26 19-32 11-9 49-17t47-11q4-22 4-32 0-2-1-7t0-8q-35 0-106 5t-107 4q-42 0-120-4t-99-4q0 24 2 43l73 16q1 0 7 1t9 2 8 3 9 4 6 4 5 6 1 8q0 9-17 54t-40 99-24 56l-251 1q-14-32-43-109t-28-91q0-12 8-21t24-14 27-7 32-5 23-2q1-11 1-32 0-5-1-16-33 0-98 6t-97 6q-5 0-15-3t-12-2q-45-8-105-8z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="text-height" unicode="" d="M973 64q19 0 24-10t-6-25l-71-90q-11-15-27-15t-27 15l-71 90q-11 15-6 25t23 10h45v572h-45q-18 0-23 10t6 25l71 90q11 15 27 15t27-15l71-90q11-15 6-25t-24-10h-44v-572h44z m-928 714l30-15q7-3 118-3 25 0 74 1t73 1q21 0 60 0t60 0h164q3 0 12 0t11 0 9 1 10 5 8 10l24 1q2 0 7-1t8 0q1-62 1-187 0-45-2-61-22-8-38-10-14 24-31 71-1 5-6 27t-8 41-4 20q-3 4-7 7t-8 3-8 1-10 1-9-1q-9 0-37 1t-42 0-35-1-40-4q-5-45-4-75 0-53 1-217t1-254q0-9-1-40t0-51 7-38q22-12 69-24t67-21q2-22 2-28 0-8-1-16l-19-1q-43-1-122 5t-115 5q-28 0-85-5t-84-5q-2 29-2 29v5q9 15 34 24t55 17 44 15q10 23 10 213 0 57-1 170t-2 169v65q0 1 0 9t1 14-1 14-2 13-3 8q-6 7-90 7-18 0-52-7t-44-15q-11-7-19-40t-18-62-24-30q-23 15-31 25v213z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="text-height" unicode="" d="M973 64q19 0 24-10t-6-25l-71-90q-11-15-27-15t-27 15l-71 90q-11 15-6 25t24 10h44v572h-44q-19 0-24 10t6 25l71 90q11 15 27 15t27-15l71-90q11-15 6-25t-24-10h-44v-572h44z m-928 714l30-15q7-3 118-3 25 0 74 1t73 1q21 0 60 0t60 0h164q3 0 12 0t11 0 9 1 10 5 8 10l24 1q2 0 7-1t8 0q1-62 1-187 0-45-2-61-22-8-38-10-14 24-31 71-1 5-6 27t-8 41-4 20q-3 4-7 7t-8 3-8 1-10 1-9-1q-9 0-37 1t-41 0-36-1-40-3q-5-46-4-76 0-53 1-217t1-254q0-9-1-40t0-51 7-38q22-12 69-24t67-21q2-22 2-28 0-8-1-16l-19-1q-43-1-122 5t-115 5q-28 0-85-5t-84-5q-2 29-2 29v5q9 15 34 24t55 17 44 15q10 23 10 213 0 57-1 170t-2 169v65q0 1 0 9t1 14-1 14-2 13-2 8q-7 7-91 7-18 0-52-7t-44-15q-11-7-19-40t-18-62-24-30q-23 15-31 25v214z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="text-width" unicode="" d="M45 778l30-15q7-3 118-3 25 0 74 1t73 1q39 0 138 1t170 0 138-2q18-1 31 17l23 1q3 0 8-1t8 0q1-62 1-187 0-45-3-61-21-8-38-10-14 24-30 71-1 5-6 27t-8 41-4 20q-6 7-15 10-3 1-37 1-17 0-52 1t-57 1-53-2-53-4q-5-45-5-75l1-85v29q0-31 0-86t1-101 0-85q0-9-1-40t0-51 7-38q22-12 69-24t67-21q3-22 3-28 0-8-2-16l-19-1q-42-1-121 5t-116 5q-28 0-84-5t-85-5q-2 29-2 29v5q10 15 35 24t55 17 43 15q4 9 7 41t3 81 1 87-1 85 0 50q0 4-1 12t-2 12q0 4 1 25t0 41 0 42-1 38-4 18q-6 7-90 7-23 0-91-8t-77-14q-11-6-19-39t-18-63-24-30q-23 15-31 25v213z m686-715q7 0 23-11t33-23 33-28 20-17q14-11 14-27t-14-27q-2-2-20-17t-33-27-33-23-23-11q-7 0-11 5t-6 16-1 19 0 18 1 11h-571q0-1 1-11t1-18-2-19-5-16-12-5q-7 0-23 11t-32 23-34 27-20 17q-14 11-14 27t14 27q3 2 20 17t34 28 32 23 23 11q7 0 12-6t5-16 2-19-1-18-1-11h571q0 1-1 11t0 18 1 19 6 16 11 6z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="text-width" unicode="" d="M45 778l30-15q7-3 118-3 25 0 74 1t73 1q40 0 138 1t170 0 138-2q18-1 31 17l23 1q3 0 8-1t8 0q1-62 1-187 0-45-3-61-21-8-38-10-13 24-30 71-1 5-6 27t-8 41-4 20q-6 7-15 10-3 1-37 1-17 0-52 1t-57 1-53-2-53-3q-5-46-5-76l1-85v29q0-31 0-86t1-101 0-85q0-9-1-40t0-51 7-38q22-12 69-24t67-21q3-22 3-28 0-8-2-16l-19-1q-42-1-121 5t-116 5q-28 0-84-5t-85-5q-2 29-2 29v5q10 15 35 24t55 17 43 15q4 9 7 41t3 81 1 87-1 85 0 50q0 4-1 12t-2 12q0 4 1 25t0 41 0 42-1 38-4 18q-6 7-90 7-23 0-91-8t-77-14q-11-6-19-39t-18-63-24-30q-23 15-31 25v214z m686-715q7 0 24-11t32-23 33-28 20-17q14-11 14-27t-14-27q-2-2-20-17t-33-27-32-23-24-11q-7 0-11 5t-6 16-1 19 0 18 1 11h-571q0-1 1-11t1-18-2-19-5-16-12-5q-7 0-23 11t-32 23-34 27-20 17q-14 11-14 27t14 27q3 2 20 17t34 28 32 23 23 11q7 0 12-6t5-16 2-19-1-18-1-11h571q0 1-1 11t0 18 1 19 6 16 11 6z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="align-left" unicode="" d="M1000 100v-71q0-15-11-25t-25-11h-928q-15 0-25 11t-11 25v71q0 15 11 25t25 11h928q15 0 25-11t11-25z m-214 214v-71q0-15-11-25t-25-11h-714q-15 0-25 11t-11 25v71q0 15 11 25t25 11h714q15 0 25-11t11-25z m143 215v-72q0-14-11-25t-25-11h-857q-15 0-25 11t-11 25v72q0 14 11 25t25 10h857q14 0 25-10t11-25z m-215 214v-72q0-14-10-25t-25-10h-643q-15 0-25 10t-11 25v72q0 14 11 25t25 11h643q14 0 25-11t10-25z" horiz-adv-x="1000" />
|
||||
|
||||
@ -500,37 +500,49 @@
|
||||
|
||||
<glyph glyph-name="hourglass" unicode="" d="M560 622q0-44-48-96t-97-99-49-77 49-76 97-97 48-97l0-118q0-34-86-73t-194-39-194 39-86 73l0 118q0 46 48 97t97 97 49 76-49 77-97 99-48 96l0 118q0 32 87 71t193 39 193-39 87-71l0-118z m-482 112l-18-14q-4-8 4-14 92-52 216-52 132 0 220 50 14 10-16 30-96 54-202 54-120 0-204-54z m228-384q0 18 4 33t18 33 20 25 31 31 29 28q92 92 92 122l2 50q-100-54-222-54t-222 54l4-50q0-32 90-122 6-6 22-21t23-22l19-19t17-21 11-20 9-23 3-24q0-10-1-19t-6-18-8-16-11-17l-12-15t-15-16-16-15-18-16-17-16q-90-90-90-122l0-66q8 4 66 23t92 43 34 58q0 30 26 30t26-30q0-34 33-58t94-43 67-23l0 66q0 30-92 122-4 4-21 20t-22 21-18 19-18 22-12 20-9 23-2 23z" horiz-adv-x="560" />
|
||||
|
||||
<glyph glyph-name="link-1" unicode="" d="M812 171q0 23-15 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q15 16 15 37z m-392 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 10-8 12-12 11-11q18 17 18 41z m500-394q0-67-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l114-116q47-46 47-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="link-1" unicode="" d="M813 171q0 23-16 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-393 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 11-8 12-12 10-11q18 17 18 41z m500-394q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="h1" unicode="" d="M388 39l5 36 31 4c26 4 31 9 31 18v203h-244v-208c0-9 5-13 31-13l31-4 5-36h-248l4 36 31 4c22 4 31 9 31 18v442c0 9-4 14-35 18h-27l-4 35h248l-5-35-31-4c-22 0-31-9-31-18v-195h244v199c0 9-5 14-31 14l-31 4-5 35h248l-4-35-31-4c-22-5-31-9-31-18v-443c0-9 4-13 35-17l31-5 4-35h-252v4z m332 0v36l62 8c14 5 18 9 18 18v306l-84 8v27l186 53v-394c0-9 4-13 17-17l49-9v-36h-247z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="video-1" unicode="" d="M214-43v72q0 14-10 25t-25 10h-72q-14 0-25-10t-11-25v-72q0-14 11-25t25-11h72q14 0 25 11t10 25z m0 214v72q0 14-10 25t-25 11h-72q-14 0-25-11t-11-25v-72q0-14 11-25t25-10h72q14 0 25 10t10 25z m0 215v71q0 15-10 25t-25 11h-72q-14 0-25-11t-11-25v-71q0-15 11-25t25-11h72q14 0 25 11t10 25z m572-429v286q0 14-11 25t-25 11h-429q-14 0-25-11t-10-25v-286q0-14 10-25t25-11h429q15 0 25 11t11 25z m-572 643v71q0 15-10 26t-25 10h-72q-14 0-25-10t-11-26v-71q0-14 11-25t25-11h72q14 0 25 11t10 25z m786-643v72q0 14-11 25t-25 10h-71q-15 0-25-10t-11-25v-72q0-14 11-25t25-11h71q15 0 25 11t11 25z m-214 429v285q0 15-11 26t-25 10h-429q-14 0-25-10t-10-26v-285q0-15 10-25t25-11h429q15 0 25 11t11 25z m214-215v72q0 14-11 25t-25 11h-71q-15 0-25-11t-11-25v-72q0-14 11-25t25-10h71q15 0 25 10t11 25z m0 215v71q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-71q0-15 11-25t25-11h71q15 0 25 11t11 25z m0 214v71q0 15-11 26t-25 10h-71q-15 0-25-10t-11-26v-71q0-14 11-25t25-11h71q15 0 25 11t11 25z m71 89v-750q0-37-26-63t-63-26h-893q-36 0-63 26t-26 63v750q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="h2" unicode="" d="M362 39l5 33 28 4c25 4 29 8 29 17v188h-226v-192c0-9 4-13 29-13l29-4 4-33h-230l4 33 29 4c20 4 29 8 29 17v410c0 8-4 12-33 16h-24l-5 33h230l-4-33-29-4c-20 0-28-8-28-16v-181h225v185c0 8-8 12-33 12l-24 4-5 33h230l-4-33-29-4c-20-4-29-8-29-16v-410c0-8 4-13 33-17l28-4 4-33h-233v4l0 0z m567 0h-267l-4 41c94 99 176 160 176 242 0 46-33 70-69 70s-66-16-99-45l-8 16c29 46 82 95 147 95 78 0 124-49 124-115 0-74-78-131-201-234v-4h45c110 0 119 0 131 16l16 29h29l-20-111z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="h1" unicode="" d="M303-37h-276v34c30 13 60 20 90 26v654c-34 6-64 13-90 26v34h276v-34c-13-6-26-13-40-16-13-4-26-7-43-10v-287h347v287c-17 3-30 6-44 13-13 3-26 10-40 17v33h277v-33c-13-7-27-14-43-17-17-3-30-7-47-10v-653c17-4 33-7 50-10 17-4 30-10 43-17v-33h-276v33c26 13 53 20 83 27v306h-350v-306c13-4 30-7 43-10 14-4 27-10 40-17v-37z m870 0h-303v30c17 7 33 14 53 20 17 7 37 10 54 14v510l3 60c-20-7-40-14-60-17-20-3-43-3-63-3l-7 23c33 10 63 23 97 40 33 17 66 33 93 60h27v-670c16-3 33-10 50-13 16-7 33-14 50-20v-34z" horiz-adv-x="1200" />
|
||||
|
||||
<glyph glyph-name="picture-1" unicode="" d="M357 529q0-45-31-76t-76-32-76 32-31 76 31 76 76 31 76-31 31-76z m572-215v-250h-786v107l178 179 90-89 285 285z m53 393h-893q-7 0-12-5t-6-13v-678q0-7 6-13t12-5h893q7 0 13 5t5 13v678q0 8-5 13t-13 5z m89-18v-678q0-37-26-63t-63-27h-893q-36 0-63 27t-26 63v678q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="scissors" unicode="" d="M536 350q14 0 25-11t10-25-10-25-25-10-25 10-11 25 11 25 25 11z m167-36l283-222q16-11 14-31-3-20-19-28l-72-36q-7-4-16-4-10 0-17 4l-385 216-62-36q-4-3-7-3 8-28 6-54-4-43-31-83t-74-69q-74-47-154-47-76 0-124 44-51 47-44 116 4 42 31 82t73 69q74 47 155 47 46 0 84-18 5 8 13 13l68 40-68 41q-8 5-13 12-38-17-84-17-81 0-155 47-46 30-73 69t-31 82q-3 33 8 63t36 52q47 44 124 44 80 0 154-47 46-29 74-68t31-83q2-27-6-54 3-1 7-3l62-37 385 216q7 5 17 5 9 0 16-4l72-36q16-9 19-28 2-20-14-32z m-380 145q26 24 12 61t-59 65q-52 33-107 33-42 0-63-20-26-24-12-60t59-66q51-33 107-33 41 0 63 20z m-47-415q45 28 59 65t-12 60q-22 20-63 20-56 0-107-33-45-28-59-65t12-60q21-20 63-20 55 0 107 33z m99 342l54-33v7q0 20 18 31l8 4-44 26-15-14q-1-2-5-6t-7-7q-1-1-2-2t-2-1z m125-125l54-18 410 321-71 36-429-240v-64l-89-53 5-5q1-1 4-3 2-2 6-7t6-6l15-15z m393-232l71 35-290 228-99-77q-1-2-7-4z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="h2" unicode="" d="M283-37h-276v34c30 13 60 20 90 26v654c-34 3-64 13-90 26v34h276v-34c-10-6-23-13-36-16-17-4-30-7-44-10v-287h347v287c-17 3-33 6-47 10-13 3-26 10-40 16v34h277v-34c-13-6-27-13-43-16-17-4-30-7-47-10v-654c17-3 33-6 50-10 17-3 30-10 43-16v-34h-276v34c26 13 53 20 83 26v307h-347v-307c14-3 30-6 44-10 13-3 26-10 40-16v-34z m570 524h-26c-7 20-17 43-24 70-6 26-13 53-20 76 24 20 54 37 87 50 33 14 70 17 110 17 33 0 63-3 90-13 23-10 47-24 60-40s27-37 37-57c6-23 10-43 10-67 0-40-10-76-27-120-17-40-40-80-67-116-26-37-56-74-86-107-30-33-60-63-87-90l-43-40v-3l56 6h177l50 117h27c0-17 3-33 3-50 0-17 3-37 3-53s4-37 4-54 0-30 0-43h-420v33c16 17 33 37 56 57 24 23 44 47 67 77 23 26 47 56 70 86 23 30 43 64 60 94 17 33 33 63 43 96 10 34 17 64 17 90 0 20-3 40-7 57-6 17-13 33-23 47-10 13-23 23-37 30-13 6-33 10-50 10-13 0-26 0-36-4-10-3-24-6-37-10l-37-146z" horiz-adv-x="1200" />
|
||||
|
||||
<glyph glyph-name="list-bullet" unicode="" d="M214 64q0-44-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m0 286q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 7 5 12t13 6h678q7 0 13-6t5-12z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="list-numbered" unicode="" d="M213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25 16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31 20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30 0 29 14 52t31 38 37 27 31 24 14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36-42-28-20-30h71v34h59z m786-178v-107q0-8-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 68t1 67v7h-1q-5-10-28-30l-40 42 76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="list-numbered" unicode="" d="M213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25 16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31 20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30 0 29 14 52t31 38 37 27 31 24 14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36-42-28-20-30h71v34h59z m786-178v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 68t1 67v7h-1q-5-10-28-30l-40 42 76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="strike" unicode="" d="M982 350q8 0 13-5t5-13v-36q0-7-5-12t-13-5h-964q-8 0-13 5t-5 12v36q0 8 5 13t13 5h964z m-712 36q-16 19-29 44-27 54-27 105 0 101 75 173 74 71 219 71 28 0 94-11 36-7 98-27 6-21 12-66 8-68 8-102 0-10-3-25l-7-2-46 4-8 1q-28 83-58 114-49 51-117 51-64 0-102-33-37-32-37-81 0-41 37-78t156-72q38-12 96-37 33-16 53-29h-414z m282-143h230q4-22 4-51 0-62-23-119-13-30-40-58-20-19-61-45-44-27-85-37-45-12-113-12-64 0-109 13l-78 23q-32 8-40 15-5 5-5 12v8q0 60-1 87 0 17 0 38l1 20v25l57 1q8-19 17-40t12-31 7-15q20-32 45-52 24-20 59-32 33-12 73-12 36 0 78 15 43 14 68 48 26 34 26 72 0 47-45 87-19 16-77 40z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="strike" unicode="" d="M982 350q8 0 13-5t5-13v-36q0-7-5-12t-13-5h-964q-8 0-13 5t-5 12v36q0 8 5 13t13 5h964z m-712 36q-16 19-29 44-27 55-27 105 0 101 75 173 74 71 219 71 28 0 94-11 36-7 98-27 6-21 12-66 8-68 8-102 0-10-3-25l-7-2-46 4-8 1q-28 83-58 114-49 51-117 51-64 0-101-33-38-32-38-81 0-41 37-78t156-72q38-12 96-37 33-16 53-29h-414z m283-143h229q4-22 4-51 0-62-23-119-13-30-40-58-20-19-61-45-44-27-85-37-45-12-113-12-64 0-109 13l-78 23q-32 8-40 15-5 5-5 12v8q0 60-1 87 0 17 0 38l1 20v25l57 1q8-19 17-40t12-31 7-15q20-32 45-52 24-20 59-32 33-12 73-12 36 0 78 15 43 14 68 48 26 34 26 72 0 47-45 87-19 16-76 40z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="underline" unicode="" d="M27 726q-21 1-25 2l-2 49q7 0 22 0 34 0 63-2 74-4 92-4 48 0 94 2 65 2 82 3 31 0 48 1l-1-8 1-36v-5q-33-5-69-5-33 0-44-14-7-7-7-73 0-8 0-18t0-15l1-127 8-157q3-69 28-112 20-33 54-52 49-26 98-26 58 0 107 16 31 10 55 28 27 20 37 36 20 31 29 63 12 41 12 128 0 44-2 72t-6 68-8 89l-2 33q-3 37-13 49-19 20-43 19l-56-1-8 2 1 48h47l114-6q43-2 110 6l10-2q3-21 3-28 0-4-2-17-25-7-47-8-41-6-44-9-8-8-8-23 0-4 0-15t1-17q5-11 13-221 3-109-9-170-8-42-23-68-21-36-62-69-42-31-102-49-61-19-142-19-93 0-159 26-66 26-99 68-34 42-47 109-9 45-9 132v186q0 105-9 119-14 20-82 22z m830-787v36q0 8-5 13t-13 5h-821q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h821q8 0 13 5t5 13z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="underline" unicode="" d="M27 726q-21 1-25 2l-2 49q7 1 22 1 34 0 63-3 74-4 93-4 47 0 93 2 65 2 82 3 31 0 48 1l-1-8 1-36v-5q-33-5-69-5-33 0-44-14-7-7-7-73 0-7 0-18t0-15l1-127 8-157q3-69 28-112 20-33 54-52 49-26 98-26 59 0 107 16 31 10 55 28 27 20 37 36 20 31 29 63 12 41 12 128 0 44-2 72t-6 68-8 89l-2 33q-3 37-13 49-19 20-43 19l-56-1-8 2 1 48h47l114-6q43-2 110 6l10-1q3-22 3-29 0-4-2-17-25-7-47-8-41-6-44-9-8-8-8-23 0-4 0-15t1-17q5-11 13-221 3-109-9-170-8-42-23-68-21-36-62-69-42-31-102-49-61-19-142-19-93 0-159 26-66 26-99 68-34 42-47 109-9 45-9 132v186q0 105-9 119-14 20-82 22z m830-787v36q0 8-5 13t-13 5h-821q-8 0-13-5t-5-13v-36q0-8 5-13t13-5h821q8 0 13 5t5 13z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="table" unicode="" d="M286 82v107q0 8-5 13t-13 5h-179q-7 0-13-5t-5-13v-107q0-8 5-13t13-5h179q8 0 13 5t5 13z m0 214v108q0 7-5 12t-13 5h-179q-7 0-13-5t-5-12v-108q0-7 5-12t13-5h179q8 0 13 5t5 12z m285-214v107q0 8-5 13t-12 5h-179q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h179q7 0 12 5t5 13z m-285 429v107q0 8-5 13t-13 5h-179q-7 0-13-5t-5-13v-107q0-8 5-13t13-5h179q8 0 13 5t5 13z m285-215v108q0 7-5 12t-12 5h-179q-8 0-13-5t-5-12v-108q0-7 5-12t13-5h179q7 0 12 5t5 12z m286-214v107q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h178q8 0 13 5t5 13z m-286 429v107q0 8-5 13t-12 5h-179q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h179q7 0 12 5t5 13z m286-215v108q0 7-5 12t-13 5h-178q-8 0-13-5t-5-12v-108q0-7 5-12t13-5h178q8 0 13 5t5 12z m0 215v107q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h178q8 0 13 5t5 13z m72 178v-607q0-37-27-63t-63-26h-750q-36 0-63 26t-26 63v607q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="table" unicode="" d="M286 82v107q0 8-5 13t-13 5h-179q-7 0-12-5t-6-13v-107q0-8 6-13t12-5h179q8 0 13 5t5 13z m0 214v108q0 7-5 12t-13 5h-179q-7 0-12-5t-6-12v-108q0-7 6-12t12-5h179q8 0 13 5t5 12z m285-214v107q0 8-5 13t-12 5h-179q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h179q7 0 12 5t5 13z m-285 429v107q0 8-5 13t-13 5h-179q-7 0-12-5t-6-13v-107q0-8 6-13t12-5h179q8 0 13 5t5 13z m285-215v108q0 7-5 12t-12 5h-179q-8 0-13-5t-5-12v-108q0-7 5-12t13-5h179q7 0 12 5t5 12z m286-214v107q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h178q8 0 13 5t5 13z m-286 429v107q0 8-5 13t-12 5h-179q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h179q7 0 12 5t5 13z m286-215v108q0 7-5 12t-13 5h-178q-8 0-13-5t-5-12v-108q0-7 5-12t13-5h178q8 0 13 5t5 12z m0 215v107q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h178q8 0 13 5t5 13z m72 178v-607q0-37-27-63t-63-26h-750q-36 0-63 26t-26 63v607q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="quote-left" unicode="" d="M429 314v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z m500 0v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 15-38t38-16h125q45 0 76-31t32-76z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="columns" unicode="" d="M89-7h340v643h-358v-625q0-7 6-13t12-5z m768 18v625h-357v-643h339q8 0 13 5t5 13z m72 678v-678q0-37-27-63t-63-27h-750q-36 0-63 27t-26 63v678q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="quote-right" unicode="" d="M429 671v-392q0-58-23-111t-61-91-91-62-111-22h-36q-14 0-25 10t-11 26v71q0 15 11 25t25 11h36q59 0 101 42t42 101v17q0 23-16 38t-38 16h-125q-44 0-76 31t-31 76v214q0 45 31 76t76 32h214q45 0 76-32t32-76z m500 0v-392q0-58-23-111t-61-91-91-62-111-22h-36q-14 0-25 10t-11 26v71q0 15 11 25t25 11h36q59 0 101 42t42 101v17q0 23-16 38t-38 16h-125q-44 0-76 31t-31 76v214q0 45 31 76t76 32h214q45 0 76-32t32-76z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="paste" unicode="" d="M429-79h500v358h-233q-22 0-37 15t-16 38v232h-214v-643z m142 804v36q0 7-5 12t-12 6h-393q-7 0-13-6t-5-12v-36q0-7 5-13t13-5h393q7 0 12 5t5 13z m143-375h167l-167 167v-167z m286-71v-375q0-23-16-38t-38-16h-535q-23 0-38 16t-16 38v89h-303q-23 0-38 16t-16 37v750q0 23 16 38t38 16h607q22 0 38-16t15-38v-183q12-7 20-15l228-228q16-15 27-42t11-49z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="code-1" unicode="" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 260q-6 6-6 13t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l208 720q3 8 9 11t13 2l35-10q7-2 11-9t1-13z m367-364l-260-260q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-13z" horiz-adv-x="1071.4" />
|
||||
<glyph glyph-name="quote-left" unicode="" d="M429 314v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z m500 0v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="unlink" unicode="" d="M245 141l-143-143q-5-5-13-5-6 0-13 5-5 5-5 13t5 13l143 142q6 5 13 5t13-5q5-5 5-12t-5-13z m94-23v-179q0-8-5-13t-13-5-12 5-5 13v179q0 8 5 13t12 5 13-5 5-13z m-125 125q0-8-5-13t-13-5h-178q-8 0-13 5t-5 13 5 13 13 5h178q8 0 13-5t5-13z m706-72q0-67-48-113l-82-81q-46-47-113-47-68 0-114 48l-186 187q-12 11-24 31l134 10 152-153q15-15 38-15t38 15l82 81q15 16 15 37 0 23-15 38l-153 154 10 133q20-12 31-23l188-188q47-48 47-114z m-345 404l-133-10-152 153q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l153-153-10-134q-20 12-32 24l-187 187q-47 48-47 114 0 67 47 113l82 82q47 46 114 46 67 0 114-47l186-187q12-12 23-32z m354-46q0-8-5-13t-13-5h-179q-8 0-13 5t-5 13 5 12 13 5h179q8 0 13-5t5-12z m-304 303v-178q0-8-5-13t-13-5-13 5-5 13v178q0 8 5 13t13 5 13-5 5-13z m227-84l-143-143q-6-5-13-5t-12 5q-5 6-5 13t5 13l142 143q6 5 13 5t13-5q5-6 5-13t-5-13z" horiz-adv-x="928.6" />
|
||||
<glyph glyph-name="quote-right" unicode="" d="M429 671v-392q0-58-23-111t-61-91-91-61-111-23h-36q-14 0-25 11t-11 25v71q0 15 11 25t25 11h36q59 0 101 42t42 101v17q0 23-16 38t-38 16h-125q-44 0-76 31t-31 76v214q0 45 31 76t76 32h214q45 0 76-32t32-76z m500 0v-392q0-58-23-111t-61-91-91-61-111-23h-36q-14 0-25 11t-11 25v71q0 15 11 25t25 11h36q59 0 101 42t42 101v17q0 23-16 38t-38 16h-125q-44 0-76 31t-31 76v214q0 45 31 76t76 32h214q45 0 76-32t32-76z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="superscript" unicode="" d="M501 86v-93h-139l-89 141-13 23q-4 5-6 12h-2l-5-12q-5-11-14-25l-86-139h-144v93h71l110 162-103 152h-76v94h154l77-127q1-2 13-24 4-5 6-11h2q1 5 6 11l14 24 78 127h143v-94h-69l-103-149 114-165h61z m355 379v-115h-287l-1 15q-3 16-3 26 0 35 15 65t36 48 47 37 47 30 36 30 15 36q0 21-17 35t-39 13q-29 0-54-21-8-7-20-22l-59 52q15 20 35 37 46 36 105 36 61 0 99-33t38-89q0-31-13-57t-35-43-45-33-46-28-37-29-17-35h130v45h70z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="code-1" unicode="" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" />
|
||||
|
||||
<glyph glyph-name="subscript" unicode="" d="M501 86v-93h-139l-89 141-13 23q-4 5-6 12h-2l-5-12q-5-11-14-25l-86-139h-144v93h71l110 162-103 152h-76v94h154l77-127q1-2 13-24 4-5 6-11h2q1 5 6 11l14 24 78 127h143v-94h-69l-103-149 114-165h61z m356-121v-115h-287l-2 15q-2 25-2 26 0 35 15 65t36 48 47 37 47 30 36 30 15 36q0 21-17 35t-39 13q-29 0-54-21-8-6-20-22l-59 52q15 20 35 37 45 36 105 36 62 0 99-33t38-89q0-37-19-66t-47-48-55-35-49-35-23-41h130v45h70z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="crop" unicode="" d="M311 136h332v332z m-25 25l332 332h-332v-332z m643-43v-107q0-8-5-13t-13-5h-125v-125q0-8-5-13t-13-5h-107q-8 0-13 5t-5 13v125h-482q-8 0-13 5t-5 13v482h-125q-8 0-13 5t-5 13v107q0 8 5 13t13 5h125v125q0 8 5 13t13 5h107q8 0 13-5t5-13v-125h475l137 138q6 5 13 5t13-5q5-6 5-13t-5-13l-138-137v-475h125q8 0 13-5t5-13z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="header" unicode="" d="M939-79q-25 0-74 2t-75 2q-24 0-73-2t-74-2q-14 0-21 12t-7 25q0 17 9 26t22 9 29 4 25 9q18 11 18 78l0 218q0 12-1 17-7 3-28 3h-376q-22 0-29-3 0-5 0-17l-1-207q0-79 21-92 9-5 26-7t32-2 25-8 11-26q0-14-7-26t-20-13q-26 0-78 2t-77 2q-24 0-71-2t-71-2q-13 0-20 12t-7 25q0 17 9 25t20 10 26 4 24 9q18 13 18 80l-1 31v454q0 2 1 14t0 21-1 21-2 24-4 20-6 18-9 10q-8 5-25 6t-29 2-23 7-10 26q0 14 6 26t20 13q26 0 78-2t77-2q23 0 71 2t70 2q14 0 21-13t7-26q0-17-9-25t-22-8-28-2-24-7q-19-12-19-90l1-178q0-12 0-18 7-2 22-2h390q14 0 21 2 1 6 1 18l0 178q0 78-19 90-10 6-33 7t-37 7-14 28q0 14 7 26t21 13q24 0 74-2t73-2q24 0 72 2t72 2q14 0 21-13t7-26q0-17-10-25t-22-8-29-2-24-7q-20-13-20-90l1-526q0-66 19-78 9-6 25-8t30-2 23-9 10-25q0-14-6-26t-20-13z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="unlink" unicode="" d="M245 141l-143-143q-5-5-13-5-6 0-12 5-6 6-6 13t6 13l142 142q6 5 13 5t13-5q5-5 5-12t-5-13z m94-23v-179q0-8-5-13t-13-5-12 5-5 13v179q0 8 5 13t12 5 13-5 5-13z m-125 125q0-8-5-13t-13-5h-178q-8 0-13 5t-5 13 5 13 13 5h178q8 0 13-5t5-13z m706-72q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-186 187q-12 12-24 31l134 10 152-153q15-15 38-15t38 15l82 81q16 16 16 37 0 23-16 38l-153 154 10 133q20-11 31-23l188-188q47-48 47-114z m-345 404l-133-10-152 153q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l153-153-10-134q-20 12-32 24l-187 187q-47 48-47 114 0 67 47 113l82 82q47 46 114 46 67 0 114-47l186-187q12-12 23-32z m354-46q0-8-5-13t-13-5h-179q-8 0-13 5t-5 13 5 12 13 5h179q8 0 13-5t5-12z m-304 303v-178q0-8-5-13t-13-5-13 5-5 13v178q0 8 5 13t13 5 13-5 5-13z m227-84l-143-143q-6-5-13-5t-12 5q-5 6-5 13t5 13l143 143q5 5 12 5t13-5q5-6 5-13t-5-13z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="paragraph" unicode="" d="M713 745v-41q0-16-10-34t-24-18q-28 0-30-1-15-3-18-17-2-6-2-36v-643q0-14-10-24t-24-10h-60q-14 0-24 10t-10 24v680h-80v-680q0-14-9-24t-25-10h-60q-14 0-24 10t-10 24v277q-82 7-137 33-70 33-107 100-36 65-36 145 0 92 50 159 49 66 116 89 62 21 233 21h267q14 0 24-10t10-24z" horiz-adv-x="714.3" />
|
||||
<glyph glyph-name="superscript" unicode="" d="M501 86v-93h-139l-89 141-13 23q-4 5-6 12h-2l-5-12q-5-11-14-25l-86-139h-144v93h71l110 162-103 152h-76v94h154l77-127q1-2 13-24 4-5 6-11h2q1 5 6 11l14 24 78 127h143v-94h-69l-103-149 114-165h61z m355 379v-115h-287l-1 15q-3 16-3 26 0 36 15 65t36 48 47 37 47 30 36 30 15 36q0 21-17 35t-39 13q-29 0-54-21-8-6-20-22l-59 52q15 20 35 37 47 36 105 36 61 0 99-33t38-89q0-31-13-57t-35-43-45-33-46-28-37-28-17-36h130v45h70z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="subscript" unicode="" d="M501 86v-93h-139l-89 141-13 23q-4 5-6 12h-2l-5-12q-5-11-14-25l-86-139h-144v93h71l110 162-103 152h-76v94h154l77-127q1-2 13-24 4-5 6-11h2q1 5 6 11l14 24 78 127h143v-94h-69l-103-149 114-165h61z m356-121v-115h-287l-2 15q-2 25-2 26 0 35 15 65t36 48 47 37 47 30 36 30 15 36q0 21-17 35t-39 13q-28 0-54-21-8-6-20-22l-59 52q15 20 35 37 45 36 105 36 62 0 100-33t37-89q0-37-19-66t-47-48-55-35-49-35-23-41h130v45h70z" horiz-adv-x="857.1" />
|
||||
|
||||
<glyph glyph-name="header" unicode="" d="M939-79q-25 0-74 2t-75 2q-24 0-73-2t-74-2q-13 0-21 12t-7 25q0 18 9 26t22 9 29 4 25 9q18 11 18 78l0 218q0 12-1 17-7 3-28 3h-376q-22 0-29-3 0-5 0-17l-1-207q0-79 21-91 9-6 26-8t32-2 25-8 11-26q0-14-6-26t-21-13q-26 0-78 2t-77 2q-24 0-71-2t-71-2q-13 0-20 12t-7 25q0 17 9 25t20 10 26 4 24 9q18 13 18 80l-1 31v454q0 2 1 15t0 20-1 21-2 24-4 20-6 18-9 10q-8 5-25 7t-29 1-23 7-10 26q0 14 6 26t20 13q26 0 78-2t77-2q23 0 71 2t70 2q14 0 21-13t7-26q0-17-9-25t-22-8-27-2-24-7q-20-12-20-90l1-178q0-12 0-18 7-2 22-2h390q14 0 21 2 1 6 1 18l0 178q0 78-19 90-10 6-33 7t-37 7-14 28q0 14 7 26t21 13q24 0 74-2t73-2q24 0 72 2t72 2q14 0 21-13t7-26q0-17-10-25t-22-8-29-2-24-7q-20-13-20-90l1-526q0-66 19-78 9-6 25-8t30-2 23-9 10-25q0-14-6-26t-20-13z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="paragraph" unicode="" d="M713 745v-41q0-16-10-34t-24-18q-28 0-30-1-14-3-18-17-1-6-1-36v-643q0-14-11-24t-24-10h-60q-14 0-24 10t-10 24v680h-80v-680q0-14-9-24t-25-10h-60q-14 0-24 10t-10 24v277q-82 7-137 33-70 33-107 100-36 65-36 145 0 92 50 159 49 66 116 89 62 21 233 21h267q14 0 24-10t10-24z" horiz-adv-x="714.3" />
|
||||
|
||||
<glyph glyph-name="github" unicode="" d="M620 286q26 0 45-26t19-64-19-64-45-26q-28 0-47 26t-19 64 19 64 47 26z m226 234q74-80 74-194 0-74-17-133t-43-96-64-65-70-41-73-20-62-8-45-1q-6 0-36-1t-50-1-50 1-36 1q-24 0-45 1t-62 8-73 20-70 41-64 65-43 96-17 133q0 114 74 194-8 4-1 80t33 140q92-10 228-104 46 12 126 12 84 0 126-12 62 42 119 68t83 30l26 6q26-64 33-140t-1-80z m-384-514q166 0 251 40t85 164q0 72-54 120-28 26-65 32t-113 0-104-6l-4 0q-32 0-83 4t-80 5-63-7-56-28q-52-46-52-120 0-124 84-164t250-40l4 0z m-160 280q26 0 45-26t19-64-19-64-45-26q-28 0-47 26t-19 64 19 64 47 26z" horiz-adv-x="920" />
|
||||
|
||||
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 118 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,7 +4,7 @@ import position from 'selection-position';
|
||||
import Markdown from 'slate-markdown-serializer';
|
||||
import { DEFAULT_NODE, NODES, MARKS } from './MarkdownControlElements/localRenderers';
|
||||
import StylesMenu from './MarkdownControlElements/StylesMenu';
|
||||
import AddBlock from './MarkdownControlElements/AddBlock';
|
||||
import BlockTypesMenu from './MarkdownControlElements/BlockTypesMenu';
|
||||
|
||||
const markdown = new Markdown();
|
||||
|
||||
@ -15,27 +15,33 @@ class MarkdownControl extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.blockEdit = false;
|
||||
this.stylesMenuPosition = {
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: 0,
|
||||
height: 0
|
||||
this.menuPositions = {
|
||||
stylesMenu: {
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: 0,
|
||||
height: 0
|
||||
},
|
||||
blockTypesMenu: {
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: 0,
|
||||
height: 0
|
||||
}
|
||||
};
|
||||
|
||||
this.state = {
|
||||
state: props.value ? markdown.deserialize(props.value) : Plain.deserialize(''),
|
||||
addBlockButton:{
|
||||
show: false
|
||||
}
|
||||
state: props.value ? markdown.deserialize(props.value) : Plain.deserialize('')
|
||||
};
|
||||
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
this.handleDocumentChange = this.handleDocumentChange.bind(this);
|
||||
this.maybeShowBlockAddButton = this.maybeShowBlockAddButton.bind(this);
|
||||
this.handleMarkStyleClick = this.handleMarkStyleClick.bind(this);
|
||||
this.handleBlockStyleClick = this.handleBlockStyleClick.bind(this);
|
||||
this.handleBlockTypeClick = this.handleBlockTypeClick.bind(this);
|
||||
this.handleKeyDown = this.handleKeyDown.bind(this);
|
||||
this.renderAddBlock = this.renderAddBlock.bind(this);
|
||||
this.calculateMenuPositions = this.calculateMenuPositions.bind(this);
|
||||
this.renderBlockTypesMenu = this.renderBlockTypesMenu.bind(this);
|
||||
this.renderNode = this.renderNode.bind(this);
|
||||
this.renderMark = this.renderMark.bind(this);
|
||||
}
|
||||
@ -52,7 +58,7 @@ class MarkdownControl extends React.Component {
|
||||
this.blockEdit = false;
|
||||
} else {
|
||||
|
||||
this.setState({ state }, this.maybeShowBlockAddButton);
|
||||
this.setState({ state }, this.calculateMenuPositions);
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,19 +66,27 @@ class MarkdownControl extends React.Component {
|
||||
this.props.onChange(markdown.serialize(state));
|
||||
}
|
||||
|
||||
maybeShowBlockAddButton() {
|
||||
if (this.state.state.blocks.get(0).isEmpty) {
|
||||
const rect = document.querySelectorAll(`[data-key='${this.state.state.selection.focusKey}']`)[0].getBoundingClientRect();
|
||||
this.setState({ addBlockButton: {
|
||||
show: true,
|
||||
top: rect.top + window.scrollY + 2,
|
||||
left: rect.left + window.scrollX - 28
|
||||
} });
|
||||
/**
|
||||
* All menu positions are calculated accessing dom elements
|
||||
* That's why calculateMenuPositions is called on handleChange's setState callback
|
||||
*/
|
||||
calculateMenuPositions() {
|
||||
const rect1 = position();
|
||||
this.menuPositions.stylesMenu = {
|
||||
top: rect1.top + window.scrollY,
|
||||
left: rect1.left + window.scrollX,
|
||||
width: rect1.width,
|
||||
height: rect1.height
|
||||
};
|
||||
|
||||
} else {
|
||||
this.setState({ addBlockButton: {
|
||||
show: false
|
||||
} });
|
||||
const blockElement = document.querySelectorAll(`[data-key='${this.state.state.selection.focusKey}']`);
|
||||
if (blockElement.length > 0) {
|
||||
const rect2 = blockElement[0].getBoundingClientRect();
|
||||
this.menuPositions.blockTypesMenu = {
|
||||
top: rect2.top + window.scrollY,
|
||||
left: rect2.left + window.scrollX
|
||||
};
|
||||
this.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,6 +150,18 @@ class MarkdownControl extends React.Component {
|
||||
this.setState({ state });
|
||||
}
|
||||
|
||||
handleBlockTypeClick(type) {
|
||||
let { state } = this.state;
|
||||
|
||||
state = state
|
||||
.transform()
|
||||
.setBlock(type)
|
||||
.splitBlock()
|
||||
.setBlock(DEFAULT_NODE)
|
||||
.apply();
|
||||
this.setState({ state }, this.calculateMenuPositions);
|
||||
}
|
||||
|
||||
handleKeyDown(evt) {
|
||||
if (evt.shiftKey && evt.key === 'Enter') {
|
||||
this.blockEdit = true;
|
||||
@ -149,12 +175,6 @@ class MarkdownControl extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
renderAddBlock() {
|
||||
return (
|
||||
this.state.addBlockButton.show ? <AddBlock top={this.state.addBlockButton.top} left={this.state.addBlockButton.left} /> : null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return renderers for Slate
|
||||
*/
|
||||
@ -165,28 +185,27 @@ class MarkdownControl extends React.Component {
|
||||
return MARKS[mark.type];
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the menu's absolute position.
|
||||
*/
|
||||
renderBlockTypesMenu() {
|
||||
const currentBlock = this.state.state.blocks.get(0);
|
||||
const isOpen = (currentBlock.isEmpty && currentBlock.type !== 'list-item' && currentBlock.type !== 'horizontal-rule');
|
||||
|
||||
return (
|
||||
<BlockTypesMenu
|
||||
isOpen={isOpen}
|
||||
position={this.menuPositions.blockTypesMenu}
|
||||
onClickBlock={this.handleBlockTypeClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
renderStylesMenu() {
|
||||
const { state } = this.state;
|
||||
const rect = position();
|
||||
|
||||
const isOpen = !(state.isBlurred || state.isCollapsed);
|
||||
|
||||
if (isOpen) {
|
||||
this.stylesMenuPosition = {
|
||||
top: rect.top + window.scrollY,
|
||||
left: rect.left + window.scrollX,
|
||||
width: rect.width,
|
||||
height: rect.height
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<StylesMenu
|
||||
isOpen={isOpen}
|
||||
position={this.stylesMenuPosition}
|
||||
position={this.menuPositions.stylesMenu}
|
||||
marks={this.state.state.marks}
|
||||
blocks={this.state.state.blocks}
|
||||
onClickMark={this.handleMarkStyleClick}
|
||||
@ -199,7 +218,7 @@ class MarkdownControl extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
{this.renderStylesMenu()}
|
||||
{this.renderAddBlock()}
|
||||
{this.renderBlockTypesMenu()}
|
||||
<Editor
|
||||
placeholder={'Enter some rich text...'}
|
||||
state={this.state.state}
|
||||
|
@ -1,10 +0,0 @@
|
||||
.root {
|
||||
position: absolute;
|
||||
color: #ddd;
|
||||
transition: color 0.5s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.root:hover {
|
||||
color: #aaa;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Icon } from '../../UI';
|
||||
import styles from './AddBlock.css';
|
||||
|
||||
export default function AddBlock({top, left}) {
|
||||
const style = {
|
||||
top,
|
||||
left
|
||||
}
|
||||
return (
|
||||
<Icon type="plus-squared" className={styles.root} style={style} />
|
||||
);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
.divider {
|
||||
|
||||
}
|
||||
|
||||
.divider:before {
|
||||
font-family: Georgia,Cambria,"Times New Roman",Times,serif;
|
||||
font-size: 28px;
|
||||
letter-spacing: .6em;
|
||||
content: '...';
|
||||
color: rgba(0,0,0,.6);
|
||||
position: relative;
|
||||
top: -12px;
|
||||
margin-left: calc(50% - 60px);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import styles from './BlockStatic.css';
|
||||
|
||||
const AVAILABLE_TYPES = [
|
||||
'divider'
|
||||
];
|
||||
|
||||
export function BlockStatic({ type, children }) {
|
||||
return (
|
||||
<div className={`${styles[type]}`} contentEditable={false}>{children}</div>
|
||||
);
|
||||
}
|
||||
|
||||
BlockStatic.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
type: PropTypes.oneOf(AVAILABLE_TYPES).isRequired
|
||||
};
|
||||
|
||||
export default BlockStatic;
|
@ -0,0 +1,28 @@
|
||||
.root {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin-top: 2px;
|
||||
color: #ddd;
|
||||
transition: color 0.5s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
.button:hover {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.menu {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 20px;
|
||||
height: 32px;
|
||||
white-space: nowrap;
|
||||
background-color: rgba(126, 126, 126, 0.1);
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin: 8px;
|
||||
cursor: pointer;
|
||||
color: #555;
|
||||
}
|
104
src/components/Widgets/MarkdownControlElements/BlockTypesMenu.js
Normal file
104
src/components/Widgets/MarkdownControlElements/BlockTypesMenu.js
Normal file
@ -0,0 +1,104 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import Portal from 'react-portal';
|
||||
import { Icon } from '../../UI';
|
||||
import styles from './BlockTypesMenu.css';
|
||||
|
||||
export default class BlockTypesMenu extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
expanded: false,
|
||||
menu: null
|
||||
};
|
||||
|
||||
this.updateMenuPosition = this.updateMenuPosition.bind(this);
|
||||
this.toggleMenu = this.toggleMenu.bind(this);
|
||||
this.handleOpen = this.handleOpen.bind(this);
|
||||
this.handleBlockTypeClick = this.handleBlockTypeClick.bind(this);
|
||||
this.renderBlockTypeButton = this.renderBlockTypeButton.bind(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* On update, update the menu.
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.updateMenuPosition();
|
||||
}
|
||||
|
||||
componentWillUpdate() {
|
||||
if (this.state.expanded) {
|
||||
this.setState({ expanded: false });
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
this.updateMenuPosition();
|
||||
}
|
||||
|
||||
updateMenuPosition() {
|
||||
const { menu } = this.state;
|
||||
const { position } = this.props;
|
||||
if (!menu) return;
|
||||
|
||||
menu.style.opacity = 1;
|
||||
menu.style.top = `${position.top}px`;
|
||||
menu.style.left = `${position.left - menu.offsetWidth * 2}px`;
|
||||
|
||||
}
|
||||
|
||||
toggleMenu() {
|
||||
this.setState({ expanded: !this.state.expanded });
|
||||
}
|
||||
|
||||
handleBlockTypeClick(e, type) {
|
||||
this.props.onClickBlock(type, false, false);
|
||||
}
|
||||
|
||||
renderBlockTypeButton(type, icon) {
|
||||
const onClick = e => this.handleBlockTypeClick(e, type);
|
||||
return (
|
||||
<Icon type={icon} onClick={onClick} className={styles.icon} />
|
||||
);
|
||||
}
|
||||
|
||||
renderMenu() {
|
||||
if (this.state.expanded) {
|
||||
return (
|
||||
<div className={styles.menu}>
|
||||
{this.renderBlockTypeButton('horizontal-rule', 'dot-3')}
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When the portal opens, cache the menu element.
|
||||
*/
|
||||
handleOpen(portal) {
|
||||
this.setState({ menu: portal.firstChild });
|
||||
}
|
||||
|
||||
render() {
|
||||
const { isOpen } = this.props;
|
||||
return (
|
||||
<Portal isOpened={isOpen} onOpen={this.handleOpen}>
|
||||
<div className={styles.root}>
|
||||
<Icon type="plus-squared" className={styles.button} onClick={this.toggleMenu} />
|
||||
{this.renderMenu()}
|
||||
</div>
|
||||
</Portal>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
BlockTypesMenu.propTypes = {
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
position: PropTypes.shape({
|
||||
top: PropTypes.number.isRequired,
|
||||
left: PropTypes.number.isRequired
|
||||
}),
|
||||
onClickBlock: PropTypes.func.isRequired
|
||||
};
|
@ -79,7 +79,6 @@ export default class StylesMenu extends Component {
|
||||
|
||||
renderBlockButton(type, icon, checkType) {
|
||||
checkType = checkType || type;
|
||||
console.log(checkType)
|
||||
const isActive = this.hasBlock(checkType);
|
||||
const onMouseDown = e => this.handleBlockClick(e, type);
|
||||
return (
|
||||
|
@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import Block from './Block';
|
||||
import BlockStatic from './BlockStatic';
|
||||
import { Icon } from '../../UI';
|
||||
|
||||
/* eslint react/prop-types: 0, react/no-multi-comp: 0 */
|
||||
@ -19,6 +20,7 @@ export const NODES = {
|
||||
'heading6': props => <Block type='Heading2' {...props.attributes}>{props.children}</Block>,
|
||||
'list-item': props => <li {...props.attributes}>{props.children}</li>,
|
||||
'paragraph': props => <Block type='Paragraph' {...props.attributes}>{props.children}</Block>,
|
||||
'horizontal-rule': props => <BlockStatic type='divider' {...props.attributes}>{props.children}</BlockStatic>,
|
||||
'link': (props) => {
|
||||
const { data } = props.node;
|
||||
const href = data.get('href');
|
||||
|
@ -39,6 +39,8 @@ storiesOf('Icon', module)
|
||||
<Icon type="quote-left"/>
|
||||
<Icon type="quote-right"/>
|
||||
<Icon type="code"/>
|
||||
<Icon type="picture"/>
|
||||
<Icon type="video"/>
|
||||
<Icon type="note"/>
|
||||
<Icon type="note-beamed"/>
|
||||
<Icon type="music"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user