Position of quill tooltip

Use inlineStyle to indent and align text correctly
This commit is contained in:
GRL 2021-07-23 16:17:53 +02:00
parent ba6e6235d6
commit 9e8bed7aab
3 changed files with 16 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { consoleGlobalMessageManagerFocusStore, consoleGlobalMessageManagerVisibleStore } from "../../Stores/ConsoleGlobalMessageManagerStore"; import { consoleGlobalMessageManagerFocusStore, consoleGlobalMessageManagerVisibleStore } from "../../Stores/ConsoleGlobalMessageManagerStore";
import { onMount } from "svelte"; import {onDestroy, onMount} from "svelte";
import type { Game } from "../../Phaser/Game/Game"; import type { Game } from "../../Phaser/Game/Game";
import type { GameManager } from "../../Phaser/Game/GameManager"; import type { GameManager } from "../../Phaser/Game/GameManager";
import { AdminMessageEventTypes } from "../../Connexion/AdminMessagesService"; import { AdminMessageEventTypes } from "../../Connexion/AdminMessagesService";
@ -73,13 +73,12 @@
}, },
}); });
quill.on('selection-change', function (range, oldRange) {
if (range === null && oldRange !== null) {
consoleGlobalMessageManagerFocusStore.set(false);
} else if (range !== null && oldRange === null)
consoleGlobalMessageManagerFocusStore.set(true); consoleGlobalMessageManagerFocusStore.set(true);
}); });
});
onDestroy(() => {
consoleGlobalMessageManagerFocusStore.set(false);
})
function disableConsole() { function disableConsole() {
consoleGlobalMessageManagerVisibleStore.set(false); consoleGlobalMessageManagerVisibleStore.set(false);

View File

@ -4,7 +4,7 @@
import { QuillDeltaToHtmlConverter } from "quill-delta-to-html"; import { QuillDeltaToHtmlConverter } from "quill-delta-to-html";
const content = JSON.parse($textMessageContentStore); const content = JSON.parse($textMessageContentStore);
const converter = new QuillDeltaToHtmlConverter(content.ops); const converter = new QuillDeltaToHtmlConverter(content.ops, {inlineStyles: true});
const NAME_BUTTON = 'Ok'; const NAME_BUTTON = 'Ok';
function closeTextMessage() { function closeTextMessage() {

View File

@ -9,8 +9,7 @@ section.section-input-send-text {
} }
div.input-send-text{ div.input-send-text{
height: auto; height: calc(100% - 100px);
max-height: calc(100% - 100px);
overflow: auto; overflow: auto;
color: whitesmoke; color: whitesmoke;
@ -20,5 +19,13 @@ section.section-input-send-text {
color: whitesmoke; color: whitesmoke;
font-size: 1rem; font-size: 1rem;
} }
.ql-tooltip {
top: 40% !important;
left: 20% !important;
color: whitesmoke;
background-color: #333333;
}
} }
} }