Code Monkey home page Code Monkey logo

Comments (7)

indragiek avatar indragiek commented on May 22, 2024 2

@adamdahan While I wish I could resolve every issue in a timely manner, I realistically cannot when I have other things to prioritize. I don't have any obligation or incentive to put this ahead of anything else. It's open source for a reason: you can read, extend, and modify the code on your own to suit your purposes rather than waiting on me to fix it for you.

@ryang1428 It looks like this may be an issue with a behavioural change in UIKit, I will investigate soon.

from cocoamarkdown.

anton-barkov avatar anton-barkov commented on May 22, 2024 1

To anyone who still struggles with this issue - try setting NSTextView/UITextView linkTextAttribues to an empty dictionary and set all the needed attributes through CMTextAttributes linkAttributes.

In my case the link always stayed blue. It appears as though the view overrides attributed string's attributes.

from cocoamarkdown.

ryang1428 avatar ryang1428 commented on May 22, 2024

I am also seeing a similar issue, but my links are always blue, even when setting

        CMTextAttributes *cmAttrs = [[CMTextAttributes alloc] init];
        cmAttrs.linkAttributes = @{NSForegroundColorAttributeName: [UIColor fp_pink]};

from cocoamarkdown.

iby avatar iby commented on May 22, 2024

@anton-barkov Thanks for the tips! Any idea how to do the same for NSTextField?

from cocoamarkdown.

anton-barkov avatar anton-barkov commented on May 22, 2024

@ianbytchek I'm not sure that links will work properly with NSTextField, you should probably consider using NSTextView. See this thread.

from cocoamarkdown.

iby avatar iby commented on May 22, 2024

@anton-barkov They work perfectly fine. The only issue is they are always displayed in blue while the attributed string specifies a different color.

from cocoamarkdown.

indragiek avatar indragiek commented on May 22, 2024

The conclusion here seems to be that the view being used to render the attributed string seems to override attributes that are set by CocoaMarkdown when generating the attributed string. Since this is a UIKit problem and not an issue with CMAttributedStringRenderer, I am closing this issue.

from cocoamarkdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.