Clean up and working on the rich text editor. Will probably swap my version out for something else...

This commit is contained in:
Scott Idem
2024-12-02 14:56:22 -05:00
parent c0fe69ea73
commit 058c88c766
13 changed files with 290 additions and 201 deletions

View File

@@ -330,7 +330,7 @@ function send_poster_notification_email() {
<Tiptap_editor
default_minimal={true}
bind:html_text={$idaa_slct.post_comment_obj.content}
show_button_kv={{'heading__h1': true, 'heading__h2': false, 'heading__h3': false}}
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
bind:new_html={$idaa_slct.post_comment_obj.content_new_html}
placeholder="Your post content here..."
/>

View File

@@ -40,7 +40,7 @@ async function handle_submit_form(event: any) {
console.log(form_data);
}
// Form Post object data incoming
// Form Post object data incoming
let post_di = ae_util.extract_prefixed_form_data({prefix: null, form_data: form_data, trim_values: true, bool_tf_str: true, log_lvl: log_lvl});
// console.log(post_di);
@@ -123,6 +123,9 @@ async function handle_submit_form(event: any) {
return false;
}
if (log_lvl) {
console.log('post_obj_create_result:', post_obj_create_result);
}
$idaa_slct.post_id = post_obj_create_result.post_id_random;
$idaa_slct.post_obj = post_obj_create_result;
@@ -143,7 +146,9 @@ async function handle_submit_form(event: any) {
});
return prom_api__post_obj;
} else {
prom_api__post_obj = posts_func.update_ae_obj__post({
api_cfg: $ae_api,
post_id: $idaa_slct.post_id,
@@ -177,6 +182,7 @@ async function handle_submit_form(event: any) {
});
return prom_api__post_obj;
}
}
@@ -349,13 +355,33 @@ function send_staff_notification_email() {
</span>
<!-- <textarea name="content" id="content" class="ae_value post__content tinymce_editor editor_basic textarea" rows="5" cols="70" bind:value={$idaa_slct.post_obj.content} ></textarea> -->
<Tiptap_editor
default_minimal={true}
bind:html_text={$idaa_slct.post_obj.content}
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
bind:new_html={$idaa_slct.post_obj.content_new_html}
placeholder="Your post content here..."
/>
{#if $ae_loc.administrator_access}
<Tiptap_editor
default_minimal={true}
bind:html_text={$idaa_slct.post_obj.content}
show_button_kv={{'heading__h1': true, 'heading__h2': true, 'heading__h3': true}}
bind:new_html={$idaa_slct.post_obj.content_new_html}
placeholder="Your post content here..."
/>
{:else}
<Tiptap_editor
default_minimal={true}
bind:html_text={$idaa_slct.post_obj.content}
show_button_kv={{
'heading__h1': false,
'heading__h2': false,
'heading__h3': false,
paragraph: false,
bulletList: false,
orderedList: false,
hardBreak: false,
link: false,
unsetLink: false
}}
bind:new_html={$idaa_slct.post_obj.content_new_html}
placeholder="Your post content here..."
/>
{/if}
</label>