当前位置:网站首页>tinymce 如何实现动态国际化
tinymce 如何实现动态国际化
2022-08-03 12:53:00 【InfoQ】
tinymce 如何实现动态国际化
language
tinymce.init({
selector: 'textarea.tinymce',
plugins: `code image imagetools media`,
toolbar: `code`,
skin: false,
language: 'ja',
min_height:240,
skeletonScreen: true,
content_css: false,
}).then(()=>{
tinymce.init({
selector: 'div#mytextarea',
menubar: 'file edit insert view format table tools help',
skin: false,
plugins: 'tpImportword',
toolbar: 'tpImportword',
content_css: false,
min_height:240,
skeletonScreen: true
}).then(()=>{
tinymce.init({
selector: 'div#mytextarea3',
skin: false,
language: 'zh_CN',
content_css: false,
min_height:240,
skeletonScreen: true,
plugins: `code`,
toolbar: `code`,
})
})
});

tinymce.init({...}).then(()=>{ tinymce.init({...}).then(()=>{ ... })... })

那么这个问题该 如何解决
editor.editorContainer.onmouseover = () => {
let _language = editor.settings.language
let _currentCodeVal = editor.editorManager.i18n.getCode()
_currentCodeVal != _language && editor.editorManager.i18n.setCode(_language)
};
tinymce.init({
language: 'zh_CN',
content_css: false,
tp_i18n: true,
min_height:240,
plugins: `code`,
toolbar: `code`,
})

tp_i18n_langs: true
tpI18n
tinymce.init({
selector: 'div#mytextarea',
menubar: 'file edit insert view format table tools help mymenubar',
skin: false,
tp_i18n: true,
plugins: 'tpImportword',
toolbar: 'tpImportword',
tp_i18n_langs: true,
content_css: false,
menu: {
mymenubar: { title: 'Extension', items: 'tpI18n' },
},
min_height:240,
skeletonScreen: true,
setup: (
editor
)=>{
}
})


边栏推荐
- leetcode 11. 盛最多水的容器
- Station B responded that "HR said that core users are all Loser": the interviewer was persuaded to quit at the end of last year and will learn lessons to strengthen management
- shell编程之条件语句
- 【OpenCV】 级联分类器训练模型
- 易观分析:2022年Q2中国网络零售B2C市场交易规模达23444.7亿元
- The new interface, jingdong comment interface
- Database basics one (MySQL) [easy to understand]
- PyTorch builds a neural network to predict temperature (dataset comparison, CPU vs GPU comparison)
- PyTorch framework to train linear regression model (CPU and GPU environment)
- [Deep Learning] Overview of Efficient and Lightweight Semantic Segmentation
猜你喜欢
GameFi 行业下滑但未出局| June Report
易观分析:2022年Q2中国网络零售B2C市场交易规模达23444.7亿元
Comics: how do you prove that sleep does not release the lock, and wait to release lock?
[Microservice] Multi-level cache
Real number rounding and writing to file (C language file)
GameFi industry down but not out | June Report
An工具介绍之宽度工具、变形工具与套索工具
HCIP-第十二天-MPLS+VNP
Jmeter use
setTimeout, setInterval requestAnimationFrame
随机推荐
Redis 6 的多线程
安全自定义 Web 应用程序登录
软件测试面试(四)
An工具介绍之形状工具及渐变变形工具
Blog records life
An introduction to the pen tool, pencil tool and brush tool
An introduction to the camera
IronOS, an open source system for portable soldering irons, supports a variety of portable DC, QC, PD powered soldering irons, and supports all standard functions of smart soldering irons
【实战技能】单片机bootloader的CANFD,I2C,SPI和串口方式更新APP视频教程(2022-08-01)
客户:我们系统太多,能不能实现多账号互通?
Key points for account opening of futures companies
The maximum number of sliding window
An animation basic element movie clip effect
Golang channel channel
Byte's favorite puzzle questions, how many do you know?
An动画基础之元件的影片剪辑动画与传统补间
4年工作经验,多线程间的5种通信方式都说不出来,你信吗?
基于php志愿者服务平台管理系统获取(php毕业设计)
Golang Mutex
Golang 结构体&方法