Skip to content
D
Documentation

Create and edit an article

task
5 min readUpdated

Create or edit an article

An article is a post that you create in the editor and then open on its article page. The article editor is the form for entering or revising its title, description, body, and tags. Use the blank editor to create an article, or open an article that you own to change it. Selecting Publish Article sends either a create request or an update request, depending on which editor route you opened.

If you need to…Go to
Create a new articleOpen the editor, then follow Enter article details and publish.
Change an article you ownOpen the editor, then follow Handle create, edit, and tag variations.
Read the article after publishingRead an article.
Use the article's other actionsArticle workspace and Article actions reference.

Before you start

Both editor routes require you to be signed in. For an existing article, the editor loads the article and the current user, then fills the form only when that user is the article's author.

Prerequisites

Before you beginWhat to have ready
Sign-inAn authenticated session.
New articleThe title, short description, article text, and any tags you want to add.
Existing articleAn article that you own.
Existing article valuesThe article's saved title, description, body, and tags appear in the editor when the ownership check succeeds.

The new editor starts its title, description, and body controls with empty strings. The tag input also starts empty.

Open the editor

Use the new-article link for a blank form. Use an article's Edit Article link when you want to revise an article you own.

Steps

  1. Select the link for the work you need.

    If you need to…Select
    Create a new articleNew Article
    Revise an article you ownEdit Article

Result: The article editor opens with the four article inputs and Publish Article.

Understand the editor

The editor contains three article-content controls, one tag input, a tag list, and Publish Article. The first three controls hold the article itself; the tag input adds labels that appear with it.

AreaWhat you use it forWhat you see
TitleEnter the article title.Article Title
DescriptionEnter the article's short description.What's this article about?
BodyEnter the article text in Markdown.Write your article (in markdown)
TagsAdd article tags.Enter tags
PublicationSubmit the new or changed article.Publish Article

The four inputs have no required marker declared for them. To add a tag, enter it in Enter tags and press Enter. A tag already in the list, or a tag containing only spaces, is not added. Each tag in the tag list has an icon before its tag text; selecting that icon removes the tag.

While submission is in progress, the editor's form controls are disabled. This includes the article inputs, the tag input, and Publish Article.

Enter article details and publish

Enter the article's identifying text first, then its body and tags. Publishing uses the same control for both routes: the new-article route creates an article, while the edit route updates the article loaded by that route.

Prerequisites

  • You are signed in.
  • The editor is open.
  • For an edit, the loaded article belongs to you.

Steps

  1. In Article Title, enter the title.

  2. In What's this article about?, enter the short description.

  3. In Write your article (in markdown), enter the article text.

  4. In Enter tags, enter a tag.

  5. Press Enter to add the tag to the tag list.

  6. Repeat steps 4 and 5 for each tag you want to add.

  7. Select Publish Article.

    Editor routeWhat the control submits
    New-article routeA new article without an article identifier.
    Edit routeAn update containing the loaded article's route identifier.

Result: After a successful create or update request, the application navigates to the article route for the submitted article.

Handle create, edit, and tag variations

The editor chooses between creating and updating from the route. A new-article route has no article identifier, while an edit route has an article identifier and loads the existing article before filling the form. The edit form also loads the article's saved tag list when the ownership check succeeds.

If you are…Use this behaviour
Creating an articleStart with the new-article route; Publish Article calls the create path.
Editing your articleStart from Edit Article; Publish Article calls the update path.
Adding a new tagEnter a nonblank tag that is not already in the list, then press Enter; the input clears.
Re-entering an existing tagThe duplicate is ignored.
Entering only spacesThe blank tag is ignored.
Removing a tagSelect the icon beside that tag.
Editing an article you do not ownThe application returns you to the home page.

Steps

  1. For an existing article, review the saved values in Article Title, What's this article about?, and Write your article (in markdown) before you edit them.
  2. In Enter tags, enter a nonblank tag that is not already listed.
  3. Press Enter to add the tag.
  4. Select the removal icon beside a listed tag when you want to remove it.

Result: The tag list contains each accepted tag once, and removed tags no longer appear in the list.

When submission goes wrong

Prerequisites

  • An error is displayed above the form.

Steps

  1. Read the displayed error.
  2. Correct the related information in Article Title, What's this article about?, Write your article (in markdown), or Enter tags.
  3. Select Publish Article again.
  4. When the form becomes available, read the displayed error again if it remains.

Result: The form becomes available again after the submission finishes.

Know what happens next

After a successful create or update, the editor opens the submitted article at its article route. Continue there to read the article or use its article actions.

Result: The submitted article page is open.

Continue with Read an article, Article workspace, or Article actions reference.

Was this page helpful?

Download as PDF
Create and edit an article — Conduit (Angular)