Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check SunEditor is focus #238

Closed
tranchem opened this issue Mar 6, 2020 · 4 comments
Closed

Check SunEditor is focus #238

tranchem opened this issue Mar 6, 2020 · 4 comments
Milestone

Comments

@tranchem
Copy link

tranchem commented Mar 6, 2020

Hi !
Firstly, i'm very grateful for your editor.
I have a question: "How to check SunEditor is focus ?"
Can you help me? I'm using options CodeMirrors

@JiHong88
Copy link
Owner

JiHong88 commented Mar 6, 2020

Do you want the focus event in code view mode?

@tranchem
Copy link
Author

tranchem commented Mar 6, 2020

Do you want the focus event in code view mode?

I don't need in code view mode.

@JiHong88
Copy link
Owner

JiHong88 commented Mar 6, 2020

Focus and blur event, It will be added in the next version.
In the current version >>

const editor = suneditor.create(...);
const w = core.options.iframe ? core._ww : context.element.wysiwyg;

let onFocus = false;
w.addEventListener('focus', function(e){onFocus = true});
w.addEventListener('blur', function(e){onFocus = false});

@JiHong88 JiHong88 added this to the 2.26.0 milestone Mar 6, 2020
JiHong88 added a commit that referenced this issue Mar 6, 2020
@JiHong88 JiHong88 closed this as completed Mar 6, 2020
JiHong88 added a commit that referenced this issue Mar 8, 2020
add: #238 #229 core-hasFocus,
add: onMouseDown event
@JiHong88
Copy link
Owner

The 2.26.0 version has been updated.
If there is an issue, please register as a new issue.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants