# OBSOLETE: Use FloatingToolbar instead. # However, We may decide to change back to a static toolbar in the footer, # so don't delete me yet. # React = require 'react' # # module.exports = # ContenteditableToolbar = React.createClass # render: -> # style = # display: @state.show and 'initial' or 'none' #
# #
# # # #
#
# # getInitialState: -> # show: false # # componentDidUpdate: (lastProps, lastState) -> # if !lastState.show and @state.show # @refs.toolbar.getDOMNode().focus() # # onClick: (event) -> # cmd = event.currentTarget.getAttribute 'data-command-name' # document.execCommand(cmd, false, null) # true # # onBlur: (event) -> # target = event.nativeEvent.relatedTarget # if target? and target.getAttribute 'data-command-name' # return # @setState # show: false