Softwarity

@softwarity/tac-editor

A lightweight Web Component for editing TAC (Traditional Alphanumeric Codes) aviation meteorology messages — with built-in syntax highlighting, validation, and autocompletion. Supports METAR, SPECI, TAF, SIGMET, AIRMET, VAA, TCA, and SWXA formats.

METAR SPECI TAF SIGMET AIRMET VAA TCA SWXA

Theme

Editor Options

Note: The message-types attribute restricts which TAC codes the editor will accept. Only grammars for selected types will be loaded when detected. Leave unchecked types for a more restrictive editor.
TAC Editor

Suggestion Providers

Configure dynamic suggestion providers for token types. Providers can replace grammar suggestions or extend them.

METAR/SPECI Aerodrome

ICAO location indicator for METAR/SPECI observation reports (format: nnnn)

Register key: ['sa.*.*.icao', 'sp.*.*.icao']
Options Simulation
Label:
Timeout: ms
Delay: ms

TAF Aerodrome

ICAO location indicator for TAF forecasts (format: nnnn)

Register key: ['ft.*.*.icao', 'fc.*.*.icao']
Options Simulation
Label:
Timeout: ms
Delay: ms

Weather Phenomena

Prioritize specific weather phenomena at the top of suggestions

Register key: ['sa.*.*.weather', 'sp.*.*.weather']
Options Simulation
Label:
Timeout: ms
Delay: ms

Real-time Weather Measurements

Fetch real-time weather data from Open-Meteo API based on station coordinates. Provides: wind, temperature, visibility, pressure.

Registration Mode
Register key ['sa.*.*.measurement', 'sp.*.*.measurement']
Options:
Cache:
Timeout: ms

Supported tokens:

  • wind10015G25KT (direction, speed, gusts)
  • temperatureM05/M08 (temp/dewpoint with M prefix for negative)
  • visibility9999 (meters, max 9999)
  • pressureQ1013 (QNH in hPa)

Registration modes:

  • By Category: sa.*.*.measurement - matches all measurement tokens via category fallback
  • By Token: sa.*.*.wind, sa.*.*.temperature, etc. - one pattern per token type

Note: Demo stations: LFPG, LFPO, LFBO, EGLL, EDDF, EHAM. Unknown ICAOs use Berlin coordinates.

FIR/CTA Location

ICAO location indicator of ATS unit serving the FIR/CTA (used by SIGMET, AIRMET)

Register key: ['firId']
Options Simulation
Label:
Timeout: ms
Delay: ms

MWO Location

Location indicator of MWO originating the message (format: nnnn, hyphen suffix added by grammar)

Register key: ['ws.*.*.mwoId', 'wv.*.*.mwoId', 'wc.*.*.mwoId', 'wa.*.*.mwoId']
Options Simulation
Label:
Timeout: ms
Delay: ms

FIR/CTA Name

Complete FIR/CTA block: ICAO + name + type (format: nnnn NAME FIR|UIR|FIR/UIR|CTA)

Register key: ['ws.*.*.firName', 'wv.*.*.firName', 'wc.*.*.firName', 'wa.*.*.firName']
Options Simulation
Label:
Timeout: ms
Delay: ms

Volcano (SIGMET WV)

Name of the volcano for SIGMET volcanic ash messages (MT prefix is a separate suggestion)

Register key: ['wv.*.*.volcanoName']
Options Simulation
Label:
Timeout: ms
Delay: ms

Cyclone (SIGMET WC)

Name of the tropical cyclone for SIGMET TC messages

Register key: ['wc.*.*.tcName']
Options Simulation
Label:
Timeout: ms
Delay: ms

Volcano Name (VAA)

Volcano name for VAA template (format may include IAVCEI number)

Register key: ['fv.*.*.volcanoName']
Options Simulation
Label:
Timeout: ms
Delay: ms
Options:
  • Replace - When ON (default), provider suggestions replace grammar suggestions entirely. When OFF, provider suggestions are added after placeholder, before grammar suggestions.
  • Category - When ON, provider results are wrapped in a submenu category. When OFF (default), suggestions appear as a flat list.
  • Show Code - Displays JavaScript code for provider registration with current settings (with syntax highlighting).

Sample Messages (click to load)

METAR - Simple

METAR LFPG 281030Z 27015KT 9999 FEW040 12/05 Q1023 NOSIG

METAR - Complex with gusts and CB

METAR LFPG 281030Z 27015G25KT 350V030 9999 FEW040CB SCT100 12/05 Q1023 TEMPO 3000 TSRA

SPECI - Low visibility

SPECI EGLL 281045Z 09012KT 3000 BR BKN004 08/07 Q1019

METAR - US format (inHg)

METAR KJFK 281056Z 32008KT 10SM SCT250 M02/M14 A3042 RMK AO2

METAR - CAVOK

METAR LFBO 281030Z VRB02KT CAVOK 15/08 Q1025

METAR - Fog with vertical visibility

METAR LSGG 281050Z 04005KT 0400 FG VV002 02/02 Q1031

TAF - Simple with BECMG

TAF LFPG 160500Z 1606/1712 24008KT 9999 FEW040 BECMG 1612/1614 SCT030 BKN080

TAF - Complex with TEMPO and PROB

TAF LFPG 160500Z 1606/1712 24008KT 9999 SCT040 TEMPO 1612/1618 4000 TSRA BKN025CB PROB40 1618/1624 2000 +TSRA

TAF AMD - Amendment with FM group

TAF AMD EGLL 160600Z 1606/1706 18012KT CAVOK FM161200 22015G25KT 9999 SCT040

TAF - Fog improving

TAF LFBO 160500Z 1606/1712 VRB02KT 0400 FG VV002 BECMG 1608/1610 4000 BR BKN010 BECMG 1612/1614 9999 SCT030

VAA - Volcanic Ash Advisory

VA ADVISORY - KARYMSKY volcano (Russia)

TCA - Tropical Cyclone Advisory

TC ADVISORY - Hurricane GLORIA (Miami TCAC)

SWXA - Space Weather Advisory

SWX ADVISORY - HF COM and GNSS moderate degradation

Change Events

The component emits change events with message type, tokens, and validation status.

Waiting for change events...

HTML Code

Copy this code to use the component in your own page (updates automatically with your settings)


    

palette Theme CSS

Themes use CSS custom properties with light-dark() for automatic dark/light switching.
Edit the CSS below and click "Apply" to preview, or "Copy" to use in your project.

code Provider Registration Code

Copy this code to register the suggestion provider in your application.