TF-3627 Fix two scrollbar with different look
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -218,4 +218,35 @@ class HtmlTemplate {
|
|||||||
''';
|
''';
|
||||||
|
|
||||||
static const String markDownAndASCIIArtStyleCSS = 'display: block; font-family: monospace; white-space: pre; margin: 1em 0px;';
|
static const String markDownAndASCIIArtStyleCSS = 'display: block; font-family: monospace; white-space: pre; margin: 1em 0px;';
|
||||||
|
|
||||||
|
static const String customInternalStyleCSS = '''
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-thumb {
|
||||||
|
background-color: #c1c1c1;
|
||||||
|
border-radius: 10px;
|
||||||
|
min-height: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Browsers without `::-webkit-scrollbar-*` support */
|
||||||
|
@supports not selector(::-webkit-scrollbar) {
|
||||||
|
* {
|
||||||
|
scrollbar-color: #c1c1c1 transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
''';
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:core/utils/app_logger.dart';
|
import 'package:core/utils/app_logger.dart';
|
||||||
|
import 'package:core/utils/html/html_template.dart';
|
||||||
import 'package:core/utils/html/html_utils.dart';
|
import 'package:core/utils/html/html_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:html_editor_enhanced/html_editor.dart';
|
import 'package:html_editor_enhanced/html_editor.dart';
|
||||||
@@ -118,6 +119,7 @@ class _WebEditorState extends State<WebEditorWidget> {
|
|||||||
darkMode: false,
|
darkMode: false,
|
||||||
initialText: widget.content,
|
initialText: widget.content,
|
||||||
customBodyCssStyle: HtmlUtils.customCssStyleHtmlEditor(direction: widget.direction),
|
customBodyCssStyle: HtmlUtils.customCssStyleHtmlEditor(direction: widget.direction),
|
||||||
|
customInternalCSS: HtmlTemplate.customInternalStyleCSS,
|
||||||
spellCheck: true,
|
spellCheck: true,
|
||||||
disableDragAndDrop: true,
|
disableDragAndDrop: true,
|
||||||
webInitialScripts: UnmodifiableListView([
|
webInitialScripts: UnmodifiableListView([
|
||||||
|
|||||||
+3
-3
@@ -1235,11 +1235,11 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: custom-internal-css
|
||||||
resolved-ref: "0ba81a166219f227aec70d562ab06daedf793608"
|
resolved-ref: "7ba66dc9cee4e6c202be93ee6afa8a0f3a4c0415"
|
||||||
url: "https://github.com/linagora/html-editor-enhanced.git"
|
url: "https://github.com/linagora/html-editor-enhanced.git"
|
||||||
source: git
|
source: git
|
||||||
version: "3.1.5"
|
version: "3.1.6"
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ dependencies:
|
|||||||
html_editor_enhanced:
|
html_editor_enhanced:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/linagora/html-editor-enhanced.git
|
url: https://github.com/linagora/html-editor-enhanced.git
|
||||||
ref: main
|
ref: custom-internal-css
|
||||||
|
|
||||||
jmap_dart_client:
|
jmap_dart_client:
|
||||||
git:
|
git:
|
||||||
|
|||||||
Reference in New Issue
Block a user