diff options
Diffstat (limited to 'files/tr/mdn/editor/basics/index.html')
-rw-r--r-- | files/tr/mdn/editor/basics/index.html | 427 |
1 files changed, 0 insertions, 427 deletions
diff --git a/files/tr/mdn/editor/basics/index.html b/files/tr/mdn/editor/basics/index.html deleted file mode 100644 index cf3f1475a1..0000000000 --- a/files/tr/mdn/editor/basics/index.html +++ /dev/null @@ -1,427 +0,0 @@ ---- -title: MDN editor basics -slug: MDN/Editor/Basics -translation_of: MDN/Editor/Basics ---- -<div>{{MDNSidebar}}</div><p><span class="seoSummary">Editing content on MDN is easy; you can use the built-in WYSIWYG editor to create, edit, and improve articles and other pages almost anywhere on the site.</span> The editor window, shown below, is comprised of eight key boxes. This section will provide information about each section so you know how to use our entire editing environment.</p> -<div class="note"> - <p><strong>Note:</strong> We're constantly working on improvements to MDN, so there will be times when this documentation or the screen shots below may be slightly out-of-date. We'll periodically update this documentation, though, to avoid it being unusably behind.</p> -</div> -<p><a href="https://mdn.mozillademos.org/files/5315/edit-page-normal-labeled.png"><img alt="" src="https://mdn.mozillademos.org/files/5315/edit-page-normal-labeled.png" style="width: 600px; height: 631px; border-width: 1px; border-style: solid;"></a></p> -<h2 id="Page_controls">Page controls</h2> -<p>The page controls area offers buttons affecting the page as a whole:</p> -<dl> - <dt> - Save and keep editing</dt> - <dd> - Saves the page without closing the editor; this lets you periodically save your work, creating an entry in the page history that you can revert to if you need to, or in case you need to stop working and come back to it later. This option is not available when creating new pages. See {{anch("The revision comment box")}} to learn how to include a revision comment on your saved article.</dd> - <dt> - Save changes</dt> - <dd> - Saves the page and closes the editor, returning you to view the page in standard browsing mode. See {{anch("The revision comment box")}} to learn how to include a revision comment on your saved article.</dd> - <dt> - Preview changes</dt> - <dd> - Opens a new tab or window showing the page as it exists in your editor, rendered as if you were browsing to it. This includes executing any macros you use in-content. Your work is <strong>not</strong> saved when you use this option. This lets you check to be sure you haven't made any errors in your macro syntax or other formatting that may prevent the page from rendering correctly.</dd> - <dt> - Discard changes</dt> - <dd> - Cancels your edit, disposing of any changes you've made without saving them. You're returned to the page in standard browsing mode.</dd> -</dl> -<h2 id="The_page_info_box">The page info box</h2> -<p>The page info box contains information about the page, but also can be expanded to offer additional page controls. By default, it displays the page's title and the date and time at which a local draft was saved; the local draft, stored on your computer, is used as a backup in case you accidentally navigate away from the editor or your browser crashes.</p> -<p>You can click the "Edit Page Title and Properties" link to switch to a view offering additional page controls. This view looks like this:</p> -<p><img alt="" src="https://mdn.mozillademos.org/files/5317/expanded-page-info.png" style="width: 517px; height: 69px;"></p> -<p>This view allows you to change the page's display title and the depth of the page's table of contents. The display title is the title shown in the browser's title bar (or tab bar) and as the title of the page at the top of the article and in the breadcrumb bar, as appropriate. It doesn't affect the page's URL.</p> -<div class="note"> - <p><strong>Note:</strong> It's worth noting that we prefer short URLs and descriptive titles; for example, the article about the Kuma API has the title "The Kuma API" but its URL slug (the part after the site's root) is Project:MDN/Kuma/API, where "API" represents this page.</p> -</div> -<p>The TOC (table of contents) level lets you specify how deeply into the article's heading levels the table of contents automatically displayed on the page should go. By default, heading levels {{HTMLElement("h2")}} through {{HTMLElement("h4")}} are included in the TOC, so that the TOC has a three-level depth. However, you can set this to any of those, as well as "No TOC" (to not display a TOC at all, such as on landing pages) or to show all levels in the TOC.</p> -<p>As is the case with all changes you might make, changes in the page info box do not take effect unless you save the page.</p> -<h2 id="The_toolbar">The toolbar</h2> -<p>The editor's toolbar offers features that let you adjust the appearance and flow of the article as you work. There are two rows of buttons (more if the width of your window is narrow enough that they wrap, but generally two) and a third row that shows the hierarchy of HTML elements leading up to where you are. In the screenshot below, for example, you're writing inside a top-level {{HTMLElement("p")}} block.</p> -<p><img alt="" src="https://mdn.mozillademos.org/files/5319/edit-toolbar.png" style="width: 771px; height: 88px;"></p> -<p>The toolbar's buttons are divided into seven groups. Let's look at each; we will examine the buttons in each group in order left-to-right.</p> -<h3 id="Document_options">Document options</h3> -<p>The document options box provides options for document-level manipulations:</p> -<p> </p> -<dl> - <dt> - Source mode toggle</dt> - <dd> - The source mode toggle button lets you toggle between editing using the WYSIWYG interface and in raw HTML source mode. We <strong>strongly</strong> request that you try to avoid using source mode, as it's very easy to wind up with content that doesn't match our style guide or, worse, doesn't work right at all. Currently, though, the editor has some quirks that make it impossible to do certain things without resorting to source mode.</dd> - <dt> - Save and keep editing</dt> - <dd> - A duplicate for the main "Save and keep editing" button.</dd> - <dt> - Save and exit</dt> - <dd> - Just like the main "Save changes" button.</dd> - <dt> - Paste as plain text</dt> - <dd> - Opens a dialog into which you can paste text; the text has all styling stripped from it so that you don't inadvertently introduce unwanted styles into the site content. Once you've pasted your text, you can (optionally) make changes, then click a button to insert it into the article you're working on.</dd> -</dl> -<div class="note"> - <p><strong>Note:</strong> When pasting content into MDN, please be aware that if pasting styled content (including, for example, syntax highlighting in code being copied from another site) that you may be bringing along unwanted and unneeded additional styles or classes. Please be careful not to do this; if necessary, review your edit in source mode to remove these unnecessary styles and classes (or check it before pasting, or use the "Paste as plain text" option instead).</p> -</div> -<dl> - <dt> - Paste from Word</dt> - <dd> - On Windows, lets you paste text from Microsoft Word and have it adjusted to work reasonably well in MDN's wiki. We prefer for you to not use this (the results will work but are not typically style guide compliant), but it's there for a few teams that need it.</dd> - <dt> - Check spelling</dt> - <dd> - Starts the spell checker.</dd> - <dt> - Spell check as you type</dt> - <dd> - Presents a submenu that lets you control and configure the as-you-type spell checker.</dd> - <dt> - Find</dt> - <dd> - Opens the Find panel in "Find" mode, which lets you search your document for a specified string.</dd> - <dt> - Replace</dt> - <dd> - Opens the Find panel in "Find and replace" mode, allowing you to find strings and replace them with new ones.</dd> -</dl> -<p>It's worth noting that the Find and Replace buttons both take you to the same dialog box, which offers several configurable options for finding and optionally replacing text.</p> -<h3 id="Block-level_options">Block-level options</h3> -<p>These buttons provide options affecting or creating blocks in your article.</p> -<dl> - <dt> - Insert/remove bulleted list</dt> - <dd> - Creates or removes a bulleted list from your article. Once you're working in a bulleted list, each time you press return, you will start a new bullet. The tab key can be used to indent a level, and shift-tab will outdent a level. Pressing return on an empty bullet will exit bullet list mode. Right-clicking on the list lets you choose to edit the list's properties (specifically, the shapes of the bullets).</dd> - <dt> - Insert/remove numbered list</dt> - <dd> - Creates or removes a numbered list from your article. Once you're working in a numbered list, each time you press return, you will start a new bullet. The tab key can be used to indent a level, and shift-tab will outdent a level. Pressing return on an empty bullet will exit numbered list mode. Right-clicking the list offers the option to open the properties dialog for the list; the properties include the style of the numbers (numbers, letters, Roman numerals, etc, and what number to start with).</dd> - <dt> - Definition list</dt> - <dd> - Creates a new definition list. Definition lists consist of a series of titles and definitions (this list you're reading right now is an example).</dd> - <dt> - Definition title</dt> - <dd> - Creates a new title in a definition list. If you're not already editing a definition list, a new one is created for you. Pressing return after entering a definition title automatically starts you editing a definition description.</dd> - <dt> - Definition description</dt> - <dd> - Creates a new description in a definition list. Pressing return on a description line automatically starts a new title. Pressing return twice will exit definition list mode.</dd> - <dt> - Decrease indent</dt> - <dd> - Shifts the indentation level to the left once; this is the same as shift-tab while in a list.</dd> - <dt> - Increase indent</dt> - <dd> - Shifts the indentation level to the right once; this is the same as tab while in a list.</dd> - <dt> - Blockquote</dt> - <dd> - Inserts a blockquote. <strong>Please do not use this</strong>. Blockquotes are not part of our standard style guide, and this button will be removed in the near future.</dd> - <dt> - Image</dt> - <dd> - Inserts a new image into the article. See {{anch("Adding images to an article")}} below for details on how to use this option.</dd> - <dt> - Table</dt> - <dd> - Inserts a table into the article. See {{anch("Working with tables")}} for more information on tables in articles.</dd> - <dt> - Text color</dt> - <dd> - Lets you set the text foreground color. <strong>Please do not use this.</strong> We will switch to using CSS styles for all coloring soon.</dd> - <dt> - Background color</dt> - <dd> - Lets you set the text background color. <strong>Please do not use this.</strong> We will switch to using CSS styles for all coloring soon.</dd> - <dt> - Text direction left-to-right</dt> - <dd> - Sets LTR as the current text typing direction. Used only when covering localization/internationalization topics.</dd> - <dt> - Text direction right-to-left</dt> - <dd> - Sets RTL as the current text typing direction. Used only when covering localization/internationalization topics.</dd> -</dl> -<h3 id="Maximize">Maximize</h3> -<p>This is an odd box, in that it consists of just one button: Maximize. This button causes the editor interface (that is, the toolbar and the edit box) to take over your entire browser window, giving you as much space as possible to write.</p> -<h3 id="Headings">Headings</h3> -<p>The heading buttons let you insert a heading. Click one of these buttons to create a new heading at the corresponding depth. By default, H2 through H4 are included in the table of contents, but you can change this, as described in {{anch("The page info box")}}.</p> -<h3 id="Formatting_styles">Formatting styles</h3> -<p>The next box is a drop-down menu offering a selection of special formatting options. These are:</p> -<dl> - <dt> - None</dt> - <dd> - Removes all styling from the current block.</dd> - <dt> - Note box</dt> - <dd> - Creates a note box, as seen below. You should always start a note box with "<strong>Note:</strong>" in bold letters.</dd> -</dl> -<div class="note"> - <p><strong>Note:</strong> This is a note box.</p> -</div> -<dl> - <dt> - Warning box</dt> - <dd> - Creates a warning box, as seen below. These should always begin with "<strong>Warning:</strong>" in bold letters.</dd> -</dl> -<div class="warning"> - <p><strong>Warning:</strong> This is a warning box.</p> -</div> -<pre class="syntaxbox notranslate">foo = bar()</pre> -<dl> - <dt> - Callout box</dt> - <dd> - Creates a new callout box. We are phasing this kind of box out in favor of a new design, <strong>so it shouldn't be used</strong> for new content.</dd> - <dt> - Two columns</dt> - <dd> - Makes the selected text or the current block two columns instead of one, on browsers that support it.</dd> - <dt> - Three columns</dt> - <dd> - Makes the selected text or the current block three columns instead of one, on browsers that support it.</dd> - <dt> - Syntax box</dt> - <dd> - Creates a syntax box, such as the one shown below. You need to use the "PRE" button as well, to create a {{HTMLElement("pre")}} block inside it. You probably won't see the yellow box until you do.</dd> - <dt> - Right sidebar</dt> - <dd> - <div class="standardSidebar" style="text-align: center;"> - <strong>Special note</strong><br> - This is a right sidebar.</div> - Creates a light grey sidebar that floats to the right of content. You may enter small amounts of text in these boxes to draw special attention to them.</dd> - <dt> - SEO summary</dt> - <dd> - This special style is used to indicate a sentence or two that should be used as the article's summary for SEO purposes. It's also used by macros that automatically construct landing pages. If you don't specify this, MDN automatically uses the first paragraph of your article, but sometimes that's not the optimal text (or it's too much text), so this lets you override that.</dd> -</dl> -<h3 id="Code_samples_and_redirects">Code samples and redirects</h3> -<p>These buttons are mostly used for providing preformatted text (usually code samples), but our "insert redirect" button is, for some reason, here too.</p> -<dl> - <dt> - PRE</dt> - <dd> - Inserts a {{HTMLElement("pre")}} (preformatted text) block, or turns the current block into one. All code samples or examples of text output to a terminal should be in one of these blocks.</dd> - <dt> - Syntax highlighter</dt> - <dd> - The syntax highlighter lets you choose a language for which to apply syntax highlighting to the{{HTMLElement("pre")}} (preformatted text) block; if you're not already in such a block, this will create one for you. Simply choose the language and you're good to go.</dd> - <dt> - Insert code sample template</dt> - <dd> - This button is used by the live sample system to help you quickly insert a new live sample. You don't need to use it, but it's there for convenience. See {{anch("Using the live sample system")}} for details on using this and other live sample features.</dd> - <dt> - Insert code sample iframe</dt> - <dd> - Inserts an {{HTMLElement("iframe")}} into the document, displaying a given live sample. See {{anch("Using the live sample system")}} for details on using this and other live sample features.</dd> - <dt> - Create a redirect</dt> - <dd> - Inserts a redirect. See {{anch("Creating redirects")}} for further information.</dd> -</dl> -<h3 id="Inline_styles_and_links">Inline styles and links</h3> -<p>The final group of toolbar buttons includes options for creating and maintaining links and anchors, as well as for applying inline styles to content.</p> -<dl> - <dt> - Link</dt> - <dd> - Creates a new link. This button opens the link editor dialog, which is covered under {{anch("Creating and editing links")}} below.</dd> - <dt> - Unlink</dt> - <dd> - Removes the link at the insertion point.</dd> - <dt> - Anchor</dt> - <dd> - Creates an anchor at the insertion point.</dd> - <dt> - Bold</dt> - <dd> - Toggles boldface text mode.</dd> - <dt> - Italic</dt> - <dd> - Toggles italic text mode.</dd> - <dt> - Underline</dt> - <dd> - Toggles underlined text mode.</dd> - <dt> - Code</dt> - <dd> - Toggles {{HTMLElement("code")}} mode. This is used for inline presentation of variable names, function names, object names, filenames, and so forth.</dd> - <dt> - Strike through</dt> - <dd> - Toggles strikethrough mode.</dd> - <dt> - Superscript</dt> - <dd> - Toggles superscript mode. Please note that we don't use footnotes on MDN, so you should rarely if ever need this button.</dd> - <dt> - Remove format</dt> - <dd> - Removes the current formatting from the selection.</dd> - <dt> - Align left</dt> - <dd> - Makes the current block left-aligned. <strong>Please do not use this.</strong> We will be using CSS styles for all alignment tasks starting very soon.</dd> - <dt> - Center</dt> - <dd> - Centers the current block. <strong>Please do not use this.</strong> We will be using CSS styles for all alignment tasks starting very soon.</dd> - <dt> - Align right</dt> - <dd> - Makes the current block right-aligned. <strong>Please do not use this.</strong> We will be using CSS styles for all alignment tasks starting very soon.</dd> -</dl> -<h2 id="The_edit_box">The edit box</h2> -<p>The edit box is, of course, where you actually do your writing. Right-clicking in the edito box will offer appropriate additional options depending on the context of your click; clicking in a table will offer table-related options and clicking in a list will offer list-related options, for example.</p> -<h2 id="The_revision_comment_box">The revision comment box</h2> -<p>After you've made your changes, it's strongly recommended you add a comment to your revision. This is displayed in the revision history for the page, as well as on the <a href="/en-US/dashboards/revisions" title="/en-US/dashboards/revisions">Revision Dashboard</a>. It helps to explain or justify your changes to others that may review your work later. To add a revision comment, simply type the note into the revision comment box before clicking either of the save buttons at the top of the page.</p> -<div class="note"> - <p><strong>Note:</strong> We know that the revision comment box being so far away from the save buttons doesn't make any sense. We're working on design changes that will fix that.</p> -</div> -<h2 id="The_tags_box">The tags box</h2> -<p>Page tags help categorize and organize information, and help us identify pages that need special attention. Tags are also used to mark pages that are obsolete and may need to be deprecated or even deleted. It's incredibly useful to have good, clean tags on pages, so be sure to have good tags on articles you contribute to.</p> -<p>The tag box is near the bottom of the editor page, and looks like this:</p> -<p><img alt="The tag editing box showing three tags." height="80" src="https://mdn.mozillademos.org/files/5291/tagbox1.png" width="785"></p> -<h3 id="Adding_a_tag">Adding a tag</h3> -<p>To add a new tag, simply click in the box and start typing:</p> -<p><img alt="Screen thot: the tag box after typing a new tag but before pressing Enter." height="74" src="https://mdn.mozillademos.org/files/5293/newtag-beforereturn.png" width="784"></p> -<p>Here we see the three already existing tags (as button-like objects) and our new tag as unadorned text. When we press <kbd>Enter</kbd> or <kbd>Tab</kbd> key (or comma), the new tag is committed to the list, and the list looks like this:</p> -<p><img alt="Screen shot: the tag box with our new tag in place." height="81" src="https://mdn.mozillademos.org/files/5295/newtag-afterreturn.png" width="784"></p> -<p>For a list of recommended tags, as well as a usage guide for specific tags, please see <a href="/en-US/docs/Project:MDN/Contributing/Tagging_standards">MDN tagging standards</a>.</p> -<h3 id="Removing_a_tag">Removing a tag</h3> -<p>There are two ways to remove a tag: you can click on the "x" icon next to its name in its button, or you can click to its right in the editor box and press the delete key on your keyboard.</p> -<h3 id="Committing_your_changes">Committing your changes</h3> -<p>Your changes are not saved unless you click one of the save buttons at the top of the editor window. Scroll back to the top of the window if you don't see the buttons, then click one of the two green save buttons. Now your change has been committed.</p> -<h2 id="The_reviews_box">The reviews box</h2> -<p>MDN uses <strong>reviews</strong> to try to monitor and improve the quality of its content. This works by setting a flag on an article indicating that a review is needed. You can learn more about <a href="/en-US/docs/MDN/Contribute/Howto/Do_a_technical_review" title="/en-US/docs/Project:MDN/Contributing/How_to_help#Content_reviews">technical reviews</a> and <a href="/en-US/docs/MDN/Contribute/Howto/Do_an_editorial_review">editorial review</a> in the <a href="/en-US/docs/MDN/Contribute/Howto" title="/en-US/docs/Project:MDN/Contributing/How_to_help">How to</a> guides.</p> -<p>To request a review on the article you've worked on, simply toggle on the checkbox next to the type of review that's needed. Technical reviews should be requested any time you make changes to the explanation of how something technical works, while editorial reviews are a good idea when you've made changes and would like someone to review your writing and style choices.</p> -<p>Be sure to click one of the save buttons after making your selections, to commit your review request.</p> -<h2 id="The_attachments_box">The attachments box</h2> -<p>The attachments box lets you upload files to MDN for use in MDN content, as well as see what files are being used by the current document.</p> -<div class="note"> - <p><strong>Note:</strong> Due to a quirk in our current implementation, files are not associated with pages unless they're actually used in the page. So if you upload an attachment and don't make use of it before you save the article, it will not appear on the attachments list. So be sure to link to it or embed the image right away.</p> -</div> -<p>To add an attachment to the page, simply click the "Attach Files" button; this expands the attachment box to look like this:</p> -<p><img alt="" src="https://mdn.mozillademos.org/files/5321/attachments-empty.png" style="width: 600px; height: 114px;"></p> -<p>As you see, there's a table that lets you select a file to upload, then give it a title and, optionally, a description and an additional comment. The title is mandatory, and should describe the file so its usage context is understandable. Once the fields are filled out and you've selected your file, click the "Upload" button to send it to MDN.</p> -<div class="note"> - <p><strong>Note:</strong> Only a select few types of files are permitted as attachments on MDN: GIF, JPEG, PNG, SVG, and HTML. Photoshop images are permitted but should be avoided except in very specific cases. Any other file types will not be allowed by the upload form.</p> -</div> -<p>Feel free to <a href="/en-US/docs/Project:MDN/Contributing/Editor_guide$edit" title="/en-US/docs/Project:MDN/Contributing/Editor_guide$edit">open this page in the editor</a> and look at its attachment list at the bottom to get a feel for it.</p> -<p>Once a file has been attached, it will appear (by its title, as you specified in the form) in the image properties dialog box when using images in your article. See {{anch("Adding images to an article")}} for details on this interface. To link to other types of files, copy the URL from the attachments box and use that as your link target when adding links to the page using the link button in the toolbar.</p> -<h2 id="Keyboard_shortcuts">Keyboard shortcuts</h2> -<p>There are a number of convenient keyboard shortcuts available to help you avoid taking your hands off the keyboard while you work. The shortcuts are listed for Windows and Linux; on Mac, instead of using the Control key, you can use the Command key.</p> -<table class="standard-table" style="max-width: 45em;"> - <tbody> - <tr> - <th>Shortcut</th> - <th>Description</th> - </tr> - <tr> - <td>Ctrl-A</td> - <td>Select all</td> - </tr> - <tr> - <td>Ctrl-C</td> - <td>Copy to clipboard</td> - </tr> - <tr> - <td>Ctrl-V</td> - <td>Paste from clipboard</td> - </tr> - <tr> - <td>Ctrl-X</td> - <td>Cut</td> - </tr> - <tr> - <td>Ctrl-Z</td> - <td>Undo</td> - </tr> - <tr> - <td>Ctrl-Y</td> - <td>Redo</td> - </tr> - <tr> - <td>Ctrl-K</td> - <td>Open link editor</td> - </tr> - <tr> - <td>Ctrl-B</td> - <td>Bold</td> - </tr> - <tr> - <td>Ctrl-I</td> - <td>Italic</td> - </tr> - <tr> - <td>Ctrl-O</td> - <td>Toggle <code><code></code> style.</td> - </tr> - <tr> - <td>Ctrl-Shift-O</td> - <td>Toggle source view mode.</td> - </tr> - <tr> - <td>Ctrl-P</td> - <td>Toggles the <code><pre></code> style on the current block.</td> - </tr> - <tr> - <td>Ctrl-U</td> - <td>Underline</td> - </tr> - <tr> - <td>Ctrl-S</td> - <td>Save changes and close the editor</td> - </tr> - <tr> - <td>Ctrl-Shift-S</td> - <td>Save changes without closing the editor</td> - </tr> - <tr> - <td>Ctrl-2 through Ctrl-6</td> - <td>Select header level 2-6</td> - </tr> - <tr> - <td>Ctrl-Shift-L</td> - <td>Toggles between bulleted list, numbered list, and paragraph format</td> - </tr> - <tr> - <td>Tab</td> - <td>Increases indent level if in indent mode, otherwise inserts two spaces as a tab. Inside tables, this jumps to the next cell, or inserts a new row if there is no next cell. If the cursor is currently in the page title or in a header, the cursor jumps to the next paragraph.</td> - </tr> - <tr> - <td>Shift-Tab</td> - <td>Decreases indent level if in indent mode. Inside tables, this jumps to the previous cell, or inserts a new row if there is no previous cell. If the cursor is currently in the page title or in a header, the cursor jumps to the next paragraph.</td> - </tr> - <tr> - <td>Shift-Space</td> - <td>Inserts a non-breaking space (<code>&nbsp;</code>)</td> - </tr> - <tr> - <td>Shift-Enter</td> - <td> - <p>Exits out of the current block. For example, if you're currently editing a<code> <pre> </code>block, shift-Enter exits the block, putting you back in the body of the article.</p> - <div class="note style-wrap"> - <p><strong>Note:</strong> Not currently implemented; see {{bug(780055)}}.</p> - </div> - </td> - </tr> - </tbody> -</table> -<h6 id="EditorGuideQuicklinks">{{EditorGuideQuicklinks}}<span id="cke_bm_73C" style="display: none;"> </span></h6> |