Contents

textView(_:shouldChangeTypingAttributes:toAttributes:)

Sent when the typing attributes are changed.

Declaration

@MainActor optional func textView(_ textView: NSTextView, shouldChangeTypingAttributes oldTypingAttributes: [String : Any] = [:], toAttributes newTypingAttributes: [NSAttributedString.Key : Any] = [:]) -> [NSAttributedString.Key : Any]

Parameters

  • textView:

    The text view sending the message.

  • oldTypingAttributes:

    The old typing attributes.

  • newTypingAttributes:

    The proposed typing attributes.

Return Value

The actual new typing attributes.

See Also

Setting Text Attributes