• Robert Knight's avatar
    Refactor markdown command insertion · c069f232
    Robert Knight authored
     * Separate the logic for transforming the input field
       from the logic for actually reading the state of
       the input field and applying changes.
    
       This enables testing of the commands without
       instantiating the component.
    
       Toolbar commands are functions which take
       the current state of the input field and return
       the updated state.
    
     * Add tests for the individual commands and use
       of the commands in the markdown editor.
    c069f232
markdown-commands.js 7.25 KB