菜单栏都是英文,求大佬汉化

功能建议 · 358 次浏览
welcome2025 创建于 2023-02-12 13:14

菜单栏都是英文,求大佬汉化


回复内容
H-D-G 2023-10-05 19:37
#1

网上有汉化资源,可以自己找找,我推荐这个:http://tinymce.ax-z.cn/static/tiny/langs/zh_CN.js

H-D-G 回复 H-D-G 2023-10-05 19:38 :

效果还是很不错的

H-D-G 回复 H-D-G 2023-11-26 23:22 :

<!DOCTYPE html>

<html>


<head>

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">

  <style type="text/css">

    .tox-tinymce {

      border: none !important;

    }


    .tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type) {

      border-right: none !important;

    }


    .tox .tox-statusbar {

      border-top: none !important;

      display: none !important;

    }


    .tox .tox-editor-container {

      height: -webkit-fill-available !important;

      position: fixed !important;

      width: 100% !important;

    }


    .tox .tox-toolbar,

    .tox .tox-toolbar__overflow,

    .tox .tox-toolbar__primary {

      background: none !important;

      background-color: rgba(255, 255, 255, 1.0) !important;

      box-shadow: 1px 1px 5px rgba(1, 1, 1, 0.08);

    }

  </style>

  <script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/tinymce/5.10.0/tinymce.min.js"></script>

  <script>

    tinymce.init({

      selector: '#mytextarea',

      menubar: false,

      contextmenu: true,

      plugins: 'print preview  searchreplace autosave directionality fullscreen image link media template codesample table nonbreaking insertdatetime advlist lists wordcount textpattern noneditable emoticons save searchreplace code',

      toolbar: 'undo redo |' +

        'fontselect fontsizeselect |' +

        'bold italic underline strikethrough |' +

        'forecolor backcolor removeformat |' +

        'alignleft aligncenter alignright alignjustify |' +

        'outdent indent |' +

        'numlist bullist checklist |' +

        'emoticons image media table link codesample|' +

        'searchreplace fullscreen  preview print|' +

        'code',

      automatic_uploads: true,

      file_picker_types: 'image',

      language_url : 'http://tinymce.ax-z.cn/static/tiny/langs/zh_CN.js',

      language:'zh_CN',

      image_title: true,

      file_picker_callback: function (cb, value, meta) {

        var input = document.createElement('input');

        input.setAttribute('type', 'file');

        input.setAttribute('accept', 'image/*');

        input.onchange = function () {

          var file = this.files[0];

          var reader = new FileReader();

          reader.onload = function () {

            var id = 'blobid' + (new Date()).getTime();

            var blobCache = tinymce.activeEditor.editorUpload.blobCache;

            var base64 = reader.result.split(',')[1];

            var blobInfo = blobCache.create(id, file, base64);

            blobCache.add(blobInfo);

            cb(blobInfo.blobUri(), { title: file.name });

          };

          reader.readAsDataURL(file);

        };

        input.click();

      }

    });

  </script>

</head>


<body>

  <textarea id="mytextarea">Hello, World!</textarea>

</body>

</html>

回复主贴