Availability: >= 3.0

Type: Object Property

Description: Sets the base URL of the document or code snippet that the editor is being used to edit.


$editor->baseURL string $URL;

The value should be the base URL of the document you are editing.

This is useful if the HTML is to reside in a directory other than the editor and contains relatively linked images or other relatively linked elements. This ensures that the editor's design view does not show broken images.

Unlike a desktop WYSIWYG editor which opens and edits files on your hard-drive wysiwygPro has no way of knowing where the HTML code it is editing will be located. By setting the base URL to the location of the document you are editing wysiwygPro will then know how to display any relatively linked images in your document. The base URL property has the same effect as including a tag in the head of your document.

If you point the base URL at a directory you should use a trailing slash, e.g. this is correct: but this is not:

For best results the baseURL should always be absolute including the domain name and the http:// part as shown in the example below.


$editor->baseURL "";