Elemental FMelemental_fm

Elemental SVG Editor — User Guide

v1.1.5

1. Getting Started

Elemental SVG Editor is a single HTML file that lets you load, edit, and export SVG icons. There is nothing to install — just open the file and start working.

No server, no build step, no dependencies. The editor works fully offline once the page has loaded.

2. Loading SVGs

There are several ways to get SVGs into the editor:

File Picker

Click the Load SVGs button in the toolbar to open your system file picker. You can select one file or multiple .svg files at once.

Drag & Drop

Drag SVG files from your desktop or file manager directly onto the preview area. Multiple files are supported.

Paste

Click the paste button to paste SVG code from your clipboard. This is especially useful inside FileMaker, where Cmd+V may be intercepted by the host application before it reaches the web viewer.

From FileMaker (JavaScript API)

SVGs can be loaded programmatically using FileMaker's Perform JavaScript in Web Viewer script step:

When multiple SVGs are loaded, they appear in a tile grid so you can view and edit them all at once.

3. Previewing & Navigating

Once SVGs are loaded, they appear in the main preview area. A single SVG is shown centered; multiple SVGs appear in a tile grid.

Zoom

Use the + and - buttons to zoom in and out. Click Fit to fit all icons to the view. You can also hold Cmd, Ctrl, or Shift and scroll with the mouse wheel.

Reorder

Drag tiles to rearrange them in the order you want. This order is preserved when exporting.

Remove

Click the × button on any tile to remove it from the session.

Background

Click the background button to cycle through preview backgrounds: checkerboard (for seeing transparency), white, black, or a custom color of your choice.

4. Editing SVGs

All editing controls apply to every loaded SVG at once. Changes are previewed in real time.

Fill & Stroke Colors

Use the color pickers to choose new fill or stroke colors. You can also type a hex value directly into the input field.

Stroke Width

Adjust from 0 to 10 in 0.5-unit increments using the slider.

Rotation

Rotate using the left/right arrow buttons. Set the rotation increment to 15°, 30°, 45°, or 90° to control how much each click rotates.

Flip

Mirror the icon horizontally or vertically with one click.

Scale

Resize the icon within its viewBox, from 50% down to 150% up. The viewBox dimensions stay the same — only the icon inside gets larger or smaller.

Offset

Reposition the icon within its viewBox using the X and Y offset sliders. Useful for fine-tuning centering.

Opacity

Adjust the icon transparency from 0% (fully transparent) to 100% (fully opaque).

Invert Colors

Quickly swap black and white colors in the SVG. Handy when switching between dark and light contexts.

Background Shape

Add a shape behind the icon — choose from circle, triangle, square, pentagon, or hexagon. You can adjust the corner radius and the padding between the icon and the shape edge.

Undo / Redo

Press Cmd/Ctrl+Z to undo and Cmd/Ctrl+Shift+Z to redo. The editor keeps up to 50 history states.

5. Overlay Mode

Overlay mode lets you combine multiple SVGs into a single layered composition. This is useful for building composite icons — for example, placing a small badge or symbol on top of a larger base icon.

Entering Overlay Mode

  1. Load two or more SVGs into the editor.
  2. Select the SVGs you want to combine. Use Shift+click or Cmd/Ctrl+click to select multiple tiles, or use the Select All option.
  3. Click the Overlay button in the toolbar. The editor switches to a dedicated overlay workspace.
Tip: You need at least two SVGs selected to enter overlay mode. If only one SVG is loaded or selected, the overlay button will not be available.

The Overlay Workspace

The workspace shows all your selected SVGs as layers on a shared canvas. A labeled "SVG Viewport" boundary indicates the final output area — this is the bounding box of the merged SVG that will be produced when you click Done.

Layers can be positioned anywhere in the workspace, including outside the viewport boundary. Only the parts within the viewport will appear in the final SVG.

Selecting Layers

Click on any layer in the workspace to select it. The selected layer is highlighted with a dashed border and its name is shown in the overlay panel. You can click anywhere within a layer's bounding box to select it — you do not need to click directly on a filled or stroked area of the SVG.

Positioning Layers

Click and drag a layer to move it around the workspace. The drag interaction works across the entire bounding box of the layer, making it easy to reposition even sparse or outline-style icons.

Scaling Layers

