我试图使“曲目更改”按钮使用MS Word之类的编辑器。我使用具有datetime属性的Ins和Del HTML元素来标记更改:
tinymce.init({
selector: "textarea", // change this value according to your HTML.
plugins: [
"code trackchanges",
],
toolbar: "inserttext deletetext showchanges hidechanges",
menubar: "advanced view",
menu: {
advanced: { title: "Advanced", items: "trackchanges" },
view: { title: "View", items: "code" }, // I add this to show the codes.
},
});
插件: trackchanges.js
我将翻译添加到语言文件中
tinymce.addI18n('tr',{
...
"Inserted Text": "Eklenmi\u015f Metin",
"Deleted Text": "Silinmi\u015f Metin",
"Changes": "De\u011fi\u015fiklikler",
"Show Changes": "De\u011fi\u015fiklikleri G\u00f6ster",
"Hide Changes": "De\u011fi\u015fiklikleri Gizle",
});
它可以满足目的,也许以后可以升级以更好地使用它。
屏幕截图: Track Changes Menu Items, Track Changes Formats
我搜索并阅读了很多堆叠页面。感谢所有共享代码并帮助我学习这些代码的人。