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

Spellchecking #239

Closed
huelsemann opened this issue Nov 24, 2016 · 5 comments
Closed

Spellchecking #239

huelsemann opened this issue Nov 24, 2016 · 5 comments
Labels

Comments

@huelsemann
Copy link

I would like to enable browser-based spell checking when editing text content. I have noticed that the spellcheck attribute is set to false and that - once I set it to true manually - spell checking will work.

Would it be possible to enable this for all text blocks by default and if yes, what needs to be changed?

spellcheck

Thanks in advance!

@bago
Copy link
Member

bago commented Nov 24, 2016

I think this depends on tinymce initialization options... try creating a plugin and passing it to the mosaico startup options:

var plugin = function(vm) {
  ko.bindingHandlers.wysiwyg.fullOptions['browser_spellcheck'] = true;
}

https://github.com/voidlabs/mosaico/wiki/Mosaico-Plugins

Please report back if it works.

@bago bago added the question label Nov 24, 2016
@bago
Copy link
Member

bago commented Dec 9, 2016

Any news? Did it work? How?

@huelsemann
Copy link
Author

Sorry for the late response but I was on holiday and my colleagues didn't find the time to look into this.

Unfortunately it does not work with the plugin - however, it does make a difference as the spellcheck attribute is gone completely when the plugin is defined:

With plugin:
image

Without plugin:
image

I also tried setting this in wyswig.js as described in #247 with the same effect (spellcheck attribute is gone).

If you have any further ideas please let me know.

Thank you!

@bago
Copy link
Member

bago commented Dec 19, 2016

I guess this is a tinymce issue more than a mosaico issue: if you find a way to make tinymce 4 in "inline mode" to support spellchecking then I can help porting that method to mosaico.

@huelsemann
Copy link
Author

huelsemann commented Jan 2, 2017

I finally managed to get the spellcheck working. The trick was to set this in in the standardOptions in wysiwygs.js instead of the fullOptions, which did not work.

So, in order to enable browser spellchecking, either use a plugin like this (using standardOptions instead of fullOptions in your suggestion):

var plugin = function(vm) {
ko.bindingHandlers.wysiwyg.standardOptions['browser_spellcheck'] = true;
}

or - similar to #247# - change line 171 in wysiwygs.js from
standardOptions: {},
to
standardOptions: { browser_spellcheck : "true" },

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