Making WordPress.org


Ignore:
Timestamp:
08/09/2016 06:06:41 PM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Add a comment preview to the front-end form for user contributed notes.

  • Preview is fetched via AJAX.
  • Preview updates 1.5 seconds after user stops typing.
  • Adds editor toolbar button "preview note".
  • Moves filtering of 'syntaxhighlighter_htmlresult' outside of just handbooks since it can also be applied elsewhere.

Props keesiemeijer.
Fixes #1865.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php

    r3787 r3788  
    8888        ) ); ?>
    8989
     90        <!-- Comment Preview -->
     91        <div id='comment-preview' class='comment byuser depth-1' style='display:none;'>
     92            <article class='comment-body'>
     93                <header class='comment-meta'>
     94                    <div>
     95                        <?php _e( 'Preview', 'wporg' ); ?>
     96                        <span class='spinner' style='display:none'></span>
     97                    </div>
     98                </header>
     99                <div class='comment-content'></div>
     100            </article>
     101        </div>
     102
    90103    <?php endif; ?>
    91104
Note: See TracChangeset for help on using the changeset viewer.