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

Can you provide a span with class="notranslate" <span class="notranslate"></span>? Because Google does not translate if you format a text using this class. This will be unique to SUNEDITOR. #914

Closed
roker15 opened this issue Jan 9, 2022 · 3 comments
Labels

Comments

@roker15
Copy link

roker15 commented Jan 9, 2022

Can you provide a span with class="notranslate" ? Because Google does not translate if you format a text using this class. This will be unique to SUNEDITOR.
see here--

https://stackoverflow.com/questions/9628507/how-can-i-tell-google-translate-to-not-translate-a-section-of-a-website#:~:text=164-,According,-to%20Google%20instructions

You can suggest some workaround till u provide this feature

@JiHong88 JiHong88 added this to the 2.42.1 milestone Feb 19, 2022
JiHong88 added a commit that referenced this issue Feb 19, 2022
@JiHong88
Copy link
Owner

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

@roker15
Copy link
Author

roker15 commented Apr 25, 2022

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

Can you please show an example how to use "className" feature that you have added?

@JiHong88
Copy link
Owner

JiHong88 commented Apr 26, 2022

Sorry, I misunderstood the issue number.
This issue can be solved with a custom plugin.
http://suneditor.com/sample/html/customPlugins.html#command

action: function () {
        if (!this.util.hasClass(this.context.customCommand_2.targetButton, 'active')) {
            const newNode = this.util.createElement('span');
            newNode.className = 'notranslate';
            this.nodeChange(newNode, ['.notranslate'], null, null);
        } else {
            this.nodeChange(null, ['.notranslate'], ['span'], true);
        }
    }

@JiHong88 JiHong88 removed this from the 2.43.0 milestone Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants