Element block
The element block that appears for a selected element or its ancestors provides information about the element and gives access to operations centred upon it.
Web pages are text files that have a structure defined by specially-formatted text (HTML) that tells the browser what type of element to show the text within them as. Most HTML editors have a mode that shows all the text of the page, but also a mode that allows the elements to be manipulated separately. However, the whole page structure is exposed for editing at each session, meaning that one wrong character can break the page, and it may not always be easy to identify where the error occurred.
Smallsite Design is different in that once an element has been created, it is never converted back to markup for editing as part of its parent element or the page. This ensures the stability of the page structure while elements in it can have errors. Conversely, a parent element can be edited, possibly resulting in errors, without breaking descendant elements. The objective of this system is stability of the page structure, much like the objective for the site is stability of its structure.
To ensure consistency of dealing with each element, no matter what its level in the page hierarchy, while also catering for its differences, the element block is provided. For the current element, it provides a rich amount of information and actions that can be performed. If a descendent is current, it becomes more rudimentary, providing limited status information and some basic actions. No element blocks are shown for those element not current or in the path to it, making those elements appear basically as they would on the released page.
Layout△
The element block displays a lot of information about its element.
# | Area | Description |
---|---|---|
a | Element type | Type of element. If automatically disabled, it will be red with a red strike through it, like |
b | Attributes | Current values of element attributes along with ability to select new values after clicking the 👇 checkbox. Only shown if current |
c | Actions | Actions available for the element, depending upon the type of element. Only shown if current |
d | Multi-delete | Delete multiple checked child elements. Only shown if JavaScript is enabled (browser default) and the element is current |
e | Append | Jumps to the possible child elements to append. Only shown if current |
f | Navigation bar | Child |
g | Child elements | List of child elements along with their Action bars. Only shown if current |
h | Action bar | Docked Action bar |
i | Insert | Jumps to the possible sibling elements to insert after the current one. Only shown if current |
j | Action bar | Floating Action bar. Only shown for child elements of the current element |
k | Borders | Border that changes colour and thickness depending whether the element has errors or is current. See Borders |
l | Element | Element itself, with dotted red border to indicate that it is current. |
- a.Will be standalone before the element for most block elements.
- b.For inline,
introduction ,footnote , orsequence andtable descendants, will be embedded in their parent block. - c.If embedded and current, it will be the only one shown within its parent.
- d.For a rich-text element, will only list its inline or
footnote children.
Embedding can sometimes be a couple deep, so ensure you are working on the element you intend. For example, after working on a
Additional information△
Some elements have additional information after the child status.
# | Elements | Example | Description |
---|---|---|---|
a | Rich-text | #: 225 | Total number of characters, excluding footnotes |
b | Figure, table, list | Prefix: f01 | Prefix for Linking to figures |
c | question option | ✓ | The option that has the correct answer |
d | question | ℹ | The question has an Informatio |
e | block quote, citation quote, subquote | de-de ltr | Locale and direction, if specified |
Multi-delete△
If JavaScript is enabled, multiple child blocks of a block element can be deleted in one operation.
Clicking the
The
If wanting to delete a child of the current element, hover over the start of the child element to delete, check its checkbox in its hover button, then click the
Action bar△
The end of the top line of the element block contains some action and status symbols, though some items might be shown on a floating bar for some child elements of the current element.
# | Symbol | Action taken |
---|---|---|
1 | ✎ | Jump to sole inline. Only for a rich text element with only one inline child |
2 | ✚ | Insert another new element of the same type after current one. Only shown for the master locale, and if allowed and more elements can be added |
3 | ⧉ | Clone the content of the previous locale in the hierarchy. Only shown for non-master locales for rich-text elements with no inline children in the locale |
4 | ☑ | Manually toggle element visibility. Only for block elements, though not all. Only shown for the master locale |
5 | ◤ | Jump to the parent element to make it current |
6 | ℹ | Link to online help documentation describing the element |
# | Symbol | Indicates | Disabled |
---|---|---|---|
1 | $ | Itself or descendants have an incorrect number of characters | Yes |
2 | ? | Itself or descendants are missing master locale text | Yes |
3 | & | Itself or descendants are missing a required file, or point to a disabled file | Yes |
4 | # | Itself or descendants have incorrect numbers of child blocks | Yes |
5 | @ | Element-specific errors, such as missing | Yes |
6 | ! | Some descendants are manually disabled | No |
7 | ʘ | Itself or descendants have review text | No |
# | Elements | Indicates |
---|---|---|
1 | link | Missing the target page |
2 | Missing the target email address, subject or body | |
3 | Row, Footer | No non-empty, non-heading cells |
4 | Button | Missing |
5 | Question | No correct option |
6 | Entry, Section / | Previous element at the same level has the same |
- a.Symbols for the current element will be larger.
- b.Symbols will only be red for errors in the current element.
- c.The ʘ is only larger for the current element and locale.
- d.While the ! does not indicate an error in itself, it may force their parent to be disabled if it has insufficient children, showing up as a #
- e.Only block elements can be disabled, either manually in the master locale, or automatically for any error in any locale.
- f.Review comments will be automatically deleted during release processing.
Note that a single error can lead to several symbols appearing due to the upward cascading of errors, which enables visibility at the topmost element. See Visibility status for which errors force elements to be disabled, and Troublesho
Review comments are automatically stripped when making the release, as they are supposed to have all been actioned, are not required in a release, and if left would be included in every WIP leading to the next release. However, if wanting to keep the review comments, perhaps because they make some suggestions that cannot be implemented in the current release cycle, submit some text without changes to create a duplicate WIP. On the
Attributes△
Some elements have attribute values that can be selected from a set of options.
While most attributes only require a single click on an option, some, like for the
Some complex elements with structures defined by attributes, like tables or lists, can have that attribute value combination saved as a default. With such elements, if there is an
Direction△
Some elements have a Direction attribute to ensure their rendering direction.
# | Option | Description |
---|---|---|
a | Page | The element uses the direction the page uses, which is defined by the script used. Not available for the |
b | Master | The element uses the direction the master locale uses, which is defined by the script used |
c | Left to right | The element renders its text or elements in the left-to-right direction |
d | Right to left | The element renders its text or elements in the right-to-left direction |
The Master option is useful when cloning Rich-text content in a multi-locale site because if all locales will follow the direction of the master, the Inline elements in non-master locales with reading direction opposite to that of the master will not have to have their
While the text in most of these elements will render in the direction chosen, but conditioned by the browser according to the directional characteristics of the text used, the
The media icon and marker elements also have a
Actions△
Several actions can be performed on an element.
# | Action | Description |
---|---|---|
1 | To ☐ | Checking the box exposes a jump list table of all the possible parent elements that the current element can be moved to be the last child of. See To for details. Only for block elements, and not shown if no target parents or no spare group siblings |
2 | Delete | Delete the element. Only shown if deletable and there are spare group siblings |
3 | Clone | Add a clone of the current element after it. Only shown if cloneable, if there is a |
4 | △ | Link back to element name. Placed after each line for quick keyboard-based navigation |
5 | Correct | Mark a |
6 | Merge | Merge the contents of the next sibling with this element. Only shown for an inline element, and where the sibling element is the same type and has the same attribute values |
7 | 10▲ | Move up 10, continuing from the bottom if the top is reached. Only shown if movable and more than 10 group siblings |
8 | 3▲ | Move up 3, continuing from the bottom if the top is reached. Only shown if movable and more than 3 group siblings |
9 | 1▲ | Move up 1, or to the bottom if already at the top. Only shown if movable and more than 1 group sibling |
10 | 1▼ | Move down 1, or to the top if already at the bottom. Only shown if movable and more than 1 group sibling |
11 | 3▼ | Move down 3, continuing from the top if the bottom is reached. Only shown if movable and more than 3 group siblings |
12 | 10▼ | Move down 10, continuing from the top if the bottom is reached. Only shown if movable and more than 10 group siblings |
13 | 1|0 | Spike number | number of items. Add a copy of the element to the spike with the first number. Only shown if allowed to be spiked and there is spare space on the spike |
14 | Unwrap | Place copies of all spikeable child elements on spike 3. Only shown if spike 3 is empty |
If some action is not available, it will be because it is not allowed in the current context. For example,
Some actions, like
It is for keyboard users that the up links (△) are provided every few buttons in the
Append / insert△
Selecting an element exposes lists of the elements that can be appended to it and those that can be inserted after it.
Clicking the
For example,
Clicking the
The
If the upper limit for the number of elements in a group for an element has already been reached, no elements for that group will be listed under the
Some group limits are very strict for practical reasons, like the group for an
Child navigation bar△
If there are more than five children for an element, a navigation bar is displayed for them.
Positions for disabled children without errors are displayed like 3. If the child has errors, its position will be displayed with a double red underline instead. The basic navigation bar allows getting to or near a required child, but including links to the disabled children makes it easier to Troublesho
If there are 15 or more children and no errors, the checkbox will be unchecked. This is to reduce the number of keys to be pressed for those using a keyboard when navigating through the current element.
Editing text△
All text editing for an element in the body of an article is done in a element block.
# | Area | Description |
---|---|---|
a | Text | Text being edited |
b | Elements | Link to the |
c | Extender | Corner to drag down to increase the height of the editing area |
d | Start | Start indicator of the text being edited |
e | End | End indicator of the text being edited |
The
Paragraphs for entry purposes are separated by the
While entering text into a multiline textarea, if JavaScript is enabled (browser default), the editing box will expand to show all the text up to a maximum of 30% of the screen height or 300 pixels, whichever is smaller. If JavaScript is not enabled, use the extender in the bottom end corner if wanting to make the area extend further down, though some browsers may not have one.
If JavaScript is enabled, after submitting text, the cursor will be at the end of the text, ready for more typing. This will enable saving the text more often as it eliminates navigating to the end of the text each time.
For some types of input, like URLs, only one line of text is allowed, even though much more is allowed than is visible, and is how they are designed. Aim to cut-and-paste into such fields rather than type into them.
Pasted or dropped text will be inserted as plain text. Any control codes, like tabs or table cell separators, will be removed when submitted. In any field, all characters are monospaced, and will usually be larger, for easier editing. Some characters, like the different dash types, might be indistinguishable, but will appear correctly in the rendered text below the element block.
Many of the character sequences used for inserting elements or special characters inline use ASCII letters and symbols that may not be readily available on some non-English keyboards. To type these in, use a US English onscreen keyboard.
Sanitisation△
Sanitisation is the filtering out of characters in inputs that could be used maliciously.
- a.Programming tags, like
<script>alert('Hello');</script>
. - b.Starting and ending -s,
_
s and spaces, except for the text element. - c.Final full stops (.), though they are added back in some situations if no other final punctuation exists.
- d.Any sequence of three or more |.
- e.Backslashes (
\
). - f.Control characters.
Text entered in inline elements within program line and code elements do not have visible characters substituted or filtered out as they may be valid in programs. Outside of elements, such filtering and substitutions are universally applied to all text input. Text entered for URL fields will not have any dash substitutions.
Inline insert△
Elements can be inserted inline using special formatting characters.
The format is ~element~text~^, where element is the element code (first listed) or its character (second), and text is the content. For example, ~g~strong~^ creates strong, where g is the character that is the short form for the strong code. This format is shown above the list, along with some special character combinations that insert non-text items like a break (@^), site value (#^) or icon (%^). The
Multiple elements can be inserted in this way at the same time. If all the text in a field is included, the required element completely replaces the current one rather than being inserted in between its children. Other than the text element which has a maximum character limit of 600, all other inline elements have substantially less. That means that inserting multiple elements may exceed the current element's maximum, in which case do each insert with a single - character, such as ~c~-~^ for a citation, and edit them after they are created. Otherwise, insert the required element as is required for blocks.
All elements inserted are individually sanitised. Each block of text of the enclosing element that was before, between or after them are re-sanitised. That means that any ending full stops, or illegal starting or ending characters, for each will now be removed. If wanting any of them reincluded, inline insert the required element type with just the wanted character. For example, to add a full stop at the end of a newly created
When creating a link, using a - for its text will result in the new element having no text. This is so that for an internal link, the text comes from the target headline|heading, or uses the URL itself for an external link. Note that the text version of the URL will potentially break at every 20 characters to ensure that it does not overflow its containing element.
When inserting inline into right-to-left text, as each character of the prefix (like ~a~) or suffix (~^) is being typed in, the automatic alignment rules of the browser might mix up the text in strange ways. Ignore those dynamic rearrangements and continue to type in the text in one go. When submitted, the element will be created correctly. Sometimes it may be better to cut out the text to be in the new element, create the new element with just a -, then paste the cut text over the - in the new element.
Inline rich text (IRT) elements do not have text of their own, but contain inline elements that do. Any elements created in the IRT using this method will also be children of it. Siblings of the IRT can be created by inserting inline into the text of an adjacent inline sibling, the standard insertion method after the current IRT, or appending to the IRT's parent.
Note that if wanting a ~ in the text, it cannot be put in as part of the format, but use another character to create the element, then edit its text. Also, when using the
Embedded characters△
While there are Unicode characters for soft-hyphens and direction, they are not visible in text being edited, so there are some character sequences that will be replaced by them when rendered.
# | Use | Text | Description |
---|---|---|---|
a | Soft hyphen | hs^ | Hyphen (-) that appears at the end of a line when a word is split at the character to continue on the next line |
b | Left-to-right direction | lr^ | Hidden hard direction character that forces following text to render left to right |
c | Right-to-left direction | rl^ | Hidden hard direction character that forces following text to render right to left |
If an element block field allows these codes, an
While most interface languages will use the standard soft hyphen (-), if Armenian (hy) or Mongolian (mn-mong) are selected, their own special soft hyphens will be used. However, these can be overridden on the
In phase notes, review text and heading and footer labels of tables, @^ can be inserted to be replaced by a break. This allows for special formatting or minimising the width of table columns where space is at a premium. If another column is set to Wide, a label might be forced to wrap at every word. Setting the
With Inline insert, merging inline elements with partial element insertion patterns will not create the element at that time, but merging inline elements with parts of these embedded character sequences will result in the sequence being substituted just prior to rendering the resultant element. If wanting to explicitly show such a character sequence, keep it split across two inline elements.
Reading direction△
When mixing language scripts with different reading direction, special characters are sometimes required to change direction.
Letters of a script tend to have a hard direction, which means when they are in a group together, they will show in the correct reading direction for their script. Punctuation and other symbols are neutral, in that they will follow the direction of the characters around them. However, when the direction of the text on either side of them is different, they will default to the direction of the element they are in, which is usually that of the script the page is in, but that may not be what is intended.
For example, Too late! translates into Arabic as بعد فوات الأوان!, which is incorrectly displayed in this left-to-right page, whereas the ! would correctly show to the left of the words on a right-to-left page. This is corrected for this left-to-right context by putting all the text into a direction element with
Note that because the ! was technically the last punctuation character of the paragraph above, normally no . would be added at the end by Smallsite Design, but it would look odd given the use of right-to-left text at the end. The . was added by appending it to the paragraph in its own text element. Just another consideration when mixing scripts.
When left to their own devices, mixed scripts can sometimes lead to a mess. For example, Phone: +1 234 567 890 translates into an Arabic right-to-left environment as هاتف: +1 234 567 890, where the reading direction of each number group is correct, but where they appear in the sequence is not consistent. However, the phone number should be all left-to-right, but it is shown as right-to-left for the sequence of groups though each group is left-to-right. In a rich text element, one correction for this is to put the whole telephone number in a direction element with its direction set to ltr, producing هاتف: +1 234 567 890.
Because the
For plain-text and rich-text fields, this situation can be corrected by putting a left-to-right direction character (by typing lr^) before the phone number's + on the start-side (right for Arabic) of it. This will render the full phone number correctly, but any Arabic text after it will render right-to-left because of the hard direction of its first character. This works because the hidden left-to-right character is hard, and forces all following neutral characters, like the + and the digits, to be the same, up until the hard right-to-left Arabic character.
It is best to avoid creating situations where scripts are mixed together, but some experimentation with the
Setting locale△
Some elements allow setting a locale so their contents are rendered according to that single locale, regardless of which locale it is viewed in.
The block quote, citation, quote and subquote elements can have a locale set for them so that they render their contents according to that locale. This facility is meant for when the enclosed text will only be for the selected locale regardless of which locale its viewed in, typically for a quote or book title. Do not set a locale if providing translations for each locale anyway, as that is not the scenario for this facility.
When entering text, just use the master locale. The rendering direction and browser spelling and grammar checking in the input area will be according to the selected locale. There is no need to do translations for any other locale. If getting text from elsewhere, cut-and-paste the plain text into the master locale, rather than inserting an existing element, which would have to be edited to delete text for the unwanted locales.
Visibility status△
There are several indicators of the current status of an element and its descendants.
- a.If it is to have plain text (such as inline, or a
section ortable Heading ), the number of characters is out of range. - b.If it is to have plain text, missing required master locale text.
- c.If it is to have plain text, and has no optional master locale text, but has text in another locale.
- d.If a block element, the number of enabled children is out of range.
- e.Has a descendant like any above.
The only exception to item
Borders△
The colour and thickness of borders indicate the visibility status and whether the current element.
The red colour is so that elements that will prevent the article from being released are clearly identifiable. A manually disabled element does not have errors, but its element type name will have a line through it, and its checkbox in its status area will be unchecked, to indicate that while it will not prevent the article being released, it will not be displayed.
Element's child status△
After the element's type name, there is one or two numbers that indicate the status of the element's children.
The first and larger number indicates the number of enabled children. If there are no disabled children, there is no second smaller number. Double red underlines under the first number indicates that at least one of its group children numbers is out of range, such as a
These numbers will help to isolate where problems might be occurring when trying to Troublesho
Example△
The images here show the changing colours and border thicknesses as a paragraph element is created and completed.
Note that only the automatically disabled elements have thicker red borders and light orange backgrounds, while all disable modes make the element type name red with strike-through like Paragraph. Hover buttons will show exactly the same colour and border schemes as the action bars in these images for the same automatically or manually disabled states.
The Element's child status numbers both have errors due to there not being at least one enabled element as the
There are no errors nor disabled children now, the latter being why there is now no second number.
The