editor.js 1.2 KB

12345678910111213141516171819202122232425262728
  1. import {CDN_IMG_URL} from './config'
  2. const EDITOR_ROOT_URL = `${CDN_IMG_URL}/tinymce`
  3. const EDITOR_LANGUAGE = `${EDITOR_ROOT_URL}/langs/zh_CN.js`
  4. let fullEditor = {
  5. language_url: EDITOR_LANGUAGE,
  6. height: 500,
  7. plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen link template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern help',
  8. toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
  9. }
  10. let textEditor = {
  11. language_url: EDITOR_LANGUAGE,
  12. height: 500,
  13. menubar: false,
  14. plugins: [
  15. 'advlist autolink lists link charmap print preview anchor textcolor colorpicker',
  16. 'searchreplace visualblocks code fullscreen',
  17. 'insertdatetime media table contextmenu paste code help'
  18. ],
  19. toolbar: 'undo redo | formatselect | bold italic backcolor forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help'
  20. }
  21. export {
  22. fullEditor,
  23. textEditor,
  24. EDITOR_ROOT_URL
  25. }