Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS version has been ported #44

Closed
alelordelo opened this issue Aug 5, 2024 · 3 comments · Fixed by #53
Closed

MacOS version has been ported #44

alelordelo opened this issue Aug 5, 2024 · 3 comments · Fixed by #53

Comments

@alelordelo
Copy link

Hello Canopas team,

I ported the code to MacOS/Appkit over the weekend, project is on the zip bellow:
rich-editor-swiftui-main-3.zip

Screenshot 2024-08-05 at 13 02 13

On this code:

import Foundation

public class RichEditorState: ObservableObject {
    private var adapter: EditorAdapter = DefaultAdapter()

    @Published internal var editableText: NSMutableAttributedString

Xcode prints this, when trying to apply rich text:
Publishing changes from within view updates is not allowed, this will cause undefined behavior.

Then rich text doesn't get applied, and you need to click on underwrite and then it works.

Please let me know what you guys think, and if you could help solve this issue.

Next steps would be.

  1. undo manager
  2. Color
  3. Font

Cheers

@Faolain
Copy link

Faolain commented Aug 12, 2024

Nice work, can you create a PR @alelordelo ?

@alelordelo
Copy link
Author

alelordelo commented Aug 13, 2024 via email

@cp-divyesh-v
Copy link
Member

We have ported macOS and other platforms as well with last PR

@cp-divyesh-v cp-divyesh-v linked a pull request Nov 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants