From 0263f8fe095dc96015d7f8d2803f902ef29a235b Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 17 Sep 2024 15:00:28 +0200 Subject: [PATCH] Use the custom Squire as submodule vendors/squire2 --- .gitignore | 2 + .gitmodules | 4 + tasks/config.js | 2 +- vendors/squire/LICENSE | 21 - vendors/squire/README.md | 501 ------------------ .../build => squire2/dist}/squire-raw.js | 0 6 files changed, 7 insertions(+), 523 deletions(-) delete mode 100644 vendors/squire/LICENSE delete mode 100644 vendors/squire/README.md rename vendors/{squire/build => squire2/dist}/squire-raw.js (100%) diff --git a/.gitignore b/.gitignore index b4e8f72e4..5f49d65d5 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,8 @@ /vendors/knockout/spec /vendors/openpgp-5 !/vendors/openpgp-5/dist +/vendors/squire2 +!/vendors/squire2/dist /vendors/vanillaqr.js/ /integrations/nextcloud/rainloop /integrations/owncloud/rainloop diff --git a/.gitmodules b/.gitmodules index cfb771834..ccf1009a6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "vendors/openpgp-5"] path = vendors/openpgp-5 url = git@github.com:the-djmaze/openpgpjs.git +[submodule "vendors/squire2"] + path = vendors/squire2 + url = git@github.com:the-djmaze/Squire.git + branch = snappymail diff --git a/tasks/config.js b/tasks/config.js index b407e6457..02aa050a6 100644 --- a/tasks/config.js +++ b/tasks/config.js @@ -63,7 +63,7 @@ config.paths.js = { 'vendors/bootstrap/js/bootstrap.native.js', 'vendors/knockout/build/output/knockout-latest.js', // 'vendors/knockout/build/output/knockout-latest.debug.js', - 'vendors/squire/build/squire-raw.js', + 'vendors/squire2/dist/squire-raw.js', 'vendors/mathiasbynens/punycode.js', 'vendors/turndown/turndown.js', 'dev/External/SquireUI.js' diff --git a/vendors/squire/LICENSE b/vendors/squire/LICENSE deleted file mode 100644 index 06cfb7473..000000000 --- a/vendors/squire/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright © 2011–2014 by Neil Jenkins - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/vendors/squire/README.md b/vendors/squire/README.md deleted file mode 100644 index 437cff617..000000000 --- a/vendors/squire/README.md +++ /dev/null @@ -1,501 +0,0 @@ -Squire -====== - -Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation in a flexible lightweight package (only 16.5KB of JS after minification and gzip, with no dependencies!). - -It was designed to handle email composition for the [Fastmail](https://www.fastmail.com) web app. The most important consequence of this (and where Squire differs from most other modern rich text editors) is that it must handle arbitrary HTML, because it may be used to forward or quote emails from third-parties and must be able to preserve their HTML without breaking the formatting. This means that it can't use a more structured (but limited) internal data model (as most other modern HTML editors do) and the HTML remains the source-of-truth. The other consequence is excellent handling of multiple levels of blockquotes. - -Squire was designed to be integrated with your own UI framework, and so does not provide its own UI toolbar, widgets or overlays. Instead, you get a component you can insert in place of a `