dante2-editor 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.babelrc +20 -0
- data/.eslint +13 -0
- data/.gitignore +15 -0
- data/README.md +5 -1
- data/dante2.gemspec +2 -4
- data/{app → demo}/assets/index.html +2 -2
- data/{app → demo}/assets/license.html +1 -1
- data/{app → demo}/assets/options.html +1 -5
- data/{app → demo}/assets/store.json +0 -0
- data/demo/data/poc.js +9 -0
- data/demo/demo.js +9 -0
- data/demo/initialize.js +7 -0
- data/{app → demo}/styles/layout/layout.scss +0 -0
- data/{app → demo}/styles/layout/normalize.css +0 -0
- data/{app → demo}/styles/layout/scaffold.scss +0 -0
- data/{app → demo}/styles/layout/tooltips.scss +0 -0
- data/dist/Dante2.js +2995 -0
- data/dist/Dante2.min.js +3 -0
- data/dist/Dante2.min.js.map +1 -0
- data/dist/DanteStyles.css +2 -0
- data/dist/DanteStyles.css.map +1 -0
- data/dist/DanteStyles.js +102 -0
- data/dist/DanteStyles.min.js +2 -0
- data/dist/DanteStyles.min.js.map +1 -0
- data/dist/dante-vendors.js +48316 -0
- data/dist/dante-vendors.min.js +29 -0
- data/dist/dante-vendors.min.js.map +1 -0
- data/{app/styles/fonts/dante → dist/fonts}/dante.eot +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/dante.svg +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/dante.ttf +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/dante.woff +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/fontello.eot +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/fontello.svg +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/fontello.ttf +0 -0
- data/{app/styles/fonts/dante → dist/fonts}/fontello.woff +0 -0
- data/docs/app.css +430 -1
- data/docs/app.css.map +1 -1
- data/docs/app.js +62 -2
- data/docs/app.js.map +1 -1
- data/docs/dante-vendors.js +49513 -22
- data/docs/dante-vendors.js.map +1 -1
- data/docs/dante.css +1602 -1
- data/docs/dante.css.map +1 -1
- data/docs/dante.js +3310 -3
- data/docs/dante.js.map +1 -1
- data/docs/doc.html +3 -7
- data/docs/index.html +4 -4
- data/docs/license.html +3 -3
- data/docs/options.html +53 -0
- data/package.json +47 -17
- data/rb_lib/dante2-editor/rails.rb +15 -0
- data/{lib → rb_lib}/dante2-editor/version.rb +1 -1
- data/{lib → rb_lib}/dante2-editor.rb +0 -0
- data/src/components/blocks/embed.js +126 -0
- data/src/components/blocks/image.js +377 -0
- data/src/components/blocks/placeholder.js +68 -0
- data/src/components/blocks/video.js +80 -0
- data/src/components/dante.js +291 -0
- data/src/components/dante_editor.js +928 -0
- data/src/components/debug.js +104 -0
- data/src/components/decorators/link.js +64 -0
- data/src/components/popovers/addButton.js +318 -0
- data/src/components/popovers/image.js +188 -0
- data/src/components/popovers/link.js +107 -0
- data/src/components/popovers/toolTip.js +402 -0
- data/{app/utils/logger.coffee → src/components/wrapper.js} +0 -0
- data/{app → src}/images/dante/media-loading-placeholder.png +0 -0
- data/{app → src}/images/site/dante-demo.png +0 -0
- data/{app → src}/images/site/dante-editor-logo.png +0 -0
- data/{app → src}/images/site/github-logo.png +0 -0
- data/src/index.js +9 -0
- data/{app → src}/model/index.js +0 -0
- data/src/style.js +3 -0
- data/{app → src}/styles/dante/_animations.scss +0 -0
- data/{app → src}/styles/dante/_caption.scss +0 -0
- data/{app → src}/styles/dante/_debug.scss +0 -0
- data/{app → src}/styles/dante/_fonts.scss +0 -0
- data/{app → src}/styles/dante/_graf.scss +0 -0
- data/{app → src}/styles/dante/_icons.scss +0 -0
- data/{app → src}/styles/dante/_media.scss +0 -0
- data/{app → src}/styles/dante/_menu.scss +0 -0
- data/{app → src}/styles/dante/_needsorder.scss +0 -0
- data/{app → src}/styles/dante/_popover.scss +0 -0
- data/{app → src}/styles/dante/_post.scss +0 -0
- data/{app → src}/styles/dante/_scaffold.scss +0 -0
- data/{app → src}/styles/dante/_tooltip.scss +0 -0
- data/{app → src}/styles/dante/_utilities.scss +0 -0
- data/{app → src}/styles/dante/_variables.scss +0 -0
- data/{app → src}/styles/dante/blame.scss +0 -0
- data/{app → src}/styles/dante.scss +0 -0
- data/{app → src}/styles/draft.css +0 -0
- data/src/styles/fonts/dante/dante.eot +0 -0
- data/src/styles/fonts/dante/dante.svg +18 -0
- data/src/styles/fonts/dante/dante.ttf +0 -0
- data/src/styles/fonts/dante/dante.woff +0 -0
- data/src/styles/fonts/dante/fontello.eot +0 -0
- data/src/styles/fonts/dante/fontello.svg +36 -0
- data/src/styles/fonts/dante/fontello.ttf +0 -0
- data/src/styles/fonts/dante/fontello.woff +0 -0
- data/src/utils/find_entities.js +17 -0
- data/src/utils/html2content.js +127 -0
- data/src/utils/save_content.js +80 -0
- data/{app → src}/utils/selection.js +0 -0
- data/tools/.eslintrc +9 -0
- data/tools/amd/README.md +7 -0
- data/tools/amd/bower.json +19 -0
- data/tools/amd/build.js +36 -0
- data/tools/build-cli.js +46 -0
- data/tools/build.js +30 -0
- data/tools/buildBabel.js +32 -0
- data/tools/constants.js +10 -0
- data/tools/dist/build.js +13 -0
- data/tools/docs/build.js +12 -0
- data/tools/es/build.js +27 -0
- data/tools/exec.js +50 -0
- data/tools/fs-utils.js +35 -0
- data/tools/lib/build.js +14 -0
- data/tools/promisify.js +14 -0
- data/webpack/base.config.js +89 -0
- data/webpack/docs.config.js +147 -0
- data/webpack/webpack.config.js +78 -0
- data/webpack.config-doc.js +5 -0
- data/webpack.config.js +3 -147
- data/yarn.lock +973 -718
- metadata +108 -64
- data/app/components/App.cjsx +0 -1083
- data/app/components/blocks/embed.cjsx +0 -109
- data/app/components/blocks/image.cjsx +0 -316
- data/app/components/blocks/placeholder.cjsx +0 -60
- data/app/components/blocks/video.cjsx +0 -75
- data/app/components/debug.cjsx +0 -96
- data/app/components/decorators/link.cjsx +0 -61
- data/app/components/popovers/addButton.cjsx +0 -247
- data/app/components/popovers/image.cjsx +0 -160
- data/app/components/popovers/link.cjsx +0 -87
- data/app/components/popovers/toolTip.cjsx +0 -326
- data/app/data/poc.js +0 -15
- data/app/demo.js +0 -7
- data/app/initialize.js +0 -4
- data/app/utils/find_entities.coffee +0 -20
- data/app/utils/html2content.coffee +0 -120
- data/app/utils/save_content.coffee +0 -63
- data/lib/dante2-editor/rails.rb +0 -16
@@ -0,0 +1,107 @@
|
|
1
|
+
|
2
|
+
import React from 'react'
|
3
|
+
import ReactDOM from 'react-dom'
|
4
|
+
|
5
|
+
import { getCurrentBlock } from '../../model/index.js'
|
6
|
+
|
7
|
+
class DanteAnchorPopover extends React.Component {
|
8
|
+
|
9
|
+
constructor(props) {
|
10
|
+
|
11
|
+
super(props)
|
12
|
+
this.display = this.display.bind(this)
|
13
|
+
this.show = this.show.bind(this)
|
14
|
+
this.hide = this.hide.bind(this)
|
15
|
+
this.relocate = this.relocate.bind(this)
|
16
|
+
this.render = this.render.bind(this)
|
17
|
+
this.state = {
|
18
|
+
position: {
|
19
|
+
top: 0,
|
20
|
+
left: 0
|
21
|
+
},
|
22
|
+
show: false,
|
23
|
+
url: ""
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
display(b) {
|
28
|
+
if (b) {
|
29
|
+
return this.show()
|
30
|
+
} else {
|
31
|
+
return this.hide()
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
show() {
|
36
|
+
return this.setState({
|
37
|
+
show: true })
|
38
|
+
}
|
39
|
+
|
40
|
+
hide() {
|
41
|
+
return this.setState({
|
42
|
+
show: false })
|
43
|
+
}
|
44
|
+
|
45
|
+
setPosition(coords) {
|
46
|
+
return this.setState({
|
47
|
+
position: coords })
|
48
|
+
}
|
49
|
+
|
50
|
+
relocate(node) {
|
51
|
+
if (node == null) {
|
52
|
+
node = null
|
53
|
+
}
|
54
|
+
if (!node) {
|
55
|
+
return
|
56
|
+
}
|
57
|
+
|
58
|
+
let { editorState } = this.props
|
59
|
+
let currentBlock = getCurrentBlock(editorState)
|
60
|
+
let blockType = currentBlock.getType()
|
61
|
+
|
62
|
+
let contentState = editorState.getCurrentContent()
|
63
|
+
let selectionState = editorState.getSelection()
|
64
|
+
|
65
|
+
let selectionBoundary = node.getBoundingClientRect()
|
66
|
+
let coords = selectionBoundary
|
67
|
+
|
68
|
+
let el = this.refs.dante_popover
|
69
|
+
let padd = el.offsetWidth / 2
|
70
|
+
|
71
|
+
let parent = ReactDOM.findDOMNode(this.props.editor)
|
72
|
+
let parentBoundary = parent.getBoundingClientRect()
|
73
|
+
|
74
|
+
return {
|
75
|
+
top: selectionBoundary.top - parentBoundary.top + 160,
|
76
|
+
left: selectionBoundary.left + selectionBoundary.width / 2 - padd
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
render() {
|
81
|
+
let { position } = this.state
|
82
|
+
let style = {
|
83
|
+
left: position.left,
|
84
|
+
top: position.top,
|
85
|
+
visibility: `${ this.state.show ? 'visible' : 'hidden' }`
|
86
|
+
}
|
87
|
+
return (
|
88
|
+
<div
|
89
|
+
ref="dante_popover"
|
90
|
+
className='dante-popover popover--tooltip popover--Linktooltip popover--bottom is-active'
|
91
|
+
style={ style }
|
92
|
+
onMouseOver={ this.props.handleOnMouseOver }
|
93
|
+
onMouseOut={ this.props.handleOnMouseOut }
|
94
|
+
>
|
95
|
+
<div className='popover-inner'>
|
96
|
+
<a href={ this.props.url } target='_blank'>
|
97
|
+
{ this.state.url }
|
98
|
+
</a>
|
99
|
+
</div>
|
100
|
+
<div className='popover-arrow' />
|
101
|
+
</div>
|
102
|
+
)
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
export default DanteAnchorPopover
|
107
|
+
|
@@ -0,0 +1,402 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import ReactDOM from 'react-dom'
|
3
|
+
|
4
|
+
import {
|
5
|
+
convertToRaw,
|
6
|
+
CompositeDecorator,
|
7
|
+
getVisibleSelectionRect,
|
8
|
+
getDefaultKeyBinding,
|
9
|
+
getSelectionOffsetKeyForNode,
|
10
|
+
KeyBindingUtil,
|
11
|
+
ContentState,
|
12
|
+
Editor,
|
13
|
+
EditorState,
|
14
|
+
Entity,
|
15
|
+
RichUtils } from 'draft-js'
|
16
|
+
|
17
|
+
import { getSelectionRect, getSelection } from "../../utils/selection.js"
|
18
|
+
|
19
|
+
import { getCurrentBlock } from '../../model/index.js'
|
20
|
+
|
21
|
+
class DanteTooltip extends React.Component {
|
22
|
+
|
23
|
+
constructor(props) {
|
24
|
+
super(props)
|
25
|
+
this._clickInlineHandler = this._clickInlineHandler.bind(this)
|
26
|
+
this.display = this.display.bind(this)
|
27
|
+
this.show = this.show.bind(this)
|
28
|
+
this.hide = this.hide.bind(this)
|
29
|
+
this.relocate = this.relocate.bind(this)
|
30
|
+
this._clickBlockHandler = this._clickBlockHandler.bind(this)
|
31
|
+
this.displayLinkMode = this.displayLinkMode.bind(this)
|
32
|
+
this.displayActiveMenu = this.displayActiveMenu.bind(this)
|
33
|
+
this._enableLinkMode = this._enableLinkMode.bind(this)
|
34
|
+
this._disableLinkMode = this._disableLinkMode.bind(this)
|
35
|
+
this.handleInputEnter = this.handleInputEnter.bind(this)
|
36
|
+
this.confirmLink = this.confirmLink.bind(this)
|
37
|
+
this.inlineItems = this.inlineItems.bind(this)
|
38
|
+
this.blockItems = this.blockItems.bind(this)
|
39
|
+
this.getDefaultValue = this.getDefaultValue.bind(this)
|
40
|
+
this.getVisibleSelectionRect = getVisibleSelectionRect
|
41
|
+
this.state = {
|
42
|
+
link_mode: false,
|
43
|
+
show: false,
|
44
|
+
position: {}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
_clickInlineHandler(ev, style) {
|
49
|
+
ev.preventDefault()
|
50
|
+
|
51
|
+
this.props.onChange(RichUtils.toggleInlineStyle(this.props.editorState, style))
|
52
|
+
|
53
|
+
return setTimeout(() => {
|
54
|
+
return this.relocate()
|
55
|
+
}, 0)
|
56
|
+
}
|
57
|
+
|
58
|
+
display(b) {
|
59
|
+
if (b) {
|
60
|
+
return this.show()
|
61
|
+
} else {
|
62
|
+
return this.hide()
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
show() {
|
67
|
+
return this.setState({
|
68
|
+
show: true })
|
69
|
+
}
|
70
|
+
|
71
|
+
hide() {
|
72
|
+
return this.setState({
|
73
|
+
link_mode: false,
|
74
|
+
show: false
|
75
|
+
})
|
76
|
+
}
|
77
|
+
|
78
|
+
setPosition(coords) {
|
79
|
+
return this.setState({
|
80
|
+
position: coords })
|
81
|
+
}
|
82
|
+
|
83
|
+
isDescendant(parent, child) {
|
84
|
+
let node = child.parentNode
|
85
|
+
while (node !== null) {
|
86
|
+
if (node === parent) {
|
87
|
+
return true
|
88
|
+
}
|
89
|
+
node = node.parentNode
|
90
|
+
}
|
91
|
+
return false
|
92
|
+
}
|
93
|
+
|
94
|
+
relocate() {
|
95
|
+
|
96
|
+
let currentBlock = getCurrentBlock(this.props.editorState)
|
97
|
+
let blockType = currentBlock.getType()
|
98
|
+
// display tooltip only for unstyled
|
99
|
+
|
100
|
+
if (this.props.configTooltip.selectionElements.indexOf(blockType) < 0) {
|
101
|
+
this.hide()
|
102
|
+
return
|
103
|
+
}
|
104
|
+
|
105
|
+
if (this.state.link_mode) {
|
106
|
+
return
|
107
|
+
}
|
108
|
+
if (!this.state.show) {
|
109
|
+
return
|
110
|
+
}
|
111
|
+
|
112
|
+
let el = this.refs.dante_menu
|
113
|
+
let padd = el.offsetWidth / 2
|
114
|
+
|
115
|
+
let nativeSelection = getSelection(window)
|
116
|
+
if (!nativeSelection.rangeCount) {
|
117
|
+
return
|
118
|
+
}
|
119
|
+
|
120
|
+
let selectionBoundary = getSelectionRect(nativeSelection)
|
121
|
+
|
122
|
+
let parent = ReactDOM.findDOMNode(this.props.editor)
|
123
|
+
let parentBoundary = parent.getBoundingClientRect()
|
124
|
+
|
125
|
+
// hide if selected node is not in editor
|
126
|
+
if (!this.isDescendant(parent, nativeSelection.anchorNode)) {
|
127
|
+
this.hide()
|
128
|
+
return
|
129
|
+
}
|
130
|
+
|
131
|
+
let top = selectionBoundary.top - parentBoundary.top - -90 - 5
|
132
|
+
let left = selectionBoundary.left + selectionBoundary.width / 2 - padd
|
133
|
+
|
134
|
+
if (!top || !left) {
|
135
|
+
return
|
136
|
+
}
|
137
|
+
|
138
|
+
// console.log "SET SHOW FOR TOOLTIP INSERT MENU"
|
139
|
+
return this.setState({
|
140
|
+
show: true,
|
141
|
+
position: {
|
142
|
+
left,
|
143
|
+
top
|
144
|
+
}
|
145
|
+
})
|
146
|
+
}
|
147
|
+
|
148
|
+
_clickBlockHandler(ev, style) {
|
149
|
+
ev.preventDefault()
|
150
|
+
|
151
|
+
this.props.onChange(RichUtils.toggleBlockType(this.props.editorState, style))
|
152
|
+
|
153
|
+
return setTimeout(() => {
|
154
|
+
return this.relocate()
|
155
|
+
}, 0)
|
156
|
+
}
|
157
|
+
|
158
|
+
displayLinkMode() {
|
159
|
+
if (this.state.link_mode) {
|
160
|
+
return "dante-menu--linkmode"
|
161
|
+
} else {
|
162
|
+
return ""
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
displayActiveMenu() {
|
167
|
+
if (this.state.show) {
|
168
|
+
return "dante-menu--active"
|
169
|
+
} else {
|
170
|
+
return ""
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
_enableLinkMode(ev) {
|
175
|
+
ev.preventDefault()
|
176
|
+
return this.setState({
|
177
|
+
link_mode: true })
|
178
|
+
}
|
179
|
+
|
180
|
+
_disableLinkMode(ev) {
|
181
|
+
ev.preventDefault()
|
182
|
+
return this.setState({
|
183
|
+
link_mode: false,
|
184
|
+
url: ""
|
185
|
+
})
|
186
|
+
}
|
187
|
+
|
188
|
+
hideMenu() {
|
189
|
+
return this.hide()
|
190
|
+
}
|
191
|
+
|
192
|
+
handleInputEnter(e) {
|
193
|
+
if (e.which === 13) {
|
194
|
+
return this.confirmLink(e)
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
confirmLink(e) {
|
199
|
+
e.preventDefault()
|
200
|
+
let { editorState } = this.props
|
201
|
+
let urlValue = e.currentTarget.value
|
202
|
+
let contentState = editorState.getCurrentContent()
|
203
|
+
let selection = editorState.getSelection()
|
204
|
+
|
205
|
+
let opts = {
|
206
|
+
url: urlValue,
|
207
|
+
showPopLinkOver: this.props.showPopLinkOver,
|
208
|
+
hidePopLinkOver: this.props.hidePopLinkOver
|
209
|
+
}
|
210
|
+
|
211
|
+
let entityKey = Entity.create('LINK', 'MUTABLE', opts)
|
212
|
+
|
213
|
+
if (selection.isCollapsed()) {
|
214
|
+
console.log("COLLAPSED SKIPPING LINK")
|
215
|
+
return
|
216
|
+
}
|
217
|
+
|
218
|
+
this.props.onChange(RichUtils.toggleLink(editorState, selection, entityKey))
|
219
|
+
|
220
|
+
return this._disableLinkMode(e)
|
221
|
+
}
|
222
|
+
|
223
|
+
getPosition() {
|
224
|
+
let pos = this.state.position
|
225
|
+
return pos
|
226
|
+
}
|
227
|
+
|
228
|
+
inlineItems() {
|
229
|
+
return this.props.widget_options.block_types.filter(o => {
|
230
|
+
return o.type === "inline"
|
231
|
+
})
|
232
|
+
}
|
233
|
+
|
234
|
+
blockItems() {
|
235
|
+
return this.props.widget_options.block_types.filter(o => {
|
236
|
+
return o.type === "block"
|
237
|
+
})
|
238
|
+
}
|
239
|
+
|
240
|
+
getDefaultValue() {
|
241
|
+
if (this.refs.dante_menu_input) {
|
242
|
+
this.refs.dante_menu_input.value = ""
|
243
|
+
}
|
244
|
+
|
245
|
+
let currentBlock = getCurrentBlock(this.props.editorState)
|
246
|
+
let blockType = currentBlock.getType()
|
247
|
+
let selection = this.props.editor.state.editorState.getSelection()
|
248
|
+
let selectedEntity = null
|
249
|
+
let defaultUrl = null
|
250
|
+
return currentBlock.findEntityRanges(character => {
|
251
|
+
let entityKey = character.getEntity()
|
252
|
+
selectedEntity = entityKey
|
253
|
+
return entityKey !== null && Entity.get(entityKey).getType() === 'LINK'
|
254
|
+
}, (start, end) => {
|
255
|
+
let selStart = selection.getAnchorOffset()
|
256
|
+
let selEnd = selection.getFocusOffset()
|
257
|
+
if (selection.getIsBackward()) {
|
258
|
+
selStart = selection.getFocusOffset()
|
259
|
+
selEnd = selection.getAnchorOffset()
|
260
|
+
}
|
261
|
+
|
262
|
+
if (start === selStart && end === selEnd) {
|
263
|
+
defaultUrl = Entity.get(selectedEntity).getData().url
|
264
|
+
return this.refs.dante_menu_input.value = defaultUrl
|
265
|
+
}
|
266
|
+
})
|
267
|
+
}
|
268
|
+
|
269
|
+
render() {
|
270
|
+
return (
|
271
|
+
<div
|
272
|
+
id="dante-menu"
|
273
|
+
ref="dante_menu"
|
274
|
+
className={ `dante-menu ${ this.displayActiveMenu() } ${ this.displayLinkMode() }` }
|
275
|
+
style={ this.getPosition() }
|
276
|
+
>
|
277
|
+
<div className="dante-menu-linkinput">
|
278
|
+
<input
|
279
|
+
className="dante-menu-input"
|
280
|
+
ref="dante_menu_input"
|
281
|
+
placeholder="Paste or type a link"
|
282
|
+
onKeyPress={ this.handleInputEnter }
|
283
|
+
defaultValue={ this.getDefaultValue() }
|
284
|
+
/>
|
285
|
+
<div className="dante-menu-button" onMouseDown={ this._disableLinkMode } />
|
286
|
+
</div>
|
287
|
+
<ul className="dante-menu-buttons">
|
288
|
+
{ this.blockItems().map( (item, i) => {
|
289
|
+
return <DanteTooltipItem
|
290
|
+
key={ i }
|
291
|
+
item={ item }
|
292
|
+
handleClick={ this._clickBlockHandler }
|
293
|
+
editorState={ this.props.editorState }
|
294
|
+
type="block"
|
295
|
+
currentStyle={ this.props.editorState.getCurrentInlineStyle }
|
296
|
+
/>
|
297
|
+
})
|
298
|
+
}
|
299
|
+
<DanteTooltipLink
|
300
|
+
editorState={ this.props.editorState }
|
301
|
+
enableLinkMode={ this._enableLinkMode }
|
302
|
+
/>
|
303
|
+
{ this.inlineItems().map( (item, i) => {
|
304
|
+
return <DanteTooltipItem
|
305
|
+
key={ i }
|
306
|
+
item={ item }
|
307
|
+
type="inline"
|
308
|
+
editorState={ this.props.editorState }
|
309
|
+
handleClick={ this._clickInlineHandler }
|
310
|
+
/>
|
311
|
+
})
|
312
|
+
}
|
313
|
+
</ul>
|
314
|
+
</div>
|
315
|
+
)
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
319
|
+
class DanteTooltipItem extends React.Component {
|
320
|
+
|
321
|
+
constructor(...args) {
|
322
|
+
super(...args)
|
323
|
+
this.handleClick = this.handleClick.bind(this)
|
324
|
+
this.activeClass = this.activeClass.bind(this)
|
325
|
+
this.isActive = this.isActive.bind(this)
|
326
|
+
this.activeClassInline = this.activeClassInline.bind(this)
|
327
|
+
this.activeClassBlock = this.activeClassBlock.bind(this)
|
328
|
+
this.render = this.render.bind(this)
|
329
|
+
}
|
330
|
+
|
331
|
+
handleClick(ev) {
|
332
|
+
return this.props.handleClick(ev, this.props.item.style)
|
333
|
+
}
|
334
|
+
|
335
|
+
activeClass() {
|
336
|
+
if (this.isActive()) {
|
337
|
+
return "active"
|
338
|
+
} else {
|
339
|
+
return ""
|
340
|
+
}
|
341
|
+
}
|
342
|
+
|
343
|
+
isActive() {
|
344
|
+
if (this.props.type === "block") {
|
345
|
+
return this.activeClassBlock()
|
346
|
+
} else {
|
347
|
+
return this.activeClassInline()
|
348
|
+
}
|
349
|
+
}
|
350
|
+
|
351
|
+
activeClassInline() {
|
352
|
+
if (!this.props.editorState) {
|
353
|
+
return
|
354
|
+
}
|
355
|
+
//console.log @props.item
|
356
|
+
return this.props.editorState.getCurrentInlineStyle().has(this.props.item.style)
|
357
|
+
}
|
358
|
+
|
359
|
+
activeClassBlock() {
|
360
|
+
//console.log "EDITOR STATE", @props.editorState
|
361
|
+
if (!this.props.editorState) {
|
362
|
+
return
|
363
|
+
}
|
364
|
+
let selection = this.props.editorState.getSelection()
|
365
|
+
let blockType = this.props.editorState.getCurrentContent().getBlockForKey(selection.getStartKey()).getType()
|
366
|
+
return this.props.item.style === blockType
|
367
|
+
}
|
368
|
+
|
369
|
+
render() {
|
370
|
+
return (
|
371
|
+
<li className={ `dante-menu-button ${ this.activeClass() }` } onMouseDown={ this.handleClick }>
|
372
|
+
<i className={ `dante-icon dante-icon-${ this.props.item.label }` } data-action="bold" />
|
373
|
+
</li>
|
374
|
+
)
|
375
|
+
}
|
376
|
+
}
|
377
|
+
|
378
|
+
class DanteTooltipLink extends React.Component {
|
379
|
+
|
380
|
+
constructor(...args) {
|
381
|
+
super(...args)
|
382
|
+
this.promptForLink = this.promptForLink.bind(this)
|
383
|
+
}
|
384
|
+
|
385
|
+
promptForLink(ev) {
|
386
|
+
let selection = this.props.editorState.getSelection()
|
387
|
+
if (!selection.isCollapsed()) {
|
388
|
+
return this.props.enableLinkMode(ev)
|
389
|
+
}
|
390
|
+
}
|
391
|
+
|
392
|
+
render() {
|
393
|
+
return (
|
394
|
+
<li className="dante-menu-button" onMouseDown={ this.promptForLink }>
|
395
|
+
<i className="dante-icon icon-createlink" data-action="createlink">link</i>
|
396
|
+
</li>
|
397
|
+
)
|
398
|
+
}
|
399
|
+
}
|
400
|
+
|
401
|
+
export default DanteTooltip
|
402
|
+
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/src/index.js
ADDED
data/{app → src}/model/index.js
RENAMED
File without changes
|
data/src/style.js
ADDED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4
|
+
<metadata>Generated by IcoMoon</metadata>
|
5
|
+
<defs>
|
6
|
+
<font id="icomoon" horiz-adv-x="1024">
|
7
|
+
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8
|
+
<missing-glyph horiz-adv-x="1024" />
|
9
|
+
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10
|
+
<glyph unicode="" glyph-name="video" d="M256 759.559v-623.174c0-70.118 47.316-95.291 105.683-55.222l428.634 294.258c58.622 40.244 58.367 105.034 0 145.103l-428.634 294.258c-58.622 40.244-105.683 15.345-105.683-55.222zM320 766.664l426.195-293.488c30.527-20.25 29.832-31 0-51.070l-426.195-295.039v639.598z" />
|
11
|
+
<glyph unicode="" glyph-name="image" d="M294.4 768l0.489 2.446c13.868 69.342 82.599 125.554 152.977 125.554h128.267c70.619 0 139.014-55.74 152.977-125.554l0.489-2.446h166.78c70.483 0 127.62-57.611 127.62-127.489v-449.022c0-70.41-57.249-127.489-127.62-127.489h-768.76c-70.483 0-127.62 57.611-127.62 127.489v449.022c0 70.41 57.249 127.489 127.62 127.489h166.78zM347.123 704h-218.685c-35.641 0-64.438-28.583-64.438-63.843v-448.314c0-35.279 28.85-63.843 64.438-63.843h767.124c35.641 0 64.438 28.583 64.438 63.843v448.314c0 35.279-28.85 63.843-64.438 63.843h-218.816l-13.864 65.375c-7.263 34.25-41.874 62.625-77.145 62.625h-147.627c-35.433 0-69.805-28.038-77.134-62.625l-13.853-65.375zM320 448c0-105.823 85.961-192 192-192 105.823 0 192 85.961 192 192 0 105.823-85.961 192-192 192-105.823 0-192-85.961-192-192zM384 448c0 70.692 56.815 128 128 128 70.692 0 128-56.815 128-128 0-70.692-56.815-128-128-128-70.692 0-128 56.815-128 128z" />
|
12
|
+
<glyph unicode="" glyph-name="plus" d="M544 416v-375.294c0-17.673-14.327-32-32-32s-32 14.327-32 32v375.294h-375.294c-17.673 0-32 14.327-32 32s14.327 32 32 32h375.294v375.294c0 17.673 14.327 32 32 32s32-14.327 32-32v-375.294h375.294c17.673 0 32-14.327 32-32s-14.327-32-32-32h-375.294z" />
|
13
|
+
<glyph unicode="" glyph-name="embed" d="M882.24 449.498l-235.855 234.241c-12.497 12.411-12.497 32.534 0 44.945s32.758 12.411 45.255 0l253.704-251.968c1.872-1.201 3.645-2.616 5.284-4.244 12.497-12.411 12.497-32.534 0-44.945l-257.992-256.226c-12.497-12.411-32.758-12.411-45.255 0s-12.497 32.534 0 44.945l234.859 233.252zM67.842 461.229c-6.562-12.128-4.719-27.599 5.53-37.848 2.863-2.863 6.133-5.070 9.624-6.621l249.364-249.364c12.497-12.497 32.758-12.497 45.255 0s12.497 32.758 0 45.255l-234.859 234.859 233.863 233.863c12.497 12.497 12.497 32.758 0 45.255s-32.758 12.497-45.255 0l-251.712-251.712c-1.872-1.209-3.645-2.634-5.284-4.273-2.805-2.805-4.981-6.002-6.527-9.414v0 0z" />
|
14
|
+
<glyph unicode="" glyph-name="image-center" horiz-adv-x="1152" d="M128 128h896v-96h-896v96zM128 704h896v-480h-896v480zM128 896h896v-96h-896v96z" />
|
15
|
+
<glyph unicode="" glyph-name="image-fill" horiz-adv-x="1152" d="M128 128h896v-96h-896v96zM0 896h1152v-672h-1152v672z" />
|
16
|
+
<glyph unicode="" glyph-name="image-left" horiz-adv-x="1152" d="M256 128h896v-96h-896v96zM768 320h384v-96h-384v96zM0 704h672v-480h-672v480zM768 512h384v-96h-384v96zM768 704h384v-96h-384v96zM256 896h896v-96h-896v96z" />
|
17
|
+
<glyph unicode="" glyph-name="image-wide" horiz-adv-x="1152" d="M128 128h896v-96h-896v96zM0 704h1152v-480h-1152v480zM128 896h896v-96h-896v96z" />
|
18
|
+
</font></defs></svg>
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4
|
+
<metadata>Copyright (C) 2012 by original authors @ fontello.com</metadata>
|
5
|
+
<defs>
|
6
|
+
<font id="fontello" horiz-adv-x="1000" >
|
7
|
+
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
8
|
+
<missing-glyph horiz-adv-x="1000" />
|
9
|
+
<glyph glyph-name="location" unicode="" d="M429 493q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m143 0q0-61-18-100l-203-432q-9-18-27-29t-38-11-38 11-26 29l-204 432q-18 39-18 100 0 118 84 202t202 84 202-84 84-202z" horiz-adv-x="571.429" />
|
10
|
+
<glyph glyph-name="fit" unicode="" d="M429 314l0-250q0-15-11-25t-25-11-25 11l-80 80-185-185q-6-6-13-6t-13 6l-64 64q-6 6-6 13t6 13l185 185-80 80q-11 11-11 25t11 25 25 11l250 0q15 0 25-11t11-25z m421 375q0-7-6-13l-185-185 80-80q11-11 11-25t-11-25-25-11l-250 0q-15 0-25 11t-11 25l0 250q0 15 11 25t25 11 25-11l80-80 185 185q6 6 13 6t13-6l64-64q6-6 6-13z" horiz-adv-x="857.143" />
|
11
|
+
<glyph glyph-name="bold" unicode="" d="M310 1q42-18 78-18 73 0 121 23t68 63q21 39 21 101 0 64-23 100-32 52-79 70-45 18-138 18-41 0-56-6l0-80-1-97 2-151q0-8 7-25z m-8 416q24-4 61-4 98 0 147 36t50 125q0 62-47 104t-142 42q-29 0-73-7 0-25 1-43 4-68 3-156l-1-55q0-24 1-43z m-302-496l1 52q25 5 38 7 43 7 69 17 9 15 12 28 5 37 5 108l-1 277q-3 143-5 225-1 49-6 61-1 2-7 7-10 7-39 8-17 1-64 7l-2 46 145 3 212 7 25 1q3 0 8 0t8 0q1 0 12 0t23 0l41 0q49 0 107-15 24-7 54-22 32-16 57-42t36-58 12-68q0-39-18-71t-53-59q-15-11-84-43 99-23 149-81 51-59 51-132 0-42-16-90-12-35-40-65-37-40-78-60t-113-33q-46-8-110-6l-110 2q-47 1-166-6-18-2-152-6z" horiz-adv-x="785.714" />
|
12
|
+
<glyph glyph-name="italic" unicode="" d="M0-77l9 47q2 1 43 11 42 11 65 22 16 21 23 56l15 78 31 150 7 36q4 25 9 47t9 37 7 26 5 17 2 6l16 88 9 35 12 75 4 28 0 21q-23 12-80 16-16 1-21 2l11 57 177-8q22-1 41-1 37 0 119 5 18 1 38 3t20 1q-1-11-3-21-4-16-7-28-31-11-61-17-36-9-56-17-7-17-13-49-5-25-7-46-25-111-37-171l-34-174-21-88-24-131-7-25q-1-4 1-15 36-8 66-12 20-3 37-6-1-16-4-32-4-17-5-23-10 0-13-1-13-1-23-1-5 0-16 2t-81 9l-110 1q-23 1-97-6-41-4-55-5z" horiz-adv-x="571.429" />
|
13
|
+
<glyph glyph-name="justifyleft" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-714 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l714 0q15 0 25-11t11-25z m143 214l0-71q0-15-11-25t-25-11l-857 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l857 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-643 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l643 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
14
|
+
<glyph glyph-name="justifycenter" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-500 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l500 0q15 0 25-11t11-25z m143 214l0-71q0-15-11-25t-25-11l-786 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l786 0q15 0 25-11t11-25z m-214 214l0-71q0-15-11-25t-25-11l-357 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l357 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
15
|
+
<glyph glyph-name="justifyright" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-714 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l714 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-857 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l857 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-643 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l643 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
16
|
+
<glyph glyph-name="justifyfull" unicode="" d="M1000 100l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z m0 214l0-71q0-15-11-25t-25-11l-929 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l929 0q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
17
|
+
<glyph glyph-name="outdent" unicode="" d="M214 546l0-321q0-7-5-13t-13-5q-8 0-13 5l-161 161q-5 5-5 13t5 13l161 161q5 5 13 5 7 0 13-5t5-13z m786-429l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
18
|
+
<glyph glyph-name="indent" unicode="" d="M196 386q0-8-5-13l-161-161q-5-5-13-5-7 0-13 5t-5 13l0 321q0 7 5 13t13 5q8 0 13-5l161-161q5-5 5-13z m804-268l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-607 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l607 0q7 0 13-5t5-13z m0 214l0-107q0-7-5-13t-13-5l-964 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l964 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
19
|
+
<glyph glyph-name="mode" unicode="" d="M429 46l0 607q-83 0-152-41t-110-110-41-152 41-152 110-110 152-41z m429 304q0-117-57-215t-156-156-215-57-215 57-156 156-57 215 57 215 156 156 215 57 215-57 156-156 57-215z" horiz-adv-x="857.143" />
|
20
|
+
<glyph glyph-name="fullscreen" unicode="" d="M716 548l-198-198 198-198 80 80q16 17 39 8 22-9 22-33l0-250q0-15-11-25t-25-11l-250 0q-23 0-33 22-9 22 8 39l80 80-198 198-198-198 80-80q17-17 8-39t-33-22l-250 0q-15 0-25 11t-11 25l0 250q0 23 22 33 22 9 39-8l80-80 198 198-198 198-80-80q-11-11-25-11-7 0-13 3-22 9-22 33l0 250q0 15 11 25t25 11l250 0q23 0 33-22 9-22-8-39l-80-80 198-198 198 198-80 80q-17 17-8 39t33 22l250 0q15 0 25-11t11-25l0-250q0-23-22-33-7-3-14-3-15 0-25 11z" horiz-adv-x="857.143" />
|
21
|
+
<glyph glyph-name="insertunorderedlist" unicode="" d="M214 64q0-45-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-232l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z m0 286l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
22
|
+
<glyph glyph-name="insertorderedlist" unicode="" d="M213-54q0-45-30-70t-76-26q-59 0-96 37l32 49q27-25 59-25 16 0 28 8t12 24q0 36-59 31l-15 31q4 6 18 24t24 30 21 21l0 1q-9 0-27-1t-27-1l0-30-59 0 0 85 186 0 0-49-53-64q28-7 45-27t17-49z m1 350l0-89-202 0q-3 20-3 30 0 28 13 52t32 38 37 27 32 24 13 25q0 14-8 21t-22 8q-26 0-45-32l-47 33q13 28 40 44t59 16q41 0 69-23t28-63q0-28-19-51t-42-36-42-28-20-29l71 0 0 33 59 0z m786-178l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 8 5 13t13 5l679 0q7 0 13-5t5-13z m-786 502l0-55-187 0 0 55 60 0q0 23 0 68t0 68l0 7-1 0q-4-9-28-30l-40 42 76 71 59 0 0-225 60 0z m786-216l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 8 5 13t13 5l679 0q7 0 13-5t5-13z m0 286l0-107q0-7-5-13t-13-5l-679 0q-7 0-13 5t-5 13l0 107q0 7 5 13t13 5l679 0q7 0 13-5t5-13z" horiz-adv-x="1000" />
|
23
|
+
<glyph glyph-name="strikethrough" unicode="" d="M982 350q8 0 13-5t5-13l0-36q0-8-5-13t-13-5l-964 0q-8 0-13 5t-5 13l0 36q0 8 5 13t13 5l964 0z m-713 36q-16 20-28 45-27 54-27 105 0 101 75 172 74 71 219 71 28 0 93-11 37-7 99-27 6-21 12-66 8-69 8-102 0-10-3-25l-7-2-47 3-8 1q-28 83-57 114-49 51-117 51-64 0-102-33-37-32-37-81 0-41 37-78t156-72q39-11 97-37 32-16 53-29l-415 0z m283-143l229 0q4-22 4-51 0-62-23-118-13-31-40-58-21-20-61-45-45-27-85-37-45-12-113-12-64 0-109 13l-78 22q-32 9-40 16-4 4-4 12l0 7q0 60-1 87-1 17 0 38l1 21 0 25 57 1q8-19 17-40t13-31 7-15q20-32 45-52 24-20 59-32 33-12 74-12 36 0 78 15 43 15 68 48 26 34 26 72 0 47-45 88-19 16-76 40z" horiz-adv-x="1000" />
|
24
|
+
<glyph glyph-name="underline" unicode="" d="M27 726q-21 1-25 2l-2 49q7 1 22 1 33 0 62-2 74-4 93-4 48 0 94 2 65 2 81 3 31 0 48 1l-1-8 1-36 0-5q-33-5-69-5-33 0-44-14-7-8-7-74 0-7 0-18t0-14l1-128 8-156q3-69 28-113 20-33 54-51 49-26 99-26 58 0 107 16 31 10 55 28 27 20 36 36 20 31 30 64 12 41 12 128 0 44-2 71t-6 68-8 89l-2 33q-3 37-13 49-19 20-43 19l-56-1-8 2 1 48 47 0 114-6q42-2 109 6l10-1q3-21 3-28 0-4-2-17-25-7-47-7-41-6-44-9-8-8-8-23 0-4 1-15t1-17q4-11 12-221 3-109-8-170-8-42-23-68-21-36-62-69-42-32-102-50-61-18-142-18-93 0-158 26-66 26-100 68t-46 109q-9 45-9 132l0 186q0 105-9 119-14 20-82 22z m830-786l0 36q0 8-5 13t-13 5l-821 0q-8 0-13-5t-5-13l0-36q0-8 5-13t13-5l821 0q8 0 13 5t5 13z" horiz-adv-x="857.143" />
|
25
|
+
<glyph glyph-name="blockquote" unicode="" d="M429 671l0-393q0-58-23-111t-61-91-91-61-111-23l-36 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l36 0q59 0 101 42t42 101l0 18q0 22-16 38t-38 16l-125 0q-45 0-76 31t-31 76l0 214q0 45 31 76t76 31l214 0q45 0 76-31t31-76z m500 0l0-393q0-58-23-111t-61-91-91-61-111-23l-36 0q-15 0-25 11t-11 25l0 71q0 15 11 25t25 11l36 0q59 0 101 42t42 101l0 18q0 22-16 38t-38 16l-125 0q-45 0-76 31t-31 76l0 214q0 45 31 76t76 31l214 0q45 0 76-31t31-76z" horiz-adv-x="928.571" />
|
26
|
+
<glyph glyph-name="undo" unicode="" d="M1000 225q0-93-71-252-2-4-6-13t-8-17-7-12q-7-9-16-9-8 0-13 6t-5 14q0 5 1 15t1 13q3 38 3 69 0 56-10 101t-27 77-45 56-59 39-74 24-86 12-98 3l-125 0 0-143q0-15-11-25t-25-11-25 11l-286 286q-11 11-11 25t11 25l286 286q11 11 25 11t25-11 11-25l0-143 125 0q398 0 488-225 30-75 30-186z" horiz-adv-x="1000" />
|
27
|
+
<glyph glyph-name="code" unicode="" d="M344 69l-28-28q-6-6-13-6t-13 6l-260 260q-6 6-6 13t6 13l260 260q6 6 13 6t13-6l28-28q6-6 6-13t-6-13l-219-219 219-219q6-6 6-13t-6-13z m330 595l-208-720q-2-7-9-11t-13-1l-35 9q-7 2-11 9t-1 14l208 720q2 7 9 11t13 1l35-9q7-2 11-9t1-14z m367-363l-260-260q-6-6-13-6t-13 6l-28 28q-6 6-6 13t6 13l219 219-219 219q-6 6-6 13t6 13l28 28q6 6 13 6t13-6l260-260q6-6 6-13t-6-13z" horiz-adv-x="1071.429" />
|
28
|
+
<glyph glyph-name="unlink" unicode="" d="M245 141l-143-143q-6-5-13-5t-13 5q-5 6-5 13t5 13l143 143q6 5 13 5t13-5q5-6 5-13t-5-13z m94-23l0-179q0-8-5-13t-13-5-13 5-5 13l0 179q0 8 5 13t13 5 13-5 5-13z m-125 125q0-8-5-13t-13-5l-179 0q-8 0-13 5t-5 13 5 13 13 5l179 0q8 0 13-5t5-13z m705-71q0-67-47-113l-82-81q-46-46-113-46-68 0-114 47l-186 187q-12 12-23 31l133 10 152-153q15-15 38-15t38 15l82 81q16 16 16 37 0 22-16 38l-153 153 10 133q20-12 31-23l187-187q47-48 47-114z m-344 404l-133-10-152 153q-16 16-38 16t-38-15l-82-81q-16-16-16-37 0-22 16-38l153-153-10-134q-20 12-31 23l-187 187q-47 48-47 114 0 67 47 113l82 81q46 46 113 46 68 0 114-47l186-187q12-12 23-31z m353-47q0-8-5-13t-13-5l-179 0q-8 0-13 5t-5 13 5 13 13 5l179 0q8 0 13-5t5-13z m-304 304l0-179q0-8-5-13t-13-5-13 5-5 13l0 179q0 8 5 13t13 5 13-5 5-13z m227-84l-143-143q-6-5-13-5t-13 5q-5 6-5 13t5 13l143 143q6 5 13 5t13-5q5-6 5-13t-5-13z" horiz-adv-x="928.571" />
|
29
|
+
<glyph glyph-name="superscript" unicode="" d="M501 86l0-93-138 0-89 141-13 23q-4 5-6 12l-2 0-5-12q-6-11-14-25l-86-140-144 0 0 93 71 0 110 162-103 152-76 0 0 94 154 0 78-127q1-2 13-23 4-5 6-12l2 0q2 5 6 12l14 23 78 127 143 0 0-94-70 0-103-149 114-165 61 0z m355 379l0-115-287 0-2 15q-2 16-2 26 0 36 15 65t36 48 47 36 47 30 36 30 15 36q0 21-16 35t-39 14q-28 0-54-22-8-6-20-21l-59 51q15 21 35 37 46 36 105 36 61 0 99-33t38-88q0-31-14-57t-35-43-45-33-46-28-37-29-17-35l129 0 0 45 70 0z" horiz-adv-x="857.143" />
|
30
|
+
<glyph glyph-name="subscript" unicode="" d="M501 86l0-93-138 0-89 141-13 23q-4 5-6 12l-2 0-5-12q-6-11-14-25l-86-140-144 0 0 93 71 0 110 162-103 152-76 0 0 94 154 0 78-127q1-2 13-23 4-5 6-12l2 0q2 5 6 12l14 23 78 127 143 0 0-94-70 0-103-149 114-165 61 0z m357-121l0-115-287 0-2 15q-2 25-2 26 0 36 15 65t36 48 47 36 47 30 36 30 15 36q0 21-16 35t-39 14q-28 0-54-22-8-6-20-21l-59 51q15 21 35 37 45 36 105 36 61 0 99-33t38-88q0-37-19-66t-47-48-56-35-49-35-23-41l129 0 0 45 70 0z" horiz-adv-x="857.143" />
|
31
|
+
<glyph glyph-name="inserthorizontalrule" unicode="" d="M214 439l0-107q0-22-16-38t-38-16l-107 0q-22 0-38 16t-16 38l0 107q0 22 16 38t38 16l107 0q22 0 38-16t16-38z m286 0l0-107q0-22-16-38t-38-16l-107 0q-22 0-38 16t-16 38l0 107q0 22 16 38t38 16l107 0q22 0 38-16t16-38z m286 0l0-107q0-22-16-38t-38-16l-107 0q-22 0-38 16t-16 38l0 107q0 22 16 38t38 16l107 0q22 0 38-16t16-38z" horiz-adv-x="785.714" />
|
32
|
+
<glyph glyph-name="pin" unicode="" d="M268 368l0 250q0 8-5 13t-13 5-13-5-5-13l0-250q0-8 5-13t13-5 13 5 5 13z m375-196q0-15-11-25t-25-11l-239 0-28-270q-1-7-6-11t-11-5l-1 0q-15 0-18 15l-42 271-225 0q-15 0-25 11t-11 25q0 69 44 124t99 55l0 286q-29 0-50 21t-21 50 21 50 50 21l357 0q29 0 50-21t21-50-21-50-50-21l0-286q55 0 99-55t44-124z" horiz-adv-x="642.857" />
|
33
|
+
<glyph glyph-name="createlink" unicode="" d="M812 171q0 22-16 38l-116 116q-16 16-38 16-23 0-40-18 2-2 11-10t12-12 8-11 7-14 2-15q0-22-16-38t-38-16q-8 0-15 2t-14 7-11 8-12 12-10 11q-18-17-18-41 0-22 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-392 393q0 22-16 38l-115 116q-16 16-38 16t-38-15l-82-81q-16-16-16-37 0-22 16-38l116-116q15-15 38-15t40 17q-2 2-11 10t-12 12-8 11-7 14-2 15q0 22 16 38t38 16q8 0 15-2t14-7 11-8 12-12 10-11q18 17 18 41z m499-393q0-67-47-113l-82-81q-46-46-113-46-68 0-114 47l-115 116q-46 46-46 113 0 69 49 117l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 81q46 46 113 46 68 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.571" />
|
34
|
+
</font>
|
35
|
+
</defs>
|
36
|
+
</svg>
|
Binary file
|