0

I have a input field when I placed focus and then trying to load epiceditor on a textarea and try to set preview mode. So preview mode working prefect, but the problem is it removed the cursor from the text field.

Is there a way to load epiceditor and set preview mode and cursor stay on the input field?

Deepak Biswal
  • 4,280
  • 2
  • 20
  • 37

1 Answers1

0
editor.on('preview', function () {
  $(editor.getElement('previewer')).find('input').focus();
});

The previous code runs each time preview is opened. It then gets the preview iframes body then lastly finds the first input and focuses

Oscar Godson
  • 31,662
  • 41
  • 121
  • 201