RichTextView icon indicating copy to clipboard operation
RichTextView copied to clipboard

Editable state is true by default when using @IBOutlet.

Open alielsokary opened this issue 5 years ago • 3 comments

What is the purpose of your issue?

  • [x] Bug
  • [x] Question
  • [ ] Other

Description

Is there a way to make isEditable false by default when using @IBOutlet?

Version:

  • OS w/ Version: [e.g. iOS 12]
  • RichTextView Version [e.g. v1]

alielsokary avatar Feb 09 '20 13:02 alielsokary

Hey, thanks for using the library and I hope it's been helpful to you so far. Regarding your issue, looking at the required init in RichTextView.Swift you can see that isEditable is already false by default.

   required init?(coder aDecoder: NSCoder) {
        self.input = ""
        self.richTextParser = RichTextParser()
        self.textColor = UIColor.black
        self.isSelectable = true
        self.isEditable = false
        super.init(coder: aDecoder)
        self.setupSubviews()
    }

You can verify this by running the example project in the repo where RichTextView is set up as an IBOutlet. If you still have any problems, please send some sample code over so we can attempt to reproduce and fix the issue if possible.

BisuGit avatar Feb 28 '20 20:02 BisuGit

Actually in the example project I can edit and cut the content of RichTextView label. I thought of disabling the user interaction on the label but I want to be able to click on links. and at the same time to set isEditable to false.

alielsokary avatar Mar 01 '20 15:03 alielsokary

@BisuGit Any updates on this?

alielsokary avatar May 18 '20 13:05 alielsokary