allura-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brondsema" <d...@brondsema.net>
Subject [allura:tickets] #7955 Add more formatting support to markdown editor
Date Fri, 28 Aug 2015 20:14:07 GMT
Tooltips added in db/7955

----

So adding a toolbar button that runs an action like this is pretty straightfoward:

    function toggleStrikethrough(editor) {
      _toggleBlock(editor, 'strikethrough', '<s>', '</s>');
    }
    
But then if you hit the button again it doubles up instead of toggling off the strikethrough.
 All the toggle functions call `getState()` to know what `type` of section you are in.  But
codemirror/gfm doesn't know about strikethrough (it does recognize the tag at the beginning,
but not the span of text between the tags).  It does recognize section headers (e.g. "header
header-2") and the "hr" type.  It thinks \` as well as \``` sections are both "comment". 
It doesn't know anything about tables, or `~~~~` sections.

The state type also appears to be what controls a button being highlighted when its active.
 The state type should match the toolbar item's 'name'.




---

** [tickets:#7955] Add more formatting support to markdown editor**

**Status:** open
**Milestone:** unreleased
**Labels:** ux sf-current sf-4 
**Created:** Mon Aug 10, 2015 02:39 PM UTC by Dave Brondsema
**Last Updated:** Mon Aug 17, 2015 02:50 PM UTC
**Owner:** Igor Bondarenko


It'd be nice to add more toolbar buttons to support inserting formatting like:

* `~~~~` code blocks
* strikethrough
* backticks
* tables
* headers

Tables & headers might need a drop-down to support choosing which one, so not sure if
that is realistic.

Syntax highlighting of those elements (especially our code blocks) would be nice too, but
perhaps a lot of work?

See if we can include tooltip text on the new buttons too.  I note that our custom preview
and help buttons don't have tooltips.


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.
 Or, if this is a mailing list, you can unsubscribe from the mailing list.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message