feat: CodeMirror integration and bug fixes
This commit addresses several issues related to the migration from TipTap to CodeMirror:
- **CodeMirror Initialization Fixes:**
- Resolved 'Unrecognized extension value' errors by refactoring to explicitly import individual CodeMirror extensions instead of relying on . This ensures proper singleton usage and prevents module duplication issues.
- Updated and to utilize these individual extensions.
- **Text Wrapping Enabled:**
- Added to the extensions in and to enable text wrapping in the CodeMirror editors.
- **Content Saving Fixes:**
- Corrected content binding for CodeMirror editor instances in various IDAA components:
- (description, location_text, attend_text)
- (content, notes)
- (content)
- (description, notes)
- (description, notes)
- Ensured that the prop of is correctly bound to the respective state variables in the parent components, and these state variables are initialized with existing content.
- **Save Button Enablement:**
- Fixed an issue in where the Save button was not enabling on content changes. The logic now directly compares the and with the original object's content, ensuring reactivity.
This commit is contained in:
@@ -58,7 +58,7 @@ import { add_url_params, clean_headers } from '$lib/ae_core/core__api_helpers';
|
||||
const ae_promises: key_val = {}; // Promise<any>;
|
||||
|
||||
// Updated 2024-03-29
|
||||
async function handle_load_ae_obj_id__site_domain({
|
||||
async function load_ae_obj_id__site_domain({
|
||||
api_cfg,
|
||||
fqdn,
|
||||
try_cache = false,
|
||||
@@ -73,7 +73,7 @@ async function handle_load_ae_obj_id__site_domain({
|
||||
}) {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** handle_load_ae_obj_id__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}`
|
||||
`*** load_ae_obj_id__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ async function handle_load_ae_obj_id__site_domain({
|
||||
}
|
||||
|
||||
// Updated 2024-03-29
|
||||
async function handle_load_ae_obj_code__data_store({
|
||||
async function load_ae_obj_code__data_store({
|
||||
api_cfg,
|
||||
code,
|
||||
data_type = 'text',
|
||||
@@ -143,7 +143,7 @@ async function handle_load_ae_obj_code__data_store({
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
if (log_lvl) {
|
||||
console.log(`*** handle_get_data_store_obj_w_code() *** code=${code}`);
|
||||
console.log(`*** load_ae_obj_code__data_store() *** code=${code}`);
|
||||
}
|
||||
|
||||
if (!code) {
|
||||
@@ -271,7 +271,7 @@ async function handle_load_ae_obj_code__data_store({
|
||||
}
|
||||
|
||||
// Updated 2024-03-27
|
||||
async function handle_update_ae_obj_id_crud({
|
||||
async function update_ae_obj_id_crud({
|
||||
api_cfg,
|
||||
object_type,
|
||||
object_id,
|
||||
@@ -561,7 +561,7 @@ async function update_ae_obj_id_crud_v2({
|
||||
return ae_promises.api_update__ae_obj;
|
||||
}
|
||||
|
||||
async function handle_download_export__obj_type({
|
||||
async function download_export__obj_type({
|
||||
api_cfg,
|
||||
get_obj_type, // The type of object to return: event_badge, event_presenter, sponsorship, etc.
|
||||
for_obj_type, // Usually for an account, event, event_exhibit, or sponsorship_cfg
|
||||
@@ -588,7 +588,7 @@ async function handle_download_export__obj_type({
|
||||
params?: key_val;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
console.log('*** ae_core_functions.js: handle_download_export__obj_type() ***');
|
||||
console.log('*** ae_core_functions.js: download_export__obj_type() ***');
|
||||
|
||||
const task_id = for_obj_id;
|
||||
|
||||
@@ -651,8 +651,8 @@ const export_obj = {
|
||||
add_url_params: add_url_params,
|
||||
clean_headers: clean_headers,
|
||||
|
||||
handle_load_ae_obj_id__site_domain: handle_load_ae_obj_id__site_domain,
|
||||
handle_load_ae_obj_code__data_store: handle_load_ae_obj_code__data_store,
|
||||
load_ae_obj_id__site_domain: load_ae_obj_id__site_domain,
|
||||
load_ae_obj_code__data_store: load_ae_obj_code__data_store,
|
||||
|
||||
load_ae_obj_id__activity_log: load_ae_obj_id__activity_log,
|
||||
load_ae_obj_li__activity_log: load_ae_obj_li__activity_log,
|
||||
@@ -671,9 +671,9 @@ const export_obj = {
|
||||
qry_ae_obj_li__user_email: qry_ae_obj_li__user_email,
|
||||
auth_ae_obj__user_id_change_password: auth_ae_obj__user_id_change_password,
|
||||
|
||||
handle_update_ae_obj_id_crud: handle_update_ae_obj_id_crud,
|
||||
update_ae_obj_id_crud: update_ae_obj_id_crud,
|
||||
update_ae_obj_id_crud_v2: update_ae_obj_id_crud_v2,
|
||||
handle_download_export__obj_type: handle_download_export__obj_type,
|
||||
download_export__obj_type: download_export__obj_type,
|
||||
generate_qr_code: generate_qr_code,
|
||||
js_generate_qr_code: js_generate_qr_code
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user