FormatSpecValueFromToolbar

jdubs edited this page Oct 21, 2016 · 2 revisions

Table of Contents

Overview

Formats text based on input utilizing a customized editing toolbar in the web interface.

Parameters

SpecName (constant) The name of the spec control containing the text to format.

ErrorMessage (multiple | optional) The error message to return when any error occurs.

Synopsis

The user, utilizing the toolbar in the spec form, will richly format the text on screen. The formatting is interpreted and applied to the rendered print file. Format options include: underline, italicize, bold, superscript, subscript and any combination of all. Color options are not available due to the inaccuracy of conversion from RGB to CMYK. Font selections are also not available due to browser deficiencies regarding the maximum usage of 7 distinct fonts.

Special Notes

Four51 has decided to not release the ToolbarReference functionality as open source at this time. A compiled version is made available for reference in your projects.

The editor acts differently in each browser. Attempts to accommodate those differences have been made. In Internet Explorer pressing the "Enter" key results in a "

" or paragraph tab. This is represented as a double space line, so the action also returns a double space. To get a single space the user must press "Shift + Enter".

Source Code

public static void FormatSpecValueFromToolbar(string SpecName, object ErrorMessage)
{
	Break();
	try
	{
		Variable(SpecName).Value = ToolBar.Parse(Variable(SpecName).Value);
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.