WordPress.org

Make WordPress Core

Changeset 2748


Ignore:
Timestamp:
08/04/2005 08:37:46 AM (13 years ago)
Author:
matt
Message:

Adding WYSIWYG. Todo: remove all uneccesary stuff.

Location:
trunk/wp-admin
Files:
196 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r2746 r2748  
    99<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
    1010<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
     11
     12<?php if ( get_option('rich_editing') ) :?>
     13<script type="text/javascript" src="tinymce/tiny_mce_gzip.php"></script>
     14<script type="text/javascript">
     15tinyMCE.init({
     16    mode : "specific_textareas",
     17    textarea_trigger : "title",
     18    theme : "advanced",
     19    theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,separator,undo,redo,code",
     20    theme_advanced_buttons2 : "",
     21    theme_advanced_buttons3 : "",
     22    theme_advanced_toolbar_location : "top",
     23    theme_advanced_toolbar_align : "left",
     24    theme_advanced_path_location : "bottom",
     25    entity_encoding : "numeric",
     26    extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|width|height|align],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
     27    plugins : "emotions"
     28});
     29</script>
     30<?php endif; ?>
    1131
    1232<script type="text/javascript">
  • trunk/wp-admin/edit-form-advanced.php

    r2730 r2748  
    137137
    138138<fieldset id="postdiv">
    139        <legend><?php _e('Post') ?></legend>
     139<legend><?php _e('Post') ?></legend>
     140<?php if ( !get_option('rich_editing') ) : ?>
    140141<?php the_quicktags(); ?>
    141 <?php
    142  $rows = get_settings('default_post_edit_rows');
    143  if (($rows < 3) || ($rows > 100)) {
    144      $rows = 10;
    145  }
    146 ?>
    147 <div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="2" id="content"><?php echo $post->post_content ?></textarea></div>
    148 </fieldset>
    149142<script type="text/javascript">
    150143<!--
     
    152145//-->
    153146</script>
     147<?php endif; ?>
     148<?php
     149 $rows = get_settings('default_post_edit_rows');
     150 if (($rows < 3) || ($rows > 100)) {
     151     $rows = 12;
     152 }
     153?>
     154<div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="2" id="content"><?php echo $post->post_content ?></textarea></div>
     155</fieldset>
    154156
    155157<?php echo $form_pingback ?>
  • trunk/wp-admin/options-writing.php

    r2728 r2748  
    1212  <form name="form1" method="post" action="options.php">
    1313    <input type="hidden" name="action" value="update" />
    14     <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category','default_email_category'" />
     14    <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','rich_editing','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category','default_email_category'" />
    1515    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    1616      <tr valign="top">
     
    1919         <?php _e('lines') ?></td>
    2020      </tr>
    21       <tr valign="top">
    22         <th scope="row"><?php _e('Formatting:') ?></th>
    23         <td>          <label for="label">
    24           <input name="use_smilies" type="checkbox" id="label" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
    25           <?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label> <br />          <label for="label2">
    26   <input name="use_balanceTags" type="checkbox" id="label2" value="1" <?php checked('1', get_settings('use_balanceTags')); ?> />
    27           <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label></td>
    28       </tr>
     21<tr valign="top">
     22<th scope="row"><?php _e('Formatting:') ?></th>
     23<td>
     24<label for="rich_editing">
     25<input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_settings('rich_editing')); ?> />
     26<?php _e('Use the visual rich editor when writing') ?></label><br />
     27<label for="use_smilies">
     28<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
     29<?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label>
     30</td>
     31</tr>
    2932            <tr valign="top">
    3033                <th scope="row"><?php _e('Default post category:') ?></th>
  • trunk/wp-admin/upgrade-schema.php

    r2734 r2748  
    179179    add_option('default_ping_status', 'open');
    180180    add_option('default_pingback_flag', 1);
    181     add_option('default_post_edit_rows', 9);
     181    add_option('default_post_edit_rows', 10);
    182182    add_option('posts_per_page', 10);
    183183    add_option('what_to_show', 'posts');
     
    218218    // 1.6
    219219    add_option('default_role', 'inactive');
     220    add_option('rich_editing', 'true');
    220221
    221222    populate_roles();
  • trunk/wp-admin/wp-admin.css

    r2730 r2748  
    1212    background: #c00;
    1313    color: #fff;
     14}
     15
     16#postdiv div {
     17    margin-left: 1em;
    1418}
    1519
Note: See TracChangeset for help on using the changeset viewer.