Standardize Exhibit Leads module: Rich text support and naming alignment
- Integrated TipTap rich text editor for Booth Descriptions and Exhibitor Notes. - Implemented strip_html utility for clean search/preview of rich text fields. - Renamed exhibit loading functions to follow load_ae_obj_id__event_exhibit* pattern. - Hardened property processors with 'undefined' string guards and automatic reload triggers. - Resolved type mismatches and naming inconsistencies across the Leads module. - Verified zero-error state via svelte-check.
This commit is contained in:
@@ -265,6 +265,14 @@ export const shorten_string = function shorten_string({
|
||||
return new_string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Strips HTML tags from a string.
|
||||
*/
|
||||
export function strip_html(html: string): string {
|
||||
if (!html) return '';
|
||||
return html.replace(/<[^>]*>?/gm, '');
|
||||
}
|
||||
|
||||
// Svelte action to set focus on an element
|
||||
function set_focus(node: HTMLElement, focus: boolean) {
|
||||
if (focus) {
|
||||
@@ -341,6 +349,7 @@ export const ae_util = {
|
||||
to_title_case: to_title_case,
|
||||
shorten_string: shorten_string,
|
||||
shorten_filename: shorten_filename,
|
||||
strip_html: strip_html,
|
||||
file_extension_icon: file_extension_icon,
|
||||
file_extension_icon_lucide: file_extension_icon_lucide,
|
||||
format_html: format_html,
|
||||
|
||||
Reference in New Issue
Block a user