Skip to content
Snippets Groups Projects
Commit 6839b987 authored by chris's avatar chris Committed by Yannis Barlas
Browse files

cleanup

parent e3b5b1f2
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,12 @@ class ContainerEditor extends SubstanceContainerEditor { ...@@ -30,12 +30,12 @@ class ContainerEditor extends SubstanceContainerEditor {
if (this.isEmpty()) this.createText() if (this.isEmpty()) this.createText()
this.el.focus() // TODO notworking this.el.focus() // TODO notworking
// if (this.isReadOnlyMode()) { if (this.isReadOnlyMode()) {
// const documentSession = this.getDocumentSession() const documentSession = this.getDocumentSession()
// documentSession.on('didUpdate', this.disableToolbar, this) documentSession.on('didUpdate', this.disableToolbar, this)
//
// this.addTargetToLinks() this.addTargetToLinks()
// } }
} }
onTextInput (event) { onTextInput (event) {
......
...@@ -27,42 +27,25 @@ class Editor extends ProseEditor { ...@@ -27,42 +27,25 @@ class Editor extends ProseEditor {
} }
trackChangesViewToggle () { trackChangesViewToggle () {
// TODO what to handle here????
this.extendState({ this.extendState({
trackChangesView: !this.state.trackChangesView trackChangesView: !this.state.trackChangesView
}) })
} }
updateTrackChange () { updateTrackChange () {
this.extendProps({ this.extendProps({trackChanges: !this.props.trackChanges})
trackChanges: !this.props.trackChanges
})
//
this.props.updateTrackChangesStatus(!this.props.trackChanges) this.props.updateTrackChangesStatus(!this.props.trackChanges)
this.refs.toolbar.extendProps({ this.refs.toolbar.extendProps({trackChanges: this.props.trackChanges})
trackChanges: this.props.trackChanges
})
} }
willUpdateState () {} willUpdateState () {}
didMount () { didMount () {
// this.documentSession.on('didUpdate', this.documentSessionUpdated, this)
// this.editorSession.on('fileUploadTrigger', this.handleUpload, this)
this.extendState({ editorReady: true }) this.extendState({ editorReady: true })
} }
// handleUpload (file, callback) {
// const { fileUpload } = this.props
//
// // TODO -- then / catch
// // fileUpload(file).then((res, err) => {
// // if (err != null) callback(null, err)
// // return callback(res.file, null)
// // })
// }
render ($$) { render ($$) {
const { trackChangesView } = this.state const { trackChangesView } = this.state
const canToggleTrackChanges = this.canToggleTrackChanges() const canToggleTrackChanges = this.canToggleTrackChanges()
......
...@@ -82,13 +82,6 @@ class EditNoteTool extends Tool { ...@@ -82,13 +82,6 @@ class EditNoteTool extends Tool {
const selectionLength = (sel.end.offset - sel.start.offset === 1) const selectionLength = (sel.end.offset - sel.start.offset === 1)
if (typeof note[0] !== 'undefined' && selectionLength) { if (typeof note[0] !== 'undefined' && selectionLength) {
// disable commands that don't make sense on a note
console.log('commandStates', commandStates)
// each(keys(commandStates), (key) => {
// const allowed = ['comment', 'redo', 'save', 'switch-text-type', 'undo']
// if (!includes(allowed, key)) commandStates['link'].disabled = true
// })
return { return {
node: note[0] node: note[0]
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment