HtmlEditor

MacroModule
author Wolf Spindler
package FMEwork/ReleaseMeVis
definition HtmlEditor.def
see also PlaceholderTranslator
keywords edit, interactive, wysiwyg, web

Purpose

HtmlEditor is a convenience macro for low-level HTML editing. It has an input for (hand-written) HTML text and a display which shows (in WYSIWYG manner) the web rendering result. Like the PlaceholderTranslator it allows inserting field names from other modules, self-defined aliases, or constants into the HTML template text.

Actually this module is not intended as a full-purpose HTML editor, but it can be a helpful tool macro for application builders. Thus creating, editing and export of documents as web results is possible in an application without needing application-external programs.

If you want to make use of HtmlEditor inside of a macro please have a look at parentLevelsUp and PlaceholderTranslator.parentLevelsUp to make sure that the module can find referenced fields.

Windows

Default Panel

../../../Projects/HtmlEditor/Modules/mhelp/Images/Screenshots/HtmlEditor._default.png

Parameter Fields

Field Index

Code: Trigger Make H5: Trigger parentLevelsUp: Integer
Doc: Trigger Make H6: Trigger Quote: Trigger
HRule: Trigger Make Inserted: Trigger Sample: Trigger
Incorrect: Trigger Make Italic: Trigger tempFileBufferName: String
isHtmlEditorTestingEnabled: Bool Make Marked: Trigger Title: Trigger
Link: Trigger Make Newline: Trigger useShortButtonBar: Bool
Make AL: Trigger Make OL: Trigger useTempFileBuffer: Bool
Make Bold: Trigger Make Preformatted: Trigger Web Report Aliases: String
Make Deleted: Trigger Make Small: Trigger Web Report Constants Comment: String
Make Em Space: Trigger Make Space: Trigger Web Report Examples Comment: String
Make Emphasized: Trigger Make Strong: Trigger Web Report Formatting Comment: String
Make En Space: Trigger Make Sub Scripted: Trigger Web Report Status: String
Make H1: Trigger Make Super Scripted: Trigger Web Report Symbols Comment: String
Make H2: Trigger Make UL: Trigger Web Report Template: String
Make H3: Trigger Make Variable: Trigger WebReportOutputs: String
Make H4: Trigger Par: Trigger  

Visible Fields

Web Report Template

name: WebReportInput, type: String, default: <!DOCTYPE html>, <head>, <title>Html Text Example</title>, <h1>This is the Web Result</h1>, <h2>Placeholders</h2>, <p>Value of field <i>name</i> of module <b>LocalImage</b> is $(LocalImage.name).</p>, <p>See <b>Constants</b> tab: The current date is $(DAY).$(MONTH).$(YEAR).</p>, <p>Self-defined aliases (see <b>Aliases</b> tab), for , example <mark>MY_DATE</mark> aliases $(MY_DATE).</p>, <h2>Formatting</h2>, <p>Hyperlink: <a href="http://www.uni-bremen.de/">University Bremen</a>.</p>, <p style="border: 2px solid black; width:50%">Text in a black and half-width box.</p>, <table style="border: 2px solid green">, <tr>,   <td style="border: 2px solid blue">"Text in blue box"</td>,   <td><ul style="list-style-type:circle; border: 2px solid yellow">,     <li>$(MY_DATE)</li>,     <li style="border: 3px solid powderblue">Powder blue text</li>,   </ul></td>, </tr>, </table>, </body>, </html>

Insert the HTML text with constants, placeholders and aliases here. The placeholders will be translated and the result is shown in the WebReportOutputs field then.

Web Report Aliases

name: WebReportAliases, type: String, default: $(MY_DATE):$(DAY).$(MONTH).$(YEAR),

Here aliases can be defined. For details see PlaceholderTranslator.aliases.

Web Report Status

name: WebReportStatus, type: String, persistent: no

Shows status information, especially errors if any field, module or alias cannot be resolved correctly.

Web Report Examples Comment

name: WebReportExamplesComment, type: String, persistent: no

Some useful HTML examples are shown here.

Web Report Symbols Comment

name: WebReportSymbolsComment, type: String, persistent: no

Some useful HTML symbols coded are shown here.

Web Report Formatting Comment

name: WebReportFormattingComment, type: String, persistent: no

Some useful HTML formatting statements are shown here.

Web Report Constants Comment

name: WebReportConstantsComment, type: String, persistent: no

