如何在tinymce中动态切换browser_spellcheck [英] How to toggle browser_spellcheck dynamically in tinymce

查看:28
本文介绍了如何在tinymce中动态切换browser_spellcheck的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义工具栏按钮,用于切换浏览器的拼写检查.我用过

I've a custom toolbar button, which is used to toggle the browser's spell check. I've used

browser_spellcheck : true 

在初始化中.现在,如果我们按下按钮,那么我需要关闭"拼写检查.

in the initialization. Now if we press button, then i need to 'off' the spell check.

那么,我们如何动态设置browser_spellcheckfalse?

So, how can we set browser_spellcheck to false dynamically?

推荐答案

您不能动态更改 TinyMCE 的初始化设置 - 它根本不允许这种情况发生.如果您需要更改这样的设置,则需要使用 remove()init() API 以使用新设置重新加载编辑器.

You cannot change the init settings of TinyMCE dynamically - it simply does not allow that to happen. If you need to change a setting like this you would need to use the remove() and init() APIs to reload the editor with new settings.

这篇关于如何在tinymce中动态切换browser_spellcheck的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