How to make textAngular active by default?

168 views Asked by At

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?

1

There are 1 answers

1
r0u9hn3ck On
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();
})