A list of constants which can be inserted into the html document to add useful information such as date, time, system information etc.

Doc

name: makeDoc, type: Trigger

Inserts a minimal HTML document structure.

Make Bold

name: makeBold, type: Trigger

Makes selected text formatted bold.

Make Strong

name: makeStrong, type: Trigger

Makes selected text formatted strong.

Make Italic

name: makeItalic, type: Trigger

Makes selected text formatted italic.

Make Emphasized

name: makeEmphasized, type: Trigger

Makes selected text formatted emphasized.

Make Small

name: makeSmall, type: Trigger

Makes selected text formatted smaller.

Make Marked

name: makeMarked, type: Trigger

Makes selected text formatted marked.

Make Deleted

name: makeDeleted, type: Trigger

Makes selected text formatted deleted.

Make Inserted

name: makeInserted, type: Trigger

Makes selected text formatted inserted.

Make Sub Scripted

name: makeSubScripted, type: Trigger

Makes selected text formatted as subscripted text.

Make Super Scripted

name: makeSuperScripted, type: Trigger

Makes selected text formatted as superscripted text.

Par

name: makeParagraph, type: Trigger

Makes selected text formatted as paragraph.

Make Newline

name: makeNewline, type: Trigger

Appends a line break at end of selected text.

Title

name: makeTitle, type: Trigger

Makes selected text formatted as title.

Make H1

name: makeH1, type: Trigger

Makes selected text formatted as head line type 1 (1= large, 6 = small).

Make H2

name: makeH2, type: Trigger

Makes selected text formatted as head line type 2 (1= large, 6 = small).

Make H3

name: makeH3, type: Trigger

Makes selected text formatted as head line type 3 (1= large, 6 = small).

Make H4

name: makeH4, type: Trigger

Makes selected text formatted as head line type 4 (1= large, 6 = small).

Make H5

name: makeH5, type: Trigger

Makes selected text formatted as head line type 5 (1= large, 6 = small).

Make H6

name: makeH6, type: Trigger

Makes selected text formatted as head line type 6 (1= large, 6 = small).

Make AL

name: makeAL, type: Trigger

Inserts a small list with character items.

Make OL

name: makeOL, type: Trigger

Inserts a small list with numbered items.

Make UL

name: makeUL, type: Trigger

Inserts a small list with bulleted items.

Quote

name: makeQuote, type: Trigger

Makes selected text quoted.

Incorrect

name: makeIncorrect, type: Trigger

Makes selected text formatted as incorrect.

Make Preformatted

name: makePreformatted, type: Trigger

Makes selected text preformatted.

Make Variable

name: makeVariable, type: Trigger

Makes selected text formatted as variable.

Sample

name: makeSample, type: Trigger

Makes selected text formatted as sample code.

Code

name: makeCode, type: Trigger

Makes selected text formatted as (computer) code.

HRule

name: makeHRule, type: Trigger

Inserts a horizontal rule.

Make Space

name: makeSpace, type: Trigger

A normal sized space.

Make En Space

name: makeEnSpace, type: Trigger

A space sized more or less like two spaces.

Make Em Space

name: makeEmSpace, type: Trigger

A space sized more or less like four spaces.

Hidden Fields

useShortButtonBar

name: useShortButtonBar, type: Bool, default: FALSE

Selects a three line button bar which makes the editor less wide. This can be useful for applications embedding this editor and which do not want to have a such large extent.

useTempFileBuffer

name: useTempFileBuffer, type: Bool, default: FALSE

Advanced: A hidden field which can be activated to make the editor store its web result from WebReportOutputs in a temporary file. This can improve usability of WebView controls, because then they can reload their contents correctly.

tempFileBufferName

name: tempFileBufferName, type: String, persistent: no

If useTempFileBuffer is on and the result content of WebReportOutputs is stored in a temporary file then this is the path of the file.

parentLevelsUp

name: parentLevelsUp, type: Integer, default: 1, minimum: 0

For searching field values for HtmlEditor the same holds as for PlaceholderTranslator. See PlaceholderTranslator.parentlevelsUp for details.

WebReportOutputs

name: WebReportOutputs, type: String, persistent: no

Contains the finally created HTML document result after inserting the placeholder contents. The content of this field is not shown literally but rendered as Web document.

isHtmlEditorTestingEnabled

name: isHtmlEditorTestingEnabled, type: Bool, default: FALSE

Internal flag only for testing purposes. Do not change or use.