当前位置:网站首页>tinymce 如何实现动态国际化
tinymce 如何实现动态国际化
2022-08-02 13:19: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
)=>{
}
})


边栏推荐
猜你喜欢
随机推荐
Embedded system driver primary [2] - based on character device driver _ basic framework
水平垂直居中方式
Oracle update误操作单表回滚
ETL(二):表达式组件的使用
拯救流浪猫 | 「喵先锋」系列数字版权盲盒明日开抢
鲁大师7月新机性能/流畅榜:骁龙8+正面对决天玑9000+,性能跑分突破123万!
[typescript] Use the RangePicker component in antd to implement time limit the previous year (365 days) of the current time
图论之Prim,最小生成树该怎么解?
【C语言】手撕循环结构 —— for语句
Seata分布式事务
节省50%成本!京东云重磅发布新一代混合CDN产品
Do you know Dijkstra of graph theory?
“二舅”火了,自媒体短视频“爆火”的基本要素,你知道吗?
如何通过DBeaver 连接 TDengine?
The uniapp/applet onload method executes the interpretation every time the page is opened
leetcode 504. Base 7 七进制数 (简单)
Basic operations of openGauss database (super detailed)
js数组递归使用
二叉树的类型、构建、遍历、操作
工厂方法模式