Skip to content

Keyboard shortcuts don't work #80

@travisbell

Description

@travisbell

Hey @panphora,

When using the overtype.esm.js file, keyboard shortcuts don't seem to be working. I traced it down to the handleAction() function on line 2789. I don't quite get why this function is defined twice but if I replace the logic with the way the one on line 1638 works, the keyboard shortcuts work as expected.

I'm initializing the editor like so:

<script type="module">
  import OverType, { toolbarButtons } from 'overtype.esm.js';

  const editor = new OverType('#editor', {
    autofocus: true,
    autoResize: true,
    padding: '0px',
    placeholder: "A minimum of 100 characters is required.",
    toolbar: true,
    toolbarButtons: [
      toolbarButtons.bold,
      toolbarButtons.italic,
      toolbarButtons.separator,
      toolbarButtons.bulletList,
      toolbarButtons.orderedList,
      toolbarButtons.separator,
      toolbarButtons.quote,
      toolbarButtons.separator,
      toolbarButtons.viewMode
    ]
  });
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions