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

Inline tagging using # #65

Open
sguergachi opened this issue Oct 1, 2014 · 5 comments
Open

Inline tagging using # #65

sguergachi opened this issue Oct 1, 2014 · 5 comments

Comments

@sguergachi
Copy link
Collaborator

Allow for inline creation of tags in the form of: "#tag"

This will require post processing since Markdown doesn't distinguish the heading "# h1" from "#h1"

There are other considerations to this feature:

  • I think we might need to implement autocomplete UI where as soon as you type "#" and type a letter instead of a space the autocomplete UI pops up below the carrate to show relevant tags, that way users don't create variations on the same tags by accident: (Tags, tags, tag, etc.)
  • Tags need to be highlighted in some way so we need to do additional post conversion to make them colored blue with an underline as a style.
  • Tags need to be links, clicking on them should take users to the tag tab with the appropriate tag selected.

More thought is needed for this feature.

@crxtrdude
Copy link
Contributor

Just a reminder:

If it's going to be implemented, first, there should be a setting to see if they want to use hashtags, that way in case that people who use Day One would import their entries and they disable the hashtag system, then they could disable it as well on Journaley.

For the parsing, we store all tags into database (which we already do, saw that on the code) then read the raw Markdown text initially before rendering. Check the difference between hash with a space (headers) and hash that does not (hashtags).

When it's done, post Markdown conversion, we search the html over to check over tags with text enclosed in headings tags (<h1>) and put them back as hashtags.

Anyone having a better idea than this?

@sguergachi
Copy link
Collaborator Author

"When it's done, post Markdown conversion, we search the html over to check over tags with text enclosed in headings tags (

) and put them back as hashtags."

I don't get this part, are you saying tags enclosed in h1 tags as in: "# #hashtag"?

  • Sammy Guergahchi

On Nov 23, 2015, 6:46 AM -0500, Clinton Cañ[email protected], wrote:

Just a reminder:

If it's going to be implemented, first, there should be a setting to see if they want to use hashtags, that way in case that people who use Day One would import their entries and they disable the hashtag system, then they could do so on Journaley.

For the parsing, we store all tags into database (which we do) then read the raw Markdown text initially before rendering. Check the difference between hash with a space (headers) and hash that does not (hashtags).

When it's done, post Markdown conversion, we search the html over to check over tags with text enclosed in headings tags (

) and put them back as hashtags.

Anyone having a better idea than this?


Reply to this email directly orview it on GitHub(#65 (comment)).

@crxtrdude
Copy link
Contributor

As it says:

post Markdown conversion

Meaning, every hash becomes headings. Like example:

#MyCoolHashtag

into:

<h1>MyCoolHashtag.</h1>

We assume that MyCoolHashtag tag exists in our database and we search the instance of <h1>MyCoolHashtag.</h1> to strip off the <h1> tags and convert that into either a line &#35;MyCoolTag or enclosed in <p> tags, <p>&#35;MyCoolTag</p>

@sguergachi
Copy link
Collaborator Author

Oh right, because of the issue where # tag and #tag are the same in Markdown. I see now.
Then I agree with what you said

@crxtrdude
Copy link
Contributor

Yeah, Day One can differentiate hashtags and heading 1's.

I just put this here for reference, maybe I might get into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants