Coder Social home page Coder Social logo

Comments (12)

rogchap avatar rogchap commented on August 19, 2024

Love the idea of using markdown. I'm sure (once we got going) we could add more markdown syntax features like lists, images etc.

Question: When supporting headings there are two types of syntax for headings; one is prefixing with a # and the other is "underlining" with = or -. I personally prefer the # syntax and I think this would be easier to parse.

How would we pass font information? We would need to know what point size for the headers were to be etc?

In what situation would we use -mutableAttributedStringFromLabel: ?

from nimbus.

rogchap avatar rogchap commented on August 19, 2024

Totally want to use NSDataDetector for links, but it is only in iOS 4.0 + :(

from nimbus.

jverkoey avatar jverkoey commented on August 19, 2024

Support data detectors, just try to ensure that the label will still
build on iOS 3.

On 2011-08-04, at 7:56 AM, rogchap
[email protected]
wrote:

Totally want to use NSDataDetector for links, but it is only in iOS 4.0 + :(

Reply to this email directly or view it on GitHub:
#24 (comment)

from nimbus.

jverkoey avatar jverkoey commented on August 19, 2024

We should try to support both header styles eventually, but for now
the ## format would be a good v1. As for the font info, perhaps we
should define a markdown stylesheet object of sorts?

@interface NIMarkdownStylesheet

@property (nonatomic, readwrite, retain) UIFont* header1Font;
Etc...

@end

from nimbus.

jverkoey avatar jverkoey commented on August 19, 2024

We'd use mutableAttributedStringFromLabel when we want to create an
attributed label by defining the basic characteristics of a label and
then adding links, for example. An attributed label should probably be
a UILabel to make this easiest.

Sent from my iPad

On 2011-08-04, at 7:49 AM, rogchap
[email protected]
wrote:

Love the idea of using markdown. I'm sure (once we got going) we could add more markdown syntax features like lists, images etc.

Question: When supporting headings there are two types of syntax for headings; one is prefixing with a # and the other is "underlining" with = or -. I personally prefer the # syntax and I think this would be easier to parse.

How would we pass font information? We would need to know what point size for the headers were to be etc?

In what situation would we use -mutableAttributedStringFromLabel: ?

Reply to this email directly or view it on GitHub:
#24 (comment)

from nimbus.

rogchap avatar rogchap commented on August 19, 2024

Data Detectors for iOS 4 and I'll use a simple regex for iOS 3 etc

from nimbus.

rogchap avatar rogchap commented on August 19, 2024

I think markdown would have to have some sort of stylesheet. I think we can get the Label built first then address the markdown parser.... looks like I'm "grabbing" this one too!

from nimbus.

jverkoey avatar jverkoey commented on August 19, 2024

Haha, try not to take on too many things without finishing some others :)

I'll be pushing out a new release later today by the way, 0.6. Notably in this change I'm doing away with independent projects for each feature and now have a single root project that contains separate targets for each feature. It's effectively the same thing, but now you can have on Xcode window open and access the entire Nimbus namespace of features. It's super handy for refactoring :)

from nimbus.

rogchap avatar rogchap commented on August 19, 2024

In terms of links within the label I was planning a delegate when the the link is hit. Not sure to either do a -(BOOL)shouldOpenLink: which if returned true would default to opening the URL in safari or -(void)didSelectLink: which would leave it completely up to the user. Either way would allow the user to intersept the URL and act appropriately. Any thoughts?

I guess most people would want to open the NIWebController, but obviously I don't want to tie to this dependency.

from nimbus.

jverkoey avatar jverkoey commented on August 19, 2024

We definitely don't want to tie it to any controller. Once we get the navigator into Nimbus people might want to have the navigator open the URL, for example.

As for whether it should be shouldOpenLink or didSelectLink, I'm leaning towards the latter because I don't think the label would do anything interesting with the return value of shouldOpenLink.

from nimbus.

rogchap avatar rogchap commented on August 19, 2024

See #46

from nimbus.

rogchap avatar rogchap commented on August 19, 2024

This is is now in Nimbus < 0.8
Docs can be found here: http://jverkoey.github.com/nimbus/group___nimbus_attributed_label.html

from nimbus.

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.