站酷文章编辑器排版

修正站酷文章编辑器内容和预览效果一致

  1. // ==UserScript==
  2. // @name 站酷文章编辑器排版
  3. // @namespace https://www.ifeiwu.com/
  4. // @version 0.2
  5. // @description 修正站酷文章编辑器内容和预览效果一致
  6. // @author pagepan
  7. // @match https://my.zcool.com.cn/uploadArticle
  8. // @include /(^https:\/\/my\.zcool\.com\.cn\/editArticle\?id=\d*$)/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. let $body = $('#ueditor_0').contents().find('head');
  16.  
  17. $body.append(`
  18. <style>
  19. *, a, body, button, caption, dd, div, dl, dt, em, figure, form, h1, h2, h3, h4, h5, h6, html, i, img, input, label, li, ol, p, span, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, ul {
  20. margin: 0;
  21. padding: 0;
  22. }
  23.  
  24. body {
  25. padding: 18px !important;
  26. }
  27.  
  28. h1, h2, h3, h4, h5, h6 {
  29. font-weight: bold;
  30. }
  31.  
  32. p {
  33. font-size: 16px;
  34. line-height: 32px;
  35. text-align: justify;
  36. text-justify: inter-ideograph;
  37. word-wrap: break-word;
  38. color: #666666;
  39. }
  40. </style>`);
  41.  
  42. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址