Skip to content

KVSKBAEditorMgt#

Procedures#

TestMaxTextLengthManual(Integer, Boolean) :#

Summary: Tests if the text length exceeds the maximum allowed length and displays a warning message.

procedure TestMaxTextLengthManual(TextLength: Integer; IsHeader: Boolean): 

Parameters:

  • TextLength: The length of the text to be tested
  • IsHeader: Boolean indicating whether this is header text (true) or line text (false)

Remarks: Uses different maximum length limits for header vs. line text based on company information setup

GetPlainBlobText(Text) : Text#

Summary: Converts formatted HTML text to plain text by removing HTML tags.

procedure GetPlainBlobText(FormattedText: Text): Text

Parameters:

  • FormattedText: The HTML formatted text to be converted

Returns: Plain text with HTML tags removed

RunEditor(Text) : Boolean#

Summary: Opens the HTML editor for text editing and returns whether changes should be saved.

procedure RunEditor(var PlainText: Text): Boolean

Parameters:

  • PlainText: Text variable that will be modified with the editor content

Returns: Boolean indicating whether the user chose to save changes

Remarks: Opens the editor in plain text mode and converts HTML output back to plain text

Events#

OnBeforeExtendedTextLineCaseElseOnGetMaxTextLengthRetVal(Record Extended Text Line, Integer, Boolean) :#

Summary: Integration event that allows customization of maximum text length calculation for extended text lines.

[IntegrationEvent(false, false)]
local procedure OnBeforeExtendedTextLineCaseElseOnGetMaxTextLengthRetVal(ExtendedTextLine: Record "Extended Text Line"; var MaxTextLengthRetVal: Integer; var isCaseHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAEditorMgt", 'OnBeforeExtendedTextLineCaseElseOnGetMaxTextLengthRetVal', '', false, false)]
local procedure DoSomethingOnBeforeExtendedTextLineCaseElseOnGetMaxTextLengthRetVal(ExtendedTextLine: Record "Extended Text Line"; var MaxTextLengthRetVal: Integer; var isCaseHandled: Boolean)
begin
end;

Parameters:

  • ExtendedTextLine: The extended text line record being processed
  • MaxTextLengthRetVal: Variable containing the calculated maximum text length (can be modified by subscribers)
  • isCaseHandled: Variable indicating whether a subscriber has handled the case (set to true to skip default logic)

Remarks: Use this event to define custom maximum text lengths for specific table types not covered by the standard case statement