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

When Editor is in read mode or toolbar is hidden mode. Toolbar flashes for a while then disappear. #1023

Closed
roker15 opened this issue Jun 3, 2022 · 11 comments
Milestone

Comments

@roker15
Copy link

roker15 commented Jun 3, 2022

Even though editor hideToolbar={ true } and readOnly={ true} Initially Whole toolbar flashes for a while and then disappear. This is more visible when computer is slow.

This looks very ugly (Creates bad user experience as many user gave me feedback) when there are multiple suneditor on same page.

Default toolbar should be hidden. And should show after rendering if condition allow.

@roker15
Copy link
Author

roker15 commented Jun 8, 2022

I don't understand the issue. It currently appears above the toolbar.

I want my editor toolbar hidden initially. So I put hideToolbar false. But initially toolbar is visible by microseconds and then hidden. It creates a flash, looks bad to user. Can you make editor toolbar hidden by default.

@JiHong88
Copy link
Owner

JiHong88 commented Jun 8, 2022

There is no option to hide the toolbar in the first place.
After loading the editor, "hideToolbar" is executed.
I'll add an option to hide the toolbar.

@JiHong88 JiHong88 added this to the 2.43.9 milestone Jun 8, 2022
JiHong88 added a commit that referenced this issue Jun 10, 2022
@JiHong88
Copy link
Owner

The 2.43.9 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.

@roker15
Copy link
Author

roker15 commented Jun 15, 2022

hideToolbar={ true }

This option was available earlier also. So how does your new hideToolbar different?

@JiHong88
Copy link
Owner

"suneditor-react" is not a package I manage.
The existing method is to execute the core.toolbarHide method after loading the editor.
Added option.
The toolbar is loaded with hidden.

@roker15
Copy link
Author

roker15 commented Jun 16, 2022

Added option.
The toolbar is loaded with hidden.

I tried to add this option but , it shows Object literal may only specify known properties, and 'hideToolbar' does not exist in type 'SetOptions'

setOptions={{
                hideToolbar : true // Here i tried to add this but it shows error

                placeholder: "Click Edit and Start Typing",
                mode: "classic",
                katex: katex,
}}

I am using React 18, Nextjs 12 and suneditor 2.43.9 and latest suneditor-react

@JiHong88
Copy link
Owner

suneditor-react is not a package I manage.
You can also implement it yourself and use it.
#1036 (comment)

@roker15
Copy link
Author

roker15 commented Jun 21, 2022

suneditor-react is not a package I manage

But this option is coming from suneditor and not from suneditor-react. And even if we install suneditor-react we need to install suneditor also. And I have latest suneditor. So why i am not getting this option?

@JiHong88
Copy link
Owner

I don't understand what you mean.
You can test it here.

@roker15
Copy link
Author

roker15 commented Jun 22, 2022

hideToolbar

hideToolbar option is not available in recent version. 2.43.11 ---- great job..

Now i see nice user experience, no flash of toolbar appears and goes.

1 similar comment
@roker15
Copy link
Author

roker15 commented Jun 22, 2022

hideToolbar

hideToolbar option is not available in recent version. 2.43.11 ---- great job..

Now i see nice user experience, no flash of toolbar appears and goes.

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