aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/FormattedTextBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index e1ea93c3f..faef78469 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -114,7 +114,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
private _rules: RichTextRules | undefined;
private _forceUncollapse = true; // if the cursor doesn't move between clicks, then the selection will disappear for some reason. This flags the 2nd click as happening on a selection which allows bullet points to toggle
private _break = true;
- @observable private _editLabel = false;
public ProseRef?: HTMLDivElement;
public get EditorView() {
return this._editorView;
@@ -2092,48 +2091,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
);
}
- @computed get answerIcon() {
- return (
- <Tooltip
- title={
- <div className="answer-tooltip" style={{ minWidth: '150px' }}>
- {StrCast(this.Document.quiz)}
- </div>
- }>
- <div className="answer-tool-tip">
- <FontAwesomeIcon className="q-icon" icon="circle" color="white" />
- <FontAwesomeIcon className="answer-icon" icon="question" />
- </div>
- </Tooltip>
- );
- }
-
- @computed get editAnswer() {
- return (
- <Tooltip
- title={
- <div className="answer-tooltip" style={{ minWidth: '150px' }}>
- {this._editLabel ? 'save' : 'edit correct answer'}
- </div>
- }>
- <div className="answer-tool-tip" onPointerDown={e => setupMoveUpEvents(e.target, e, returnFalse, emptyFunction, () => this.editLabelAnswer())}>
- <FontAwesomeIcon className="edit-icon" color={this._editLabel ? 'white' : 'black'} icon="pencil" size="sm" />
- </div>
- </Tooltip>
- );
- }
-
- editLabelAnswer = () => {
- // when click the pencil, set the text to the quiz content. when click off, set the quiz text to that and set textbox to nothing.
- if (!this._editLabel) {
- this.dataDoc.text = StrCast(this.Document.quiz);
- } else {
- this.Document.quiz = RTFCast(this.dataDoc.text).Text;
- this.dataDoc.text = '';
- }
- this._editLabel = !this._editLabel;
- };
-
get fieldKey() {
return this._fieldKey;
}
@@ -2252,8 +2209,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
{this.noSidebar || this.Document._layout_noSidebar || this.Document._createDocOnCR || this.layoutDoc._chromeHidden || this.Document.quiz ? null : this.sidebarHandle}
{this.audioHandle}
{this.layoutDoc._layout_enableAltContentUI && !this.layoutDoc._chromeHidden ? this.overlayAlternateIcon : null}
- {this.Document.showQuiz ? this.answerIcon : null}
- {this.Document.showQuiz ? this.editAnswer : null}
</div>
</div>
);