With a layer selected, use the Scale slider in the overlay panel to resize it. The range goes from 10% to 300% of the layer's original size. This is useful for making one icon smaller (like a badge) while keeping the base icon at full size.

Rotating Layers

Use the rotation buttons to rotate the selected layer. You can choose the rotation increment — 15, 30, 45, or 90 degrees — using the dropdown next to the rotation controls.

Per-Layer Background

Each layer can have its own background fill, independent of the main editor's background shape feature. This is useful for adding a colored circle or square behind a specific layer in the composition.

  1. Select a layer in the workspace.
  2. Toggle the Background checkbox in the overlay panel.
  3. Choose a shape: circle, square, or rounded square.
  4. Pick a background color using the color picker.
  5. Adjust the padding to control how much space surrounds the icon within the background shape.

Reordering Layers

Layers are drawn in order — the last layer in the stack appears on top. Use the layer ordering controls to change which layers appear in front of or behind others:

Removing a Layer

Click the trash icon next to the layer name to remove the selected layer from the composition. If you remove the last remaining layer, overlay mode is cancelled automatically and you are returned to the main editor.

Resetting a Layer

Click Reset Layer Position to return the selected layer to its default centered position, with scale reset to 100% and rotation reset to 0 degrees. This does not affect the layer's background settings.

Undo and Redo

Overlay mode has its own undo/redo history, separate from the main editor. Every action you take — moving, scaling, rotating, reordering, adding backgrounds — is recorded. Use Cmd/Ctrl+Z to undo and Cmd/Ctrl+Shift+Z to redo, just like in the main editor.

Finishing the Composition

When you are happy with the arrangement, click Done. The editor merges all layers into a single SVG and adds it to your editor session. The original source SVGs that were used in the composition are removed from the editor, leaving only the merged result.

The merged SVG can then be edited further using all the normal editor tools — fill color, stroke, rotation, background shape, and so on — or exported directly.

Cancelling

Click Cancel to exit overlay mode without saving. All source SVGs remain in the editor exactly as they were before you entered overlay mode.

Tip: Overlay mode works well for combining icons from the built-in icon library. Open the library, select a base icon and a badge icon, send them to the editor, then use overlay mode to compose them together.

6. Stroke to Fill Conversion

This is one of the editor's most important features for FileMaker developers.

Many popular icon sets (like Lucide, Feather, and Tabler) use strokes to draw their outlines. Unfortunately, FileMaker does not render stroke-based SVGs correctly when they are used as button icons — strokes often appear too thin, too thick, or disappear entirely.

The editor solves this by converting stroke outlines into filled vector paths:

Tip: This is similar to using an online tool like "outline-stroke," but it is built directly into the editor so you do not need to leave FileMaker or juggle extra tools.

7. Exporting / Saving

Output Format

Choose between SVG (vector) or PNG (raster). When PNG is selected, you can pick a size: 32, 64, 128, 256, 512, or 1024 pixels.

Browser Mode

FileMaker Mode

Multiple SVGs

When more than one SVG is loaded, you can choose to save all of them or select specific ones to include in the export.

Auto-Convert

Enable the Auto Convert toggle to automatically save or export as soon as SVGs are loaded. This is useful for batch workflows where you want to skip the manual Save step.

8. FileMaker Integration Guide

This section is for developers who want to embed the editor in their own FileMaker solutions.

Setting Up the Web Viewer

  1. Add a Web Viewer to your layout.
  2. Set the web address to the HTML file — either stored in a container field or referenced as a file path.
  3. The editor auto-detects it is running in FileMaker when FileMaker.PerformScript is available.

Initializing the Editor

After the page loads, call initEditor() via Perform JavaScript in Web Viewer to configure the editor. Every property is optional — omit any property to keep the default value.

initEditor({
    output_mode: 'fm',        // 'fm' or 'browser'
    style: 'dark',            // 'dark' or 'light'
    style_colour: 'orange',   // accent color
    output_format: 'svg',     // 'svg' or 'png'
    output_size: 512          // PNG size in pixels (32–1024)
});

Editor Presets

You can also pass editor presets to initEditor() to pre-configure the editing controls. This is useful for standardizing icon appearance across a team, or setting up the editor for a specific workflow. Preset values override saved user preferences.

Colors & Stroke

