From 962badfb33c5011e9288966e5db2f8a222939e3a Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 14 Sep 2020 15:49:26 -0400 Subject: small fix to colorBox to set text color for currently active text boxes text field --- src/client/views/nodes/ColorBox.tsx | 5 +++-- src/client/views/nodes/formattedText/RichTextMenu.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/ColorBox.tsx b/src/client/views/nodes/ColorBox.tsx index 0aa0c33fb..43f6cc082 100644 --- a/src/client/views/nodes/ColorBox.tsx +++ b/src/client/views/nodes/ColorBox.tsx @@ -15,6 +15,7 @@ import { ActiveInkPen, ActiveInkWidth, ActiveInkBezierApprox, SetActiveInkColor, import "./ColorBox.scss"; import { FieldView, FieldViewProps } from './FieldView'; import { DocumentType } from "../../documents/DocumentTypes"; +import { RichTextMenu } from "./formattedText/RichTextMenu"; type ColorDocument = makeInterface<[typeof documentSchema]>; const ColorDocument = makeInterface(documentSchema); @@ -39,8 +40,8 @@ export class ColorBox extends ViewBoxBaseComponent { @action toggleColorDropdown() { this.showColorDropdown = !this.showColorDropdown; } @action setActiveColor(color: string) { this.activeFontColor = color; } get TextView() { return (this.view as any)?.TextView as FormattedTextBox; } + get TextViewFieldKey() { return this.TextView?.props.fieldKey; } createColorButton() { const self = this; -- cgit v1.2.3-70-g09d2