承接 rpc-scandinavia/rpc_rcm_patches 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rpc-scandinavia/rpc_rcm_patches

Composer 安装命令:

composer require rpc-scandinavia/rpc_rcm_patches

包简介

Patches dark mode for the message viewer and the message editor. Includes a Scandinavian Inter font. Options can be configured by the user or forced by the systems administrator. Requires minimum RoundCubeMail version 1.7.

README 文档

README

This plugin for RoundCubeMail version 1.7, patches dark mode for the mail editor and the mail viewer. I think the quality is close to what you get in Thunderbird.

It also includes a customized version of the Inter font made by Rasmus Andersson from Scandinavia, released under SIL Open Font License version 1.1.

https://github.com/rsms/inter/ and https://rsms.me/inter/

It extends the mail editor dark mode work done by Dhiego Cassiano Fogaça Barbosa, which is released under Apache License version 2.0.

https://github.com/modscleo4/roundcube-plugin-dark-html

Inter font

The configurable option use_scandinavian_inter_font lets you choose whether to use the modified Inter font.

Value Description
yes Use the Scandinavian Inter font in both the mail viewer and the mail editor.
viewer Use the Scandinavian Inter font in the mail viewer.
editor Use the Scandinavian Inter font in the mail editor.
Any other value will disable use of the Scandinavian Inter font.

When used in the mail editor, the Inter font is added to the available_fonts option and set as default in the default_font option.

A note about custom fonts in the message editor. Even though the font is available in the message css, the @font face is most likely stripped by the receiving mail servers with the result that the message receiver will see an alternative font unless the message receiver has an inter font installed, in which case the message receiver should see the Inter font though not the Scandinavian version.

Dark mode prerequisites

This plugin assumes that RCM adds and removes the dark-mode class on the html element, specifying whether dark mode is enabled or not:

  • For the web program itself
  • For the mail viewer iframe
  • For the mail viewer window or tab
  • For the mail editor iframe (TinyMCE)

Mail viewer

The configurable option invert_implementation lets you choose which inverting implementation to use.

Value Description
classic The initial implementation (see examples below).
colour An alternative implementation that retains more colours.

Known bugs

Minor: Not all the css and js is minified.

White flash

Sometimes there is a white flash when a mail is selected. It looks like this is coming from white or bright background in the message itself, and the flash is caused by the delay between loading the message and the plugin inverting the message HTML elements.

I have tried to fix this in two ways.

Message shown in the viewer: The IFrame element which is the message viewer is hidden with display = "none", and then shown after the message inversion has been performed. This seems to work as intended.

Message shown in its own tab or window: The element containing the message is hidden with display = 'none', and then shown after the message inversion has been performed. This don't work 100%, because it is not possible (I have not fund a way) to hide the element from plug-in code any earlier then in the DOMContentLoaded event listener. This fix is actually also done in the message viewer, just inside the IFrame.

I am concidering to remove the second fix, because it actually causes a blink because the message is briefly shown, then hidden and inverted if in dark mode, and finally shown again. It is basicly the top 11 lines in darkmode-viewer.js.

Mail editor (TinyMCE)

RCM does not set the dark-mode class on the html element when the mail editor is created/initialised, the plugin fixes that.

RCM does however set the dark-mode class on the html element when the user toggles between dark and light mode.

Fix css

The message editor css is fixed by creating a new css file containing the existing css from skins/elastic/styles/embed.min.css and some additional css. The RCM configuration setting editor_css_location is set with the path to the new combined css file, which causes RCM to use that file when it initialises the mail editor (TinyMCE).

Known bugs

Minor: Not all the css is minified.

File permissions

Because files are written, the following file permissions are required:

chmod  u+w  plugins/rpc_rcm_patches/skin/elastic

Installation

Basic steps to install this plugin:

  • Download code from GitHub ( https://github.com/rpc-scandinavia/RpcRoundCubeMailPatches)
  • Extract files, and copy directory rpc_rcm_patches to plugins
  • Enable plugin in config/config.inc.php by adding rpc_rcm_patches to $config['plugins'] array
  • Copy configuration file plugins/rpc_rcm_patches/config.inc.php.dist to plugins/rpc_rcm_patches/config.inc.php and modify as needed
  • Allow plugin to create css file: chmod u+w plugins/rpc_rcm_patches/skin/elastic

Changes

Changes made.

Version Description
2026.0 Added a button in the message toolbar, that can toggle between dark and light mode, when the application is in dark mode.
2025.0 Initial version.

Examples

Message editor

Message editor in dark mode

Message viewer

Message viewer in dark mode

Message viewer in dark mode

The same message in RoundCubeMail and Thunderbird

Message viewer in dark mode

Thunderbird in dark mode

René Paw Christensen

https://rpc-scandinavia.dk/

rpc-scandinavia/rpc_rcm_patches 适用场景与选型建议

rpc-scandinavia/rpc_rcm_patches 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 07 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 rpc-scandinavia/rpc_rcm_patches 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 rpc-scandinavia/rpc_rcm_patches 我们能提供哪些服务?
定制开发 / 二次开发

基于 rpc-scandinavia/rpc_rcm_patches 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 27
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2025-07-29