PropertyTypeRangeDescription
fill_colorhex stringany valid colorIcon fill color
stroke_colorhex stringany valid colorIcon stroke color
stroke_widthnumber0–10Stroke width (0.5 increments)

Transforms

PropertyTypeRangeDescription
rotationnumber0–360Rotation in degrees
rotation_incrementnumber15, 30, 45, 90Step size for rotation buttons
flip_hbooleanFlip horizontally
flip_vbooleanFlip vertically
opacitynumber0–100Icon opacity (%)
scalenumber50–150Icon scale (%)
offset_xnumber-50–50Horizontal position offset
offset_ynumber-50–50Vertical position offset

Background Shape

PropertyTypeRangeDescription
bg_enabledbooleanShow background shape
bg_colorhex stringany valid colorBackground fill color
bg_edgesnumber0, 3–10Shape type (0=circle, 3=triangle, 4=square, 5=pentagon, 6=hexagon, etc.)
icon_paddingnumber0–30Padding between icon and shape edge (%)
corner_radiusnumber0–50Corner rounding for non-circle shapes (%)

FileMaker Options

PropertyTypeValuesDescription
fm_compatiblebooleanApply FM compatibility processing
fm_dynamic_fillbooleanRemove fills for FM dynamic styling
fm_dynamic_targetstring'icon' or 'background'Which element FM controls the color of

Conversion & Display

PropertyTypeValuesDescription
auto_convertbooleanAuto-save converted files on load
convert_strokesbooleanConvert stroke SVGs to filled paths on export
normalize_pathsbooleanNormalize path commands
preview_bgstring'checkerboard', 'white', 'black', 'custom'Preview area background
preview_bg_colorhex stringany valid colorCustom preview background color
zoomnumber50–400Zoom level as percentage

Full Example

Here is an example that initializes the editor with white icons on a blue circle background:

initEditor({
    output_mode: 'fm',
    style: 'dark',
    style_colour: 'blue',
    output_format: 'svg',
    fill_color: '#ffffff',
    bg_enabled: true,
    bg_color: '#3498db',
    bg_edges: 0,
    icon_padding: 15,
    fm_compatible: true,
    fm_dynamic_fill: false
});
Tip: Invalid values are silently ignored — the editor falls back to its defaults. Hex colors can be passed with or without the # prefix.

Loading SVGs into the Editor

Getting SVGs Back

FM-Specific Options

FM Compatibility

Adds a CSS class (fm_fill) that lets FileMaker control icon colors via its built-in button icon styling.

Dynamic Fill

Removes hardcoded fill colors from the SVG so FileMaker can apply colors dynamically at runtime.

Dynamic Target

Choose whether FileMaker controls the icon color or the background shape color.

Version Updates in FileMaker

The editor checks for updates automatically. In FileMaker mode, when a new version is available, it shows a "Click to update" link. Clicking it calls FileMaker.PerformScript('Update Version', payload) where the payload contains the download URL for the new HTML file.

Your solution needs an Update Version script that downloads the new file and replaces the old one.

9. Settings & Preferences

The following preferences are saved automatically between sessions using browser localStorage:

These settings persist as long as the browser storage is not cleared. In FileMaker, localStorage is tied to the web viewer's data storage.

10. Keyboard Shortcuts

ShortcutAction
Cmd/Ctrl + ZUndo (works in both main editor and overlay mode)
Cmd/Ctrl + Shift + ZRedo (works in both main editor and overlay mode)
+ / -Zoom in / out
EscapeClose modals and popups

11. Troubleshooting & Tips

SVGs look wrong in FileMaker?

Try enabling Convert strokes to fills. Stroke-based SVGs are the most common cause of rendering issues in FileMaker button icons.

Colors are not matching expectations?

Check the FM Compatibility and Dynamic Fill settings. If Dynamic Fill is on, the SVG's colors are removed so FileMaker can apply its own — this may not be what you want in every case.

Overlay mode not available?

You need at least two SVGs selected to enter overlay mode. Load multiple SVGs and select the ones you want to combine before clicking the Overlay button.

Works offline

Once the editor has loaded, it does not need an internet connection. All editing and exporting happens locally in the browser.

Report issues

Click the wrench icon to open the built-in issue reporter. It captures full diagnostic data — editor state, SVG data, and browser information — so problems can be investigated quickly.