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

Citations in italic #194

Closed
NerosTie opened this Issue Apr 7, 2015 · 12 comments

Comments

Projects
None yet
5 participants
@NerosTie

NerosTie commented Apr 7, 2015

Usually, when I add a link to my shaarli, I cite the head of the article or something else on the page to know what it's about.
But some peole think it's a personnal thought and they are confused.

I propose to add the possibility to mark a citation in italic. Maybe with a button or manually.
And for the bookmark: a selection is a citation.

@nodiscc

This comment has been minimized.

Member

nodiscc commented Apr 8, 2015

Formatting descriptions with markdown has been suggested on gitter. This would be a plugin; all descriptions in plain text, or enable the plugin and all descriptions are parsed in markdown -> HTML. Would this solve your problem?

In the mean time you can use quotation marks “ like this ”

@alexisju

This comment has been minimized.

alexisju commented Apr 8, 2015

Introduce markdown into shaarlis will be so great :-)

@NerosTie

This comment has been minimized.

NerosTie commented Apr 8, 2015

I don't know if markdown will solve this problem. Markdown is more for a blog plateform, what shaarli is not.
If I cite a text with hashtags, or other things md uses, it will be hell.

Yes, I can use marks " " but it adds more steps. Plus, on Android, I don't want to spend 5 minutes to add quotes... Is it possible to do this automatically with the bookmark link? It could be a start.

@alexisju

This comment has been minimized.

alexisju commented Apr 8, 2015

Markdown is not just for blogs, it is also used into diaspora for example. A markdown plugin will be more flexible and powerfull for different usage (italic as you want, but also to make bullets list, bold characters, etc...). Adding a new field for citation in italic is not more easy and will break the shaarli "standard" (for example shaarli rivers by rss (like shaarli.fr) wont work anymore)...

@iGormilhit

This comment has been minimized.

iGormilhit commented Apr 8, 2015

Markdown is not just for blogs, it is also used into diaspora for example.

And on GitHub, even in comments like here.

I also miss the possibilty to format text – with markdown –, not only for quotation marks. But I also think using MD isn't the solution. If it's too much work to add some " at the begining and the end of one's copy and paste, it is to much work to format, markdown or not.

And at the end, markdown is plain text, and human readable : example.

But still, a MD plugin would be great ! 😃

@nodiscc

This comment has been minimized.

Member

nodiscc commented Apr 9, 2015

Markdown rendering of comments would be a plugin, so, optional.
It could also be done by allowing HTML in descriptions (another plugin).
There is little interest in adding a single italic styling.
If using “” is painful, you can edit your bookmarklet to auto-add them to the description (I wouldn't add it by default because not everything is a citation), or you can use > at the beginning of a quote (standard mail and markdown quotation mark, human readable).

@NerosTie what do you think?

@NerosTie

This comment has been minimized.

NerosTie commented Apr 9, 2015

@nodiscc Edit the bookmark, why not. I want to give it a try. But, really, I don't know how to do it.
I didnt think of using >, it's better. It changes nothing for sites like shaarli.fr or "rivers" and it will be in italic on my website when markdown will be here.
After all, ok for markdown!

Do you know how to add > to the bookmark if a text is selected?

@nodiscc

This comment has been minimized.

Member

nodiscc commented Apr 9, 2015

Try this boomarklet:

javascript:javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('https://your.shaarli.server/url/?post='%20+%20encodeURIComponent(url)+'&title='%20+%20encodeURIComponent(title)+'&description=%3E'%20+%20encodeURIComponent(document.getSelection())+'&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1');})();

I just added %3E in the description parameter

@NerosTie

This comment has been minimized.

NerosTie commented Apr 9, 2015

It works, thank you!

Is it possible to add the > only if the text from the website is selected? If nothing is selected, left the description blank. (the bookmarket add the text to the description if it's selected before, so why not?).

@pikzen

This comment has been minimized.

pikzen commented Apr 9, 2015

javascript:javascript:
(function() {
    var url = location.href;
    var title = document.title ||url;
    var selected_text = window.getSelection() || document.getSelection() || document.selection.createRange().text;

    window.open('https://localhost/shaarli/?post=' + encodeURIComponent(url)+'&title=' + 
                                                     encodeURIComponent(title)+'&description=' + (selected_text != "" ? '%3E' : '') + 
                                                     encodeURIComponent(selected_text) + 
                                                     '&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1');
})();
@NerosTie

This comment has been minimized.

NerosTie commented Apr 9, 2015

@pikzen Perfect! Thank you 😄

@nodiscc

This comment has been minimized.

Member

nodiscc commented Apr 9, 2015

I think it's ok to close this. Please open new issues for related topics.

@nodiscc nodiscc closed this Apr 9, 2015

@nodiscc nodiscc removed the unconfirmed label Apr 9, 2015

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