Bold, Italic etc

Hello,
Is it possible to add a small tool bar in Zotero in order to add tags like <i>*</i> quickly? For example, select a word, press some button and get <i>word</i>? It is too wearisome to type it manually every time..
  • I don't think anyone disagrees with this in principle, but I don't think it's going to happen very soon, unfortunately.
  • mm.. it's a pity
  • See https://forums.zotero.org/discussion/3875/rich-text-in-titles/?Focus=110229#Comment_110229 for prior discussion.

    Dan, would you welcome a pull request for "Bold/italics via shortcuts, and bold/italics/super/sub in the context menu.", or should I wait until 5.0 has landed?
  • It'd definitely have to be on 5.0. This wouldn't be a minor change, though, since we'd need to switch to visual HTML editing of affected fields, probably via an embedded HTML document and contentEditable, and search would need to operate on the plain text, so we probably would need DB schema changes to store separate plain-text versions of those fields, and various places that expect plain text (e.g., the current items list) would need the non-HTML versions, and…
  • edited September 14, 2015
    This wouldn't be a minor change, though, since we'd need to switch to visual HTML editing of affected fields
    Would you support the addition of just the shortcuts and context menu as a stop-gap measure? I don't see how that's any worse than the current situation, where users need to write out the tags by hand. I don't disagree with the other changes, but they'd be too hard for me to figure out.
  • It can be done with a plugin. Bluebook Signals has code for ctrl-i -> italics that could be used as a starting point.

    IIRC the bootstrap loader for that one is more complex than it needs to be. The bootstrap.js in the Abbreviation Filter is more complex than you would need (it builds and loads a persistent component), but it uses a simpler loading framework than Bluebook Signals.
  • From https://forums.zotero.org/discussion/51783/?Focus=234888#Comment_234888, since I was going off-topic there:
    Has it? To be clear, I was really just talking here about the menu and markup for this, which would either not be HTML or be more complicated HTML. I feel much less strongly about adding unrendered rich-text markup (at least those with basic HTML tags) via the keyboard. Not ideal, particularly in the middle pane, but at least it's well understood by many people and would be limited to entry via the keyboard. And other than a week ago when I said that a patch would need to go to 5.0, like pretty much all patches now, I'm not sure I actually rejected that (though it's certainly possible).
    Sorry, Dan, but I'm having a hard time understanding where exactly you stand on this, and I want to know before I start spending/wasting time on coding. I'll try to be as explicit as possible:

    * I don't like that right now, the only way for users to get automated rich text formatting in titles is to type out the current set "basic HTML tags" (listed in https://www.zotero.org/support/kb/rich_text_bibliography) by hand. It's error-prone and laborious.
    * UI support could come in multiple ways. Provided that the user has selected some text in the title, Zotero could offer:
    - shortcuts
    - a right-click menu
    - a toolbar
    Based on your comments at https://forums.zotero.org/discussion/3875/rich-text-in-titles/?Focus=110229#Comment_110229, I understood that you found the first two options preferable and acceptable.
    * So, if I were to work against "master"/5.0, would you accept a minimal patch adding shortcut support? It seems to me that your comment above ("This wouldn't be a minor change, though, since ...") and in the other thread ("I feel much less strongly about adding unrendered rich-text markup (at least those with basic HTML tags) via the keyboard.") are in conflict. Do shortcuts fall under "adding ... markup via the keyboard"?
  • So, if I were to work against "master"/5.0, would you accept a minimal patch adding shortcut support?
    Yes. We still need the things I say above, ideally before 5.0 Final, but we can start with just the shortcuts on master.
  • (But just as an example of why these things demand a more holistic approach: https://forums.zotero.org/discussion/52871/)
Sign In or Register to comment.