MCPcopy
hub / github.com/basecamp/trix / end

Method end

action_text-trix/app/assets/javascripts/trix.js:11911–11932  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

11909 }
11910 }
11911 end(data) {
11912 this.data.end = data;
11913 if (this.isSignificant()) {
11914 this.forgetPlaceholder();
11915 if (this.canApplyToDocument()) {
11916 var _this$delegate2, _this$responder6, _this$responder7, _this$responder8;
11917 this.setInputSummary({
11918 preferDocument: true,
11919 didInput: false
11920 });
11921 (_this$delegate2 = this.delegate) === null || _this$delegate2 === void 0 || _this$delegate2.inputControllerWillPerformTyping();
11922 (_this$responder6 = this.responder) === null || _this$responder6 === void 0 || _this$responder6.setSelectedRange(this.range);
11923 (_this$responder7 = this.responder) === null || _this$responder7 === void 0 || _this$responder7.insertString(this.data.end);
11924 return (_this$responder8 = this.responder) === null || _this$responder8 === void 0 ? void 0 : _this$responder8.setSelectedRange(this.range[0] + this.data.end.length);
11925 } else if (this.data.start != null || this.data.update != null) {
11926 this.requestReparse();
11927 return this.inputController.reset();
11928 }
11929 } else {
11930 return this.inputController.reset();
11931 }
11932 }
11933 getEndData() {
11934 return this.data.end;
11935 }

Callers 1

compositionendFunction · 0.45

Calls 9

isSignificantMethod · 0.95
canApplyToDocumentMethod · 0.95
forgetPlaceholderMethod · 0.80
setInputSummaryMethod · 0.45
setSelectedRangeMethod · 0.45
insertStringMethod · 0.45
requestReparseMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected