Refactored JS folder.
Removed useless files
This commit is contained in:
@@ -81,7 +81,7 @@ namespace Wino.Services
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(_editorBundlePath))
|
if (string.IsNullOrEmpty(_editorBundlePath))
|
||||||
{
|
{
|
||||||
var editorFileFromBundle = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///JS/Quill/full.html"))
|
var editorFileFromBundle = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///JS/Quill/editor.html"))
|
||||||
.AsTask()
|
.AsTask()
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
|||||||
@@ -298,10 +298,10 @@ namespace Wino.Dialogs
|
|||||||
|
|
||||||
private async void ChromiumInitialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args)
|
private async void ChromiumInitialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args)
|
||||||
{
|
{
|
||||||
var editorBundlePath = (await _nativeAppService.GetQuillEditorBundlePathAsync()).Replace("full.html", string.Empty);
|
var editorBundlePath = (await _nativeAppService.GetQuillEditorBundlePathAsync()).Replace("editor.html", string.Empty);
|
||||||
|
|
||||||
Chromium.CoreWebView2.SetVirtualHostNameToFolderMapping("app.example", editorBundlePath, CoreWebView2HostResourceAccessKind.Allow);
|
Chromium.CoreWebView2.SetVirtualHostNameToFolderMapping("app.editor", editorBundlePath, CoreWebView2HostResourceAccessKind.Allow);
|
||||||
Chromium.Source = new Uri("https://app.example/full.html");
|
Chromium.Source = new Uri("https://app.editor/editor.html");
|
||||||
|
|
||||||
Chromium.CoreWebView2.DOMContentLoaded -= DOMLoaded;
|
Chromium.CoreWebView2.DOMContentLoaded -= DOMLoaded;
|
||||||
Chromium.CoreWebView2.DOMContentLoaded += DOMLoaded;
|
Chromium.CoreWebView2.DOMContentLoaded += DOMLoaded;
|
||||||
|
|||||||
@@ -1,278 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="language" content="english">
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://app.example/katex.min.css" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://app.example/monokai-sublime.min.css" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://app.example/quill.snow.css" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body >
|
|
||||||
/* #standalone-container {
|
|
||||||
margin: 50px auto;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
} */
|
|
||||||
|
|
||||||
#editor-container {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wino-original-message-container {
|
|
||||||
border: solid #636e72;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="white">
|
|
||||||
<div id="standalone-container">
|
|
||||||
<!-- remove display none to enable toolbar -->
|
|
||||||
<div id="toolbar-container" style="display: none;">
|
|
||||||
<span class="ql-formats">
|
|
||||||
<!-- <button id="ql-font-monospace" class="ql-font" value="monospace" />
|
|
||||||
<button id="ql-font-serif" class="ql-font" value="serif" />
|
|
||||||
<button id="ql-font-sans-serif" class="ql-font" /> -->
|
|
||||||
<select class="ql-font"></select>
|
|
||||||
<select class="ql-size"></select>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button id="boldButton" class="ql-bold"></button>
|
|
||||||
<button id="italicButton" class="ql-italic"></button>
|
|
||||||
<button id="underlineButton" class="ql-underline"></button>
|
|
||||||
<button id="strikeButton" class="ql-strike"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<select class="ql-color"></select>
|
|
||||||
<select class="ql-background"></select>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-script" value="sub"></button>
|
|
||||||
<button class="ql-script" value="super"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-header" value="1"></button>
|
|
||||||
<button class="ql-header" value="2"></button>
|
|
||||||
<button class="ql-blockquote"></button>
|
|
||||||
<button class="ql-code-block"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button id="orderedListButton" class="ql-list" value="ordered"></button>
|
|
||||||
<button id="bulletListButton" class="ql-list" value="bullet"></button>
|
|
||||||
<button id="decreaseIndentButton" class="ql-indent" value="-1"></button>
|
|
||||||
<button id="increaseIndentButton" class="ql-indent" value="+1"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button id="directionButton" class="ql-direction" value="rtl"></button>
|
|
||||||
<button id="ql-align-left" class="ql-align" value=""></button>
|
|
||||||
<button id="ql-align-center" class="ql-align" value="center"></button>
|
|
||||||
<button id="ql-align-right" class="ql-align" value="right"></button>
|
|
||||||
<button id="ql-align-justify" class="ql-align" value="justify"></button>
|
|
||||||
<!--<select id="alignmentButton" class="ql-align"></select>-->
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-link"></button>
|
|
||||||
<button id=addImageButton class="ql-image"></button>
|
|
||||||
<button class="ql-video"></button>
|
|
||||||
<button class="ql-formula"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-clean"></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="editor-container" style="background-color: white;">
|
|
||||||
<br><br>Sent from <a href="https://github.com/bkaankose/Wino-Mail/">Wino Mail</a> for Windows
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div id="mail-container-parent" hidden="true" style="border: solid #636e72; padding: 10px; margin-top: 5px; margin-right: 16px; margin-bottom: 5px; margin-left: 5px;">
|
|
||||||
<center>
|
|
||||||
Original message<br>
|
|
||||||
</center>
|
|
||||||
|
|
||||||
<div id="mail-container" style="margin-top: 5px;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<script src="https://app.example/katex.min.js"></script>
|
|
||||||
|
|
||||||
<script src="https://app.example/highlight.min.js"></script>
|
|
||||||
|
|
||||||
<!-- <script src="../quill.min.js"></script>
|
|
||||||
<script src="../image-resize.min.js"></script> -->
|
|
||||||
|
|
||||||
<script src="https://app.example/quill.min.js"></script>
|
|
||||||
<script src="https://app.example/image-resize.min.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// configure Quill to use inline styles so the email's format properly
|
|
||||||
var resizer = Quill.import('modules/imageResize');
|
|
||||||
Quill.register(resizer, true);
|
|
||||||
|
|
||||||
var DirectionAttribute = Quill.import('attributors/attribute/direction');
|
|
||||||
Quill.register(DirectionAttribute, true);
|
|
||||||
|
|
||||||
var AlignClass = Quill.import('attributors/class/align');
|
|
||||||
Quill.register(AlignClass, true);
|
|
||||||
|
|
||||||
var BackgroundClass = Quill.import('attributors/class/background');
|
|
||||||
Quill.register(BackgroundClass, true);
|
|
||||||
|
|
||||||
var ColorClass = Quill.import('attributors/class/color');
|
|
||||||
Quill.register(ColorClass, true);
|
|
||||||
|
|
||||||
var DirectionClass = Quill.import('attributors/class/direction');
|
|
||||||
Quill.register(DirectionClass, true);
|
|
||||||
|
|
||||||
var FontClass = Quill.import('attributors/class/font');
|
|
||||||
Quill.register(FontClass, true);
|
|
||||||
|
|
||||||
var SizeClass = Quill.import('attributors/class/size');
|
|
||||||
Quill.register(SizeClass, true);
|
|
||||||
|
|
||||||
var AlignStyle = Quill.import('attributors/style/align');
|
|
||||||
Quill.register(AlignStyle, true);
|
|
||||||
|
|
||||||
var BackgroundStyle = Quill.import('attributors/style/background');
|
|
||||||
Quill.register(BackgroundStyle, true);
|
|
||||||
|
|
||||||
var ColorStyle = Quill.import('attributors/style/color');
|
|
||||||
Quill.register(ColorStyle, true);
|
|
||||||
|
|
||||||
var DirectionStyle = Quill.import('attributors/style/direction');
|
|
||||||
Quill.register(DirectionStyle, true);
|
|
||||||
|
|
||||||
var FontStyle = Quill.import('attributors/style/font');
|
|
||||||
Quill.register(FontStyle, true);
|
|
||||||
|
|
||||||
var SizeStyle = Quill.import('attributors/style/size');
|
|
||||||
Quill.register(SizeStyle, true);
|
|
||||||
|
|
||||||
var quill = new Quill('#editor-container', {
|
|
||||||
modules: {
|
|
||||||
toolbar: '#toolbar-container',
|
|
||||||
imageResize: {}
|
|
||||||
},
|
|
||||||
placeholder: '',
|
|
||||||
theme: 'snow'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var boldButton = document.getElementById('boldButton');
|
|
||||||
var italicButton = document.getElementById('italicButton');
|
|
||||||
var underlineButton = document.getElementById('underlineButton');
|
|
||||||
var strikeButton = document.getElementById('strikeButton');
|
|
||||||
|
|
||||||
var orderedListButton = document.getElementById('orderedListButton');
|
|
||||||
var bulletListButton = document.getElementById('bulletListButton');
|
|
||||||
|
|
||||||
var directionButton = document.getElementById('directionButton');
|
|
||||||
|
|
||||||
var alignLeftButton = document.getElementById('ql-align-left');
|
|
||||||
var alignCenterButton = document.getElementById('ql-align-center');
|
|
||||||
var alignRightButton = document.getElementById('ql-align-right');
|
|
||||||
var alignJustifyButton = document.getElementById('ql-align-justify');
|
|
||||||
|
|
||||||
// The mutation observer
|
|
||||||
var boldObserver = new MutationObserver(function() { classChanged(boldButton); });
|
|
||||||
boldObserver.observe(boldButton, { attributes: true, attributeFilter: ["class"]});
|
|
||||||
|
|
||||||
var italicObserver = new MutationObserver(function() { classChanged(italicButton); });
|
|
||||||
italicObserver.observe(italicButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var underlineObserver = new MutationObserver(function () { classChanged(underlineButton); });
|
|
||||||
underlineObserver.observe(underlineButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var strikeObserver = new MutationObserver(function () { classChanged(strikeButton); });
|
|
||||||
strikeObserver.observe(strikeButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var orderedListObserver = new MutationObserver(function () { classAndValueChanged(orderedListButton); });
|
|
||||||
orderedListObserver.observe(orderedListButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var bulletListObserver = new MutationObserver(function () { classAndValueChanged(bulletListButton); });
|
|
||||||
bulletListObserver.observe(bulletListButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var directionObserver = new MutationObserver(function () { classChanged(directionButton); });
|
|
||||||
directionObserver.observe(directionButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserver = new MutationObserver(function () { alignmentDataValueChanged(alignLeftButton); });
|
|
||||||
alignmentObserver.observe(alignLeftButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserverCenter = new MutationObserver(function () { alignmentDataValueChanged(alignCenterButton); });
|
|
||||||
alignmentObserverCenter.observe(alignCenterButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserverRight = new MutationObserver(function () { alignmentDataValueChanged(alignRightButton); });
|
|
||||||
alignmentObserverRight.observe(alignRightButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserverJustify = new MutationObserver(function () { alignmentDataValueChanged(alignJustifyButton); });
|
|
||||||
alignmentObserverJustify.observe(alignJustifyButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
function classChanged(button) {
|
|
||||||
window.external.notify(`${button.className}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function classAndValueChanged(button) {
|
|
||||||
window.external.notify(`${button.id} ${button.className}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function alignmentDataValueChanged(button) {
|
|
||||||
if (button.className.endsWith('ql-active'))
|
|
||||||
window.external.notify(`${button.id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function RenderHTML(htmlString) {
|
|
||||||
quill.root.innerHTML = htmlString;
|
|
||||||
// quill.clipboard.dangerouslyPasteHTML(htmlString);
|
|
||||||
// const delta = quill.clipboard.convert(htmlString)
|
|
||||||
|
|
||||||
// quill.setContents(delta, 'silent')
|
|
||||||
|
|
||||||
// document.getElementById('mail-container-parent').hidden = false;
|
|
||||||
// document.getElementById('editor-container').innerHTML = htmlString;
|
|
||||||
}
|
|
||||||
|
|
||||||
// function ShowToolbar() {
|
|
||||||
// document.getElementById('editor-container').style.display = 'block';
|
|
||||||
// quill.focus();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function HideToolbar() {
|
|
||||||
// document.getElementById('editor-container').style.display = 'none';
|
|
||||||
// }
|
|
||||||
|
|
||||||
function getSelectedText() {
|
|
||||||
var range = quill.getSelection();
|
|
||||||
if (range)
|
|
||||||
{
|
|
||||||
if (range.length == 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return quill.getText(range.index, range.length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function addHyperlink(url)
|
|
||||||
{
|
|
||||||
var range = quill.getSelection();
|
|
||||||
|
|
||||||
if (range)
|
|
||||||
{
|
|
||||||
quill.formatText(range.index, range.length, 'link', url);
|
|
||||||
quill.setSelection(0,0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
76
Wino.Mail/JS/Quill/editor.html
Normal file
76
Wino.Mail/JS/Quill/editor.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="language" content="english">
|
||||||
|
<script src="./libs/quill.js"></script>
|
||||||
|
<script src="./libs/darkreader.js"></script>
|
||||||
|
<link rel="stylesheet" href="./libs/quill.snow.css" />
|
||||||
|
<link rel="stylesheet" href="./global.css" />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#editor {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
|
<!-- Hidden toolbar. It used to provide events to the host -->
|
||||||
|
<div id="toolbar-container" style="display: none;">
|
||||||
|
<span class="ql-formats">
|
||||||
|
<select class="ql-font"></select>
|
||||||
|
<select class="ql-size"></select>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button id="boldButton" class="ql-bold"></button>
|
||||||
|
<button id="italicButton" class="ql-italic"></button>
|
||||||
|
<button id="underlineButton" class="ql-underline"></button>
|
||||||
|
<button id="strikeButton" class="ql-strike"></button>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<select class="ql-color"></select>
|
||||||
|
<select class="ql-background"></select>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button class="ql-script" value="sub"></button>
|
||||||
|
<button class="ql-script" value="super"></button>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button class="ql-header" value="1"></button>
|
||||||
|
<button class="ql-header" value="2"></button>
|
||||||
|
<button class="ql-blockquote"></button>
|
||||||
|
<button class="ql-code-block"></button>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button id="orderedListButton" class="ql-list" value="ordered"></button>
|
||||||
|
<button id="bulletListButton" class="ql-list" value="bullet"></button>
|
||||||
|
<button id="decreaseIndentButton" class="ql-indent" value="-1"></button>
|
||||||
|
<button id="increaseIndentButton" class="ql-indent" value="+1"></button>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button id="directionButton" class="ql-direction" value="rtl"></button>
|
||||||
|
<button id="ql-align-left" class="ql-align" value=""></button>
|
||||||
|
<button id="ql-align-center" class="ql-align" value="center"></button>
|
||||||
|
<button id="ql-align-right" class="ql-align" value="right"></button>
|
||||||
|
<button id="ql-align-justify" class="ql-align" value="justify"></button>
|
||||||
|
<!--<select id="alignmentButton" class="ql-align"></select>-->
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button class="ql-link"></button>
|
||||||
|
<button id=addImageButton class="ql-image"></button>
|
||||||
|
<button class="ql-video"></button>
|
||||||
|
<button class="ql-formula"></button>
|
||||||
|
</span>
|
||||||
|
<span class="ql-formats">
|
||||||
|
<button class="ql-clean"></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="editor"></div>
|
||||||
|
<script src="/editor.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
112
Wino.Mail/JS/Quill/editor.js
Normal file
112
Wino.Mail/JS/Quill/editor.js
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
const quill = new Quill('#editor', {
|
||||||
|
modules: {
|
||||||
|
toolbar: '#toolbar-container'
|
||||||
|
},
|
||||||
|
placeholder: '',
|
||||||
|
theme: 'snow'
|
||||||
|
});
|
||||||
|
|
||||||
|
var boldButton = document.getElementById('boldButton');
|
||||||
|
var italicButton = document.getElementById('italicButton');
|
||||||
|
var underlineButton = document.getElementById('underlineButton');
|
||||||
|
var strikeButton = document.getElementById('strikeButton');
|
||||||
|
|
||||||
|
var orderedListButton = document.getElementById('orderedListButton');
|
||||||
|
var bulletListButton = document.getElementById('bulletListButton');
|
||||||
|
|
||||||
|
var directionButton = document.getElementById('directionButton');
|
||||||
|
|
||||||
|
var alignLeftButton = document.getElementById('ql-align-left');
|
||||||
|
var alignCenterButton = document.getElementById('ql-align-center');
|
||||||
|
var alignRightButton = document.getElementById('ql-align-right');
|
||||||
|
var alignJustifyButton = document.getElementById('ql-align-justify');
|
||||||
|
|
||||||
|
// The mutation observer
|
||||||
|
var boldObserver = new MutationObserver(function () { classChanged(boldButton); });
|
||||||
|
boldObserver.observe(boldButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var italicObserver = new MutationObserver(function () { classChanged(italicButton); });
|
||||||
|
italicObserver.observe(italicButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var underlineObserver = new MutationObserver(function () { classChanged(underlineButton); });
|
||||||
|
underlineObserver.observe(underlineButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var strikeObserver = new MutationObserver(function () { classChanged(strikeButton); });
|
||||||
|
strikeObserver.observe(strikeButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var orderedListObserver = new MutationObserver(function () { classAndValueChanged(orderedListButton); });
|
||||||
|
orderedListObserver.observe(orderedListButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var bulletListObserver = new MutationObserver(function () { classAndValueChanged(bulletListButton); });
|
||||||
|
bulletListObserver.observe(bulletListButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var directionObserver = new MutationObserver(function () { classChanged(directionButton); });
|
||||||
|
directionObserver.observe(directionButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var alignmentObserver = new MutationObserver(function () { alignmentDataValueChanged(alignLeftButton); });
|
||||||
|
alignmentObserver.observe(alignLeftButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var alignmentObserverCenter = new MutationObserver(function () { alignmentDataValueChanged(alignCenterButton); });
|
||||||
|
alignmentObserverCenter.observe(alignCenterButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var alignmentObserverRight = new MutationObserver(function () { alignmentDataValueChanged(alignRightButton); });
|
||||||
|
alignmentObserverRight.observe(alignRightButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
var alignmentObserverJustify = new MutationObserver(function () { alignmentDataValueChanged(alignJustifyButton); });
|
||||||
|
alignmentObserverJustify.observe(alignJustifyButton, { attributes: true, attributeFilter: ["class"] });
|
||||||
|
|
||||||
|
function classChanged(button) {
|
||||||
|
window.chrome.webview.postMessage(`${button.className}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function classAndValueChanged(button) {
|
||||||
|
window.chrome.webview.postMessage(`${button.id} ${button.className}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function alignmentDataValueChanged(button) {
|
||||||
|
if (button.className.endsWith('ql-active'))
|
||||||
|
window.chrome.webview.postMessage(`${button.id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function RenderHTML(htmlString) {
|
||||||
|
const delta = quill.clipboard.convert({html: htmlString})
|
||||||
|
|
||||||
|
quill.setContents(delta, 'silent');
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetHTMLContent() {
|
||||||
|
return quill.root.innerHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetTextContent() {
|
||||||
|
return quill.getText();
|
||||||
|
}
|
||||||
|
|
||||||
|
function SetLightEditor() {
|
||||||
|
DarkReader.disable();
|
||||||
|
}
|
||||||
|
|
||||||
|
function SetDarkEditor() {
|
||||||
|
DarkReader.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSelectedText() {
|
||||||
|
var range = quill.getSelection();
|
||||||
|
if (range) {
|
||||||
|
if (range.length == 0) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return quill.getText(range.index, range.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addHyperlink(url) {
|
||||||
|
var range = quill.getSelection();
|
||||||
|
|
||||||
|
if (range) {
|
||||||
|
quill.formatText(range.index, range.length, 'link', url);
|
||||||
|
quill.setSelection(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,284 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="language" content="english">
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<link rel="stylesheet" href="https://app.example/katex.min.css" />
|
|
||||||
<link rel="stylesheet" href="https://app.example/monokai-sublime.min.css" />
|
|
||||||
<link rel="stylesheet" href="https://app.example/quill.snow.css" />
|
|
||||||
<link rel="stylesheet" href="https://app.example/global.css" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body >
|
|
||||||
/* #standalone-container {
|
|
||||||
margin: 50px auto;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
} */
|
|
||||||
#editor-container {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wino-original-message-container {
|
|
||||||
border: solid #636e72;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<meta name="color-scheme" content="dark light">
|
|
||||||
<div id="standalone-container">
|
|
||||||
<!-- remove display none to enable toolbar -->
|
|
||||||
<div id="toolbar-container" style="display: none;">
|
|
||||||
<span class="ql-formats">
|
|
||||||
<!-- <button id="ql-font-monospace" class="ql-font" value="monospace" />
|
|
||||||
<button id="ql-font-serif" class="ql-font" value="serif" />
|
|
||||||
<button id="ql-font-sans-serif" class="ql-font" /> -->
|
|
||||||
<select class="ql-font"></select>
|
|
||||||
<select class="ql-size"></select>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button id="boldButton" class="ql-bold"></button>
|
|
||||||
<button id="italicButton" class="ql-italic"></button>
|
|
||||||
<button id="underlineButton" class="ql-underline"></button>
|
|
||||||
<button id="strikeButton" class="ql-strike"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<select class="ql-color"></select>
|
|
||||||
<select class="ql-background"></select>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-script" value="sub"></button>
|
|
||||||
<button class="ql-script" value="super"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-header" value="1"></button>
|
|
||||||
<button class="ql-header" value="2"></button>
|
|
||||||
<button class="ql-blockquote"></button>
|
|
||||||
<button class="ql-code-block"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button id="orderedListButton" class="ql-list" value="ordered"></button>
|
|
||||||
<button id="bulletListButton" class="ql-list" value="bullet"></button>
|
|
||||||
<button id="decreaseIndentButton" class="ql-indent" value="-1"></button>
|
|
||||||
<button id="increaseIndentButton" class="ql-indent" value="+1"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button id="directionButton" class="ql-direction" value="rtl"></button>
|
|
||||||
<button id="ql-align-left" class="ql-align" value=""></button>
|
|
||||||
<button id="ql-align-center" class="ql-align" value="center"></button>
|
|
||||||
<button id="ql-align-right" class="ql-align" value="right"></button>
|
|
||||||
<button id="ql-align-justify" class="ql-align" value="justify"></button>
|
|
||||||
<!--<select id="alignmentButton" class="ql-align"></select>-->
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-link"></button>
|
|
||||||
<button id=addImageButton class="ql-image"></button>
|
|
||||||
<button class="ql-video"></button>
|
|
||||||
<button class="ql-formula"></button>
|
|
||||||
</span>
|
|
||||||
<span class="ql-formats">
|
|
||||||
<button class="ql-clean"></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--style="background-color: white;"-->
|
|
||||||
<div id="editor-container">
|
|
||||||
<!--<br><br>Sent from <a href="https://github.com/bkaankose/Wino-Mail/">Wino Mail</a> for Windows-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div id="mail-container-parent" hidden="true" style="border: solid #636e72; padding: 10px; margin-top: 5px; margin-right: 16px; margin-bottom: 5px; margin-left: 5px;">
|
|
||||||
<center>
|
|
||||||
Original message<br>
|
|
||||||
</center>
|
|
||||||
|
|
||||||
<div id="mail-container" style="margin-top: 5px;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<script src="https://app.example/katex.min.js"></script>
|
|
||||||
|
|
||||||
<script src="https://app.example/highlight.min.js"></script>
|
|
||||||
|
|
||||||
<!-- <script src="../quill.min.js"></script>
|
|
||||||
<script src="../image-resize.min.js"></script> -->
|
|
||||||
|
|
||||||
<script src="https://app.example/quill.min.js"></script>
|
|
||||||
<script src="https://app.example/image-resize.min.js"></script>
|
|
||||||
<script src="https://app.example/darkreader.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// configure Quill to use inline styles so the email's format properly
|
|
||||||
var resizer = Quill.import('modules/imageResize');
|
|
||||||
Quill.register(resizer, true);
|
|
||||||
|
|
||||||
var DirectionAttribute = Quill.import('attributors/attribute/direction');
|
|
||||||
Quill.register(DirectionAttribute, true);
|
|
||||||
|
|
||||||
var AlignClass = Quill.import('attributors/class/align');
|
|
||||||
Quill.register(AlignClass, true);
|
|
||||||
|
|
||||||
var BackgroundClass = Quill.import('attributors/class/background');
|
|
||||||
Quill.register(BackgroundClass, true);
|
|
||||||
|
|
||||||
var ColorClass = Quill.import('attributors/class/color');
|
|
||||||
Quill.register(ColorClass, true);
|
|
||||||
|
|
||||||
var DirectionClass = Quill.import('attributors/class/direction');
|
|
||||||
Quill.register(DirectionClass, true);
|
|
||||||
|
|
||||||
var FontClass = Quill.import('attributors/class/font');
|
|
||||||
Quill.register(FontClass, true);
|
|
||||||
|
|
||||||
var SizeClass = Quill.import('attributors/class/size');
|
|
||||||
Quill.register(SizeClass, true);
|
|
||||||
|
|
||||||
var AlignStyle = Quill.import('attributors/style/align');
|
|
||||||
Quill.register(AlignStyle, true);
|
|
||||||
|
|
||||||
var BackgroundStyle = Quill.import('attributors/style/background');
|
|
||||||
Quill.register(BackgroundStyle, true);
|
|
||||||
|
|
||||||
var ColorStyle = Quill.import('attributors/style/color');
|
|
||||||
Quill.register(ColorStyle, true);
|
|
||||||
|
|
||||||
var DirectionStyle = Quill.import('attributors/style/direction');
|
|
||||||
Quill.register(DirectionStyle, true);
|
|
||||||
|
|
||||||
var FontStyle = Quill.import('attributors/style/font');
|
|
||||||
Quill.register(FontStyle, true);
|
|
||||||
|
|
||||||
var SizeStyle = Quill.import('attributors/style/size');
|
|
||||||
Quill.register(SizeStyle, true);
|
|
||||||
|
|
||||||
var quill = new Quill('#editor-container', {
|
|
||||||
modules: {
|
|
||||||
toolbar: '#toolbar-container',
|
|
||||||
imageResize: {}
|
|
||||||
},
|
|
||||||
placeholder: '',
|
|
||||||
theme: 'snow'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var boldButton = document.getElementById('boldButton');
|
|
||||||
var italicButton = document.getElementById('italicButton');
|
|
||||||
var underlineButton = document.getElementById('underlineButton');
|
|
||||||
var strikeButton = document.getElementById('strikeButton');
|
|
||||||
|
|
||||||
var orderedListButton = document.getElementById('orderedListButton');
|
|
||||||
var bulletListButton = document.getElementById('bulletListButton');
|
|
||||||
|
|
||||||
var directionButton = document.getElementById('directionButton');
|
|
||||||
|
|
||||||
var alignLeftButton = document.getElementById('ql-align-left');
|
|
||||||
var alignCenterButton = document.getElementById('ql-align-center');
|
|
||||||
var alignRightButton = document.getElementById('ql-align-right');
|
|
||||||
var alignJustifyButton = document.getElementById('ql-align-justify');
|
|
||||||
|
|
||||||
// The mutation observer
|
|
||||||
var boldObserver = new MutationObserver(function () { classChanged(boldButton); });
|
|
||||||
boldObserver.observe(boldButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var italicObserver = new MutationObserver(function () { classChanged(italicButton); });
|
|
||||||
italicObserver.observe(italicButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var underlineObserver = new MutationObserver(function () { classChanged(underlineButton); });
|
|
||||||
underlineObserver.observe(underlineButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var strikeObserver = new MutationObserver(function () { classChanged(strikeButton); });
|
|
||||||
strikeObserver.observe(strikeButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var orderedListObserver = new MutationObserver(function () { classAndValueChanged(orderedListButton); });
|
|
||||||
orderedListObserver.observe(orderedListButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var bulletListObserver = new MutationObserver(function () { classAndValueChanged(bulletListButton); });
|
|
||||||
bulletListObserver.observe(bulletListButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var directionObserver = new MutationObserver(function () { classChanged(directionButton); });
|
|
||||||
directionObserver.observe(directionButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserver = new MutationObserver(function () { alignmentDataValueChanged(alignLeftButton); });
|
|
||||||
alignmentObserver.observe(alignLeftButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserverCenter = new MutationObserver(function () { alignmentDataValueChanged(alignCenterButton); });
|
|
||||||
alignmentObserverCenter.observe(alignCenterButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserverRight = new MutationObserver(function () { alignmentDataValueChanged(alignRightButton); });
|
|
||||||
alignmentObserverRight.observe(alignRightButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
var alignmentObserverJustify = new MutationObserver(function () { alignmentDataValueChanged(alignJustifyButton); });
|
|
||||||
alignmentObserverJustify.observe(alignJustifyButton, { attributes: true, attributeFilter: ["class"] });
|
|
||||||
|
|
||||||
function classChanged(button) {
|
|
||||||
window.chrome.webview.postMessage(`${button.className}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function classAndValueChanged(button) {
|
|
||||||
window.chrome.webview.postMessage(`${button.id} ${button.className}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function alignmentDataValueChanged(button) {
|
|
||||||
if (button.className.endsWith('ql-active'))
|
|
||||||
window.chrome.webview.postMessage(`${button.id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function RenderHTML(htmlString) {
|
|
||||||
const delta = quill.clipboard.convert(htmlString)
|
|
||||||
|
|
||||||
quill.setContents(delta, 'silent')
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetHTMLContent() {
|
|
||||||
return quill.root.innerHTML;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetTextContent() {
|
|
||||||
return quill.getText();
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetLightEditor(){
|
|
||||||
DarkReader.disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetDarkEditor(){
|
|
||||||
DarkReader.enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
// function ShowToolbar() {
|
|
||||||
// document.getElementById('editor-container').style.display = 'block';
|
|
||||||
// quill.focus();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// function HideToolbar() {
|
|
||||||
// document.getElementById('editor-container').style.display = 'none';
|
|
||||||
// }
|
|
||||||
|
|
||||||
function getSelectedText() {
|
|
||||||
var range = quill.getSelection();
|
|
||||||
if (range) {
|
|
||||||
if (range.length == 0) {
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return quill.getText(range.index, range.length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function addHyperlink(url) {
|
|
||||||
var range = quill.getSelection();
|
|
||||||
|
|
||||||
if (range) {
|
|
||||||
quill.formatText(range.index, range.length, 'link', url);
|
|
||||||
quill.setSelection(0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
3
Wino.Mail/JS/Quill/highlight.min.js
vendored
3
Wino.Mail/JS/Quill/highlight.min.js
vendored
File diff suppressed because one or more lines are too long
1
Wino.Mail/JS/Quill/image-resize.min.js
vendored
1
Wino.Mail/JS/Quill/image-resize.min.js
vendored
File diff suppressed because one or more lines are too long
1
Wino.Mail/JS/Quill/katex.min.css
vendored
1
Wino.Mail/JS/Quill/katex.min.css
vendored
File diff suppressed because one or more lines are too long
4
Wino.Mail/JS/Quill/katex.min.js
vendored
4
Wino.Mail/JS/Quill/katex.min.js
vendored
File diff suppressed because one or more lines are too long
3
Wino.Mail/JS/Quill/libs/quill.js
Normal file
3
Wino.Mail/JS/Quill/libs/quill.js
Normal file
File diff suppressed because one or more lines are too long
1
Wino.Mail/JS/Quill/monokai-sublime.min.css
vendored
1
Wino.Mail/JS/Quill/monokai-sublime.min.css
vendored
@@ -1 +0,0 @@
|
|||||||
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#23241f}.hljs,.hljs-tag,.hljs-subst{color:#f8f8f2}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-number,.hljs-regexp,.hljs-literal,.hljs-link{color:#ae81ff}.hljs-code,.hljs-title,.hljs-section,.hljs-selector-class{color:#a6e22e}.hljs-strong{font-weight:bold}.hljs-emphasis{font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-attr{color:#f92672}.hljs-symbol,.hljs-attribute{color:#66d9ef}.hljs-params,.hljs-class .hljs-title{color:#f8f8f2}.hljs-string,.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-addition,.hljs-variable,.hljs-template-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}
|
|
||||||
@@ -1,397 +0,0 @@
|
|||||||
/*!
|
|
||||||
* Quill Editor v1.3.6
|
|
||||||
* https://quilljs.com/
|
|
||||||
* Copyright (c) 2014, Jason Chen
|
|
||||||
* Copyright (c) 2013, salesforce.com
|
|
||||||
*/
|
|
||||||
.ql-container {
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.ql-container.ql-disabled .ql-tooltip {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.ql-clipboard {
|
|
||||||
left: -100000px;
|
|
||||||
height: 1px;
|
|
||||||
overflow-y: hidden;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
.ql-clipboard p {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.ql-editor {
|
|
||||||
box-sizing: border-box;
|
|
||||||
line-height: 1.42;
|
|
||||||
height: 100%;
|
|
||||||
outline: none;
|
|
||||||
overflow-y: auto;
|
|
||||||
padding: 12px 15px;
|
|
||||||
tab-size: 4;
|
|
||||||
-moz-tab-size: 4;
|
|
||||||
text-align: left;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
.ql-editor > * {
|
|
||||||
cursor: text;
|
|
||||||
}
|
|
||||||
.ql-editor p,
|
|
||||||
.ql-editor ol,
|
|
||||||
.ql-editor ul,
|
|
||||||
.ql-editor pre,
|
|
||||||
.ql-editor blockquote,
|
|
||||||
.ql-editor h1,
|
|
||||||
.ql-editor h2,
|
|
||||||
.ql-editor h3,
|
|
||||||
.ql-editor h4,
|
|
||||||
.ql-editor h5,
|
|
||||||
.ql-editor h6 {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol,
|
|
||||||
.ql-editor ul {
|
|
||||||
padding-left: 1.5em;
|
|
||||||
}
|
|
||||||
.ql-editor ol > li,
|
|
||||||
.ql-editor ul > li {
|
|
||||||
list-style-type: none;
|
|
||||||
}
|
|
||||||
.ql-editor ul > li::before {
|
|
||||||
content: '\2022';
|
|
||||||
}
|
|
||||||
.ql-editor ul[data-checked=true],
|
|
||||||
.ql-editor ul[data-checked=false] {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.ql-editor ul[data-checked=true] > li *,
|
|
||||||
.ql-editor ul[data-checked=false] > li * {
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
.ql-editor ul[data-checked=true] > li::before,
|
|
||||||
.ql-editor ul[data-checked=false] > li::before {
|
|
||||||
color: #777;
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
.ql-editor ul[data-checked=true] > li::before {
|
|
||||||
content: '\2611';
|
|
||||||
}
|
|
||||||
.ql-editor ul[data-checked=false] > li::before {
|
|
||||||
content: '\2610';
|
|
||||||
}
|
|
||||||
.ql-editor li::before {
|
|
||||||
display: inline-block;
|
|
||||||
white-space: nowrap;
|
|
||||||
width: 1.2em;
|
|
||||||
}
|
|
||||||
.ql-editor li:not(.ql-direction-rtl)::before {
|
|
||||||
margin-left: -1.5em;
|
|
||||||
margin-right: 0.3em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-direction-rtl::before {
|
|
||||||
margin-left: 0.3em;
|
|
||||||
margin-right: -1.5em;
|
|
||||||
}
|
|
||||||
.ql-editor ol li:not(.ql-direction-rtl),
|
|
||||||
.ql-editor ul li:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 1.5em;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-direction-rtl,
|
|
||||||
.ql-editor ul li.ql-direction-rtl {
|
|
||||||
padding-right: 1.5em;
|
|
||||||
}
|
|
||||||
.ql-editor ol li {
|
|
||||||
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
|
|
||||||
counter-increment: list-0;
|
|
||||||
}
|
|
||||||
.ql-editor ol li:before {
|
|
||||||
content: counter(list-0, decimal) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-1 {
|
|
||||||
counter-increment: list-1;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-1:before {
|
|
||||||
content: counter(list-1, lower-alpha) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-1 {
|
|
||||||
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-2 {
|
|
||||||
counter-increment: list-2;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-2:before {
|
|
||||||
content: counter(list-2, lower-roman) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-2 {
|
|
||||||
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-3 {
|
|
||||||
counter-increment: list-3;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-3:before {
|
|
||||||
content: counter(list-3, decimal) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-3 {
|
|
||||||
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-4 {
|
|
||||||
counter-increment: list-4;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-4:before {
|
|
||||||
content: counter(list-4, lower-alpha) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-4 {
|
|
||||||
counter-reset: list-5 list-6 list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-5 {
|
|
||||||
counter-increment: list-5;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-5:before {
|
|
||||||
content: counter(list-5, lower-roman) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-5 {
|
|
||||||
counter-reset: list-6 list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-6 {
|
|
||||||
counter-increment: list-6;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-6:before {
|
|
||||||
content: counter(list-6, decimal) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-6 {
|
|
||||||
counter-reset: list-7 list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-7 {
|
|
||||||
counter-increment: list-7;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-7:before {
|
|
||||||
content: counter(list-7, lower-alpha) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-7 {
|
|
||||||
counter-reset: list-8 list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-8 {
|
|
||||||
counter-increment: list-8;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-8:before {
|
|
||||||
content: counter(list-8, lower-roman) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-8 {
|
|
||||||
counter-reset: list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-9 {
|
|
||||||
counter-increment: list-9;
|
|
||||||
}
|
|
||||||
.ql-editor ol li.ql-indent-9:before {
|
|
||||||
content: counter(list-9, decimal) '. ';
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 3em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 4.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 3em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 4.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 6em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 7.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 6em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 7.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 9em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 10.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 9em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 10.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 12em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 13.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 12em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 13.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 15em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 16.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 15em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 16.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 18em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 19.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 18em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 19.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 21em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 22.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 21em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 22.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 24em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 25.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 24em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 25.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 27em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
|
|
||||||
padding-left: 28.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 27em;
|
|
||||||
}
|
|
||||||
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
|
|
||||||
padding-right: 28.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-video {
|
|
||||||
display: block;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-video.ql-align-center {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-video.ql-align-right {
|
|
||||||
margin: 0 0 0 auto;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-black {
|
|
||||||
background-color: #000;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-red {
|
|
||||||
background-color: #e60000;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-orange {
|
|
||||||
background-color: #f90;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-yellow {
|
|
||||||
background-color: #ff0;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-green {
|
|
||||||
background-color: #008a00;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-blue {
|
|
||||||
background-color: #06c;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-bg-purple {
|
|
||||||
background-color: #93f;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-white {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-red {
|
|
||||||
color: #e60000;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-orange {
|
|
||||||
color: #f90;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-yellow {
|
|
||||||
color: #ff0;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-green {
|
|
||||||
color: #008a00;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-blue {
|
|
||||||
color: #06c;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-color-purple {
|
|
||||||
color: #93f;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-font-serif {
|
|
||||||
font-family: Georgia, Times New Roman, serif;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-font-monospace {
|
|
||||||
font-family: Monaco, Courier New, monospace;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-size-small {
|
|
||||||
font-size: 0.75em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-size-large {
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-size-huge {
|
|
||||||
font-size: 2.5em;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-direction-rtl {
|
|
||||||
direction: rtl;
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-align-center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-align-justify {
|
|
||||||
text-align: justify;
|
|
||||||
}
|
|
||||||
.ql-editor .ql-align-right {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
.ql-editor.ql-blank::before {
|
|
||||||
color: rgba(0,0,0,0.6);
|
|
||||||
content: attr(data-placeholder);
|
|
||||||
font-style: italic;
|
|
||||||
left: 15px;
|
|
||||||
pointer-events: none;
|
|
||||||
position: absolute;
|
|
||||||
right: 15px;
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
8
Wino.Mail/JS/Quill/quill.min.js
vendored
8
Wino.Mail/JS/Quill/quill.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,10 +0,0 @@
|
|||||||
#readerDiv {
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@font-face {
|
|
||||||
font-family: Starborn;
|
|
||||||
src: url(Fonts/Starborn.ttf);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@@ -1,8 +1,25 @@
|
|||||||
<html>
|
<html>
|
||||||
<body style="padding-left:12px; padding-right:12px; padding-top:8px; padding-bottom: 8px; margin: 0px; border-radius: 8px;">
|
<head>
|
||||||
<meta name="color-scheme" content="dark light">
|
<link rel="stylesheet" href="./global.css" />
|
||||||
<script src="https://app.reader/darkreader.js"></script>
|
<script src="./libs/darkreader.js"></script>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
margin: 0px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#readerDiv {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<meta name="color-scheme" content="dark light">
|
||||||
<script>
|
<script>
|
||||||
function RenderHTML(htmlString) {
|
function RenderHTML(htmlString) {
|
||||||
var containerDiv = document.getElementById("readerDiv");
|
var containerDiv = document.getElementById("readerDiv");
|
||||||
@@ -29,10 +46,6 @@
|
|||||||
DarkReader.enable();
|
DarkReader.enable();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<div id="readerDiv"></div>
|
||||||
<link rel="stylesheet" href="https://app.reader/reader.css" />
|
|
||||||
<div id="readerDiv">
|
|
||||||
</div>
|
|
||||||
<link rel="stylesheet" href="https://app.reader/global.css" />
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -391,10 +391,10 @@ namespace Wino.Views
|
|||||||
|
|
||||||
private async void ChromiumInitialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args)
|
private async void ChromiumInitialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args)
|
||||||
{
|
{
|
||||||
var editorBundlePath = (await ViewModel.NativeAppService.GetQuillEditorBundlePathAsync()).Replace("full.html", string.Empty);
|
var editorBundlePath = (await ViewModel.NativeAppService.GetQuillEditorBundlePathAsync()).Replace("editor.html", string.Empty);
|
||||||
|
|
||||||
Chromium.CoreWebView2.SetVirtualHostNameToFolderMapping("app.example", editorBundlePath, CoreWebView2HostResourceAccessKind.Allow);
|
Chromium.CoreWebView2.SetVirtualHostNameToFolderMapping("app.editor", editorBundlePath, CoreWebView2HostResourceAccessKind.Allow);
|
||||||
Chromium.Source = new Uri("https://app.example/full.html");
|
Chromium.Source = new Uri("https://app.editor/editor.html");
|
||||||
|
|
||||||
Chromium.CoreWebView2.DOMContentLoaded -= DOMLoaded;
|
Chromium.CoreWebView2.DOMContentLoaded -= DOMLoaded;
|
||||||
Chromium.CoreWebView2.DOMContentLoaded += DOMLoaded;
|
Chromium.CoreWebView2.DOMContentLoaded += DOMLoaded;
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ namespace Wino.Views
|
|||||||
{
|
{
|
||||||
if (Chromium.CoreWebView2 == null) return;
|
if (Chromium.CoreWebView2 == null) return;
|
||||||
|
|
||||||
var editorBundlePath = (await ViewModel.NativeAppService.GetQuillEditorBundlePathAsync()).Replace("full.html", string.Empty);
|
var editorBundlePath = (await ViewModel.NativeAppService.GetQuillEditorBundlePathAsync()).Replace("editor.html", string.Empty);
|
||||||
|
|
||||||
Chromium.CoreWebView2.SetVirtualHostNameToFolderMapping("app.reader", editorBundlePath, CoreWebView2HostResourceAccessKind.Allow);
|
Chromium.CoreWebView2.SetVirtualHostNameToFolderMapping("app.reader", editorBundlePath, CoreWebView2HostResourceAccessKind.Allow);
|
||||||
|
|
||||||
|
|||||||
@@ -754,21 +754,13 @@
|
|||||||
<Content Include="BackgroundImages\Mica.jpg" />
|
<Content Include="BackgroundImages\Mica.jpg" />
|
||||||
<Content Include="BackgroundImages\Nighty.jpg" />
|
<Content Include="BackgroundImages\Nighty.jpg" />
|
||||||
<Content Include="BackgroundImages\Snowflake.jpg" />
|
<Content Include="BackgroundImages\Snowflake.jpg" />
|
||||||
<Content Include="JS\Quill\darkreader.js" />
|
<Content Include="JS\Quill\libs\darkreader.js" />
|
||||||
<Content Include="JS\Quill\full.html" />
|
<Content Include="JS\Quill\editor.html" />
|
||||||
|
<Content Include="JS\Quill\editor.js" />
|
||||||
<Content Include="JS\Quill\global.css" />
|
<Content Include="JS\Quill\global.css" />
|
||||||
<Content Include="JS\Quill\highlight.min.js" />
|
<Content Include="JS\Quill\libs\quill.js" />
|
||||||
<Content Include="JS\Quill\image-resize.min.js" />
|
|
||||||
<Content Include="JS\Quill\katex.min.css" />
|
|
||||||
<Content Include="JS\Quill\katex.min.js" />
|
|
||||||
<Content Include="JS\Quill\monokai-sublime.min.css" />
|
|
||||||
<Content Include="JS\Quill\quill.core.css" />
|
|
||||||
<Content Include="JS\Quill\quill.core.js" />
|
|
||||||
<Content Include="JS\Quill\quill.js" />
|
|
||||||
<Content Include="JS\Quill\quill.min.js" />
|
|
||||||
<Content Include="JS\Quill\quill.snow.css" />
|
|
||||||
<Content Include="Assets\WinoIcons.ttf" />
|
<Content Include="Assets\WinoIcons.ttf" />
|
||||||
<Content Include="JS\Quill\reader.css" />
|
<Content Include="JS\Quill\libs\quill.snow.css" />
|
||||||
<Content Include="JS\Quill\reader.html" />
|
<Content Include="JS\Quill\reader.html" />
|
||||||
<Content Include="Assets\ReleaseNotes\172.md" />
|
<Content Include="Assets\ReleaseNotes\172.md" />
|
||||||
<None Include="Package.StoreAssociation.xml" />
|
<None Include="Package.StoreAssociation.xml" />
|
||||||
@@ -782,7 +774,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Assets\Thumbnails\uber.com.png" />
|
<Content Include="Assets\Thumbnails\uber.com.png" />
|
||||||
<None Include="JS\Quill\quill.min.js.map" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ApplicationDefinition Include="App.xaml">
|
<ApplicationDefinition Include="App.xaml">
|
||||||
@@ -895,4 +886,4 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user