Give the inlineEditor widget a "raw value" option.

Review Request #4484 — Created Aug. 25, 2013 and submitted

Information

Djblets
master

Reviewers

Give the inlineEditor widget a "raw value" option.

When we use the inline editor today, we take the contents of whichever element
is set, strip out any HTML formatting (like links that we may have inserted),
and then set that as the contents of the input widget. This is insufficient if
we want to do things like format things with markdown.

This change adds a couple options, hasRawValue and rawValue, to the widget. If
these are not set, everything works as before. If hasRawValue is true, the
contents of the rawValue option are used as the source text, rather than
calling .text() on the element and stripping it.
Used this with both raw-value and normal inline editors. Saw that my original
text was visible in the former, even after markdown changed things a lot, and
that the latter behaved as before.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        djblets/media/js/jquery.gravy.js
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      Ignored Files:
        djblets/media/js/jquery.gravy.js
    
    
  2. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        djblets/media/js/jquery.gravy.js
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      Ignored Files:
        djblets/media/js/jquery.gravy.js
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (b132f9d).
Loading...