Jump to content

Manual:節単位の編集

From mediawiki.org
This page is a translated version of the page Manual:Section editing and the translation is 41% complete.

節単位の編集とは、節見出しの横にある「編集」 (または「ソースを編集」) のリンクをクリックすることで、ページ上の特定の節を編集することです。

This page is for the technical details of section editing and how to configure it. See Help:節 for the end-user documentation about the feature.

Existing sections

When editing a section in the source editor, the URL contains section=n where n is an integer index to the section being edited. These are counted from 0 (but see #Lead section below for more about section 0). If you try to edit a section number that doesn't exist, you'll get an error message.

When editing a section, the edit summary field is pre-populated with a special section indicator, such as /* Existing sections */, which will be turned into a link when it's viewed in page history, diffs, etc.

When opening a section for editing in the VisualEditor , the whole page is opened for editing. The main difference between this and editing the whole page is that the edit summary is still pre-populated with the section name.

New sections

It is possible to create a new section at the end of a page by adding section=new to the URL. This opens the normal editing form, with an additional text field above the page textbox (labelled 'Subject:'), into which the section title can be entered.

In addition, the normal edit summary field is hidden. It's not possible to add an edit summary when adding a new section, because the section title will be used (in fact, the 'Subject:' and 'Summary (?):' fields are internally the same). The phrase 'New section' will be added to the generated edited summary.

If the DiscussionTools extension is installed, adding a new section will not open the page editing form but instead direct you to a new comment form at the bottom of the page.

Lead section

Page content that is before the beginning of the first section is called the "lead section" or "section zero". It can not be edited directly via the UI in most skins, but it is possible to manually change the edit URL to include section=0. Various Gadgets exist to make this easier, such as the edittop gadget.

Right-click to edit

The 節見出しの右クリックで節を編集できるようにする user preference (editsectiononrightclick, "0" by default) allows users to edit a section by right-clicking on the section heading. This feature requires JavaScript to be enabled.

制限

  • Extension:Popups ページ プレビュー機能では、Extension:Translate を使用している場合に翻訳単位に干渉する可能性のある導入節の一部のみが表示されることがあります。
  • 編集可能な部分の前後にコンテンツがないと、表現や書式を選ぶのがより難しくなる場合があります。

節リンクの有効化/無効化

節単位の編集は MediaWiki の既定の機能ですが、以下に説明するように、いくつかの方法で無効化できます。 無効化は、見出しがテンプレート内で作成 されている場合に特に有効です: 通常のウィキの節単位編集は、この場合、テンプレート コードを編集しますが、これは通常、利用者にとっては直感的ではありません。

Historical note: In MediaWiki 1.23 and earlier there was a user preference for disabling the section editing links. This was removed with T54811.

Site or user stylesheets

It is possible to use the global or personal stylesheets to remove the section editing links. The following CSS shoulg be added to MediaWiki:Common.css or Special:MyPage/common.css:

.mw-editsection {
    display:none !important;
}

マジックワード

マジック ワード __NOEDITSECTION__ を使用すると、特定のページ上のすべての節単位編集リンクを非表示にできます。

このマジック ワードは参照読み込み可能であり、テンプレートに埋め込むことで、そのテンプレートが使用されているすべてのページで節単位編集を無効化できます。

CSS

In Vector and other skins, the section link has the following CSS class:

.mw-editsection