Markup Text element

This element is useful for adding code to the web page, like embedded Vimeo or YouTube videos, Google Calendars, registration forms, event booking code, PayPal 'buy now' buttons, an Open Street Map, code samples, and much more. It's a flexible element, which could be good to use if you or a client don't mind working with code. For example, if you have a YouTube video embedded within a web page, the Markup Text provides a method to swap the current video out for a new one.

The Markup Text element code

<?php webyep_markupText("Fieldname", false, "", false, true, 600, 400); // WebYepV3 ?>

Arguments for the function call

  1. "Fieldname": A string - the field name for this element.
  2. true/false: A boolean - the scope for this element.
    true if the element should have the same content on all pages (global).
    false if it should have different content on each page it appears on
  3. "": A string - obsolete, pass an empty string ("").
  4. true/false: A boolean - whether email links should be encoded.
    true if email addresses entered in the text element should be encoded using Javascript.
    false if they should be simply output as HTML. (default)
  5. true/false: A boolean - render HTML exactly as entered or convert to entities.
    true no modification to special characters. Code works exactly as it was entered. (default).
    false special characters (like <) will be converted into HTML entities (like &lt;).
  6. 600, 400: Maximum width and height of the editor window.

Screenshots

The Markup Text editor window.
The Markup Text editor window.

Attributes of the Short Text element

Fieldname

A distinctive name for that element. This name will be displayed in the page in edit mode to give the user a hint on what this elements content stands for and to distinguish the different WebYep elements in a page.

Content

When set to "for this doc only" the elements content is unique for this page - even if another element on a different page has the same name. If set to "for all documents" the content will be the same on all pages for elements of this kind that use the same name.

Encode email links

If a user enters an email address into a Markup Text Element, WebYep will display it as a clickable link ('mailto' email link).

If you enable the 'Encode Email Links' option, WebYep will encode these links to keep SPAM bots from collecting the email addresses.

To do so, WebYep uses a Javascript based encoding. If the visitors of your website have deactivated Javascript, they will only see these email addresses in the form:

name(_AT_)domain.com

and the email addresses will then not be clickable.

Preserve HTML code or convert to entities

This argument was added in WebYep 3. By default (or with the argument set to 'true') any HTML code will work exactly in the page, as it was entered. So as an example, pasted YouTube embed code will render out on the page as an actual video. Alternatively, setting this argument to 'false' will result in HTML tags and special characters being converted into HTML entities. This latter method can be useful if you need to make a <pre> block editable, and optionally have WebYep safely convert HTML tags (and other special characters) into HTML entities, which can be viewed as code on the page.

Modal window size

As the developer you can preset the dimensions of the modal window size.