-1

I using textAngular, it is inactive when page loaded and became active only when user will click on input. It means that all its buttons, for example "Insert video" will be disabled untill text input will not be focused.

Is there a way to make text-angular enabled by default or make it always enabled?

Teo
  • 230
  • 3
  • 14

1 Answers1

0
document.getElementById("<id of the element you want to focus on>").focus();

If that doesn't work, try applying a timeout:

setTimeout(function() { document.getElementById("<id of the element you want to focus on>").focus(); }, 2000);

Further, if you're on jQuery as most of us, try using .focus() in conjunction with our classic line:

$(document).ready(function(){
document.getElementById("<id of the element you want to focus on>").focus();
})
r0u9hn3ck
  • 553
  • 4
  • 11
  • I already try it, doesn't work. textAngular enables on mousedown and check event.isTrusted. Edit plugin code is not an option, project deploys automatucally and will download code from github. – Teo Dec 22 '17 at 04:17