More work on the BB Posts for IDAA. Can now edit, update, and create now posts.
This commit is contained in:
@@ -39,6 +39,7 @@ export let html_text: string = '';
|
||||
export let default_minimal: boolean = false;
|
||||
export let show_toolbar: boolean = true;
|
||||
export let placeholder: string = 'Type your text here...';
|
||||
export let changed: boolean = false;
|
||||
|
||||
if (default_minimal) {
|
||||
show_toolbar = false;
|
||||
@@ -84,6 +85,7 @@ export let show_button_kv: any;
|
||||
|
||||
// export let new_json = editor?.getJSON();
|
||||
export let new_html: string = '';
|
||||
let orig_html: string = html_text;
|
||||
|
||||
onMount(() => {
|
||||
});
|
||||
@@ -91,6 +93,14 @@ onMount(() => {
|
||||
onDestroy(() => {
|
||||
});
|
||||
|
||||
$: if (html_text !== orig_html && html_text !== '<p></p>') {
|
||||
console.log('html_text changed:', html_text);
|
||||
console.log('orig_html:', orig_html);
|
||||
changed = true;
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
|
||||
let mouse_entered_timer: any;
|
||||
let mouse_enter_wait: number = 500;
|
||||
let mouse_leave_wait: number = 2000;
|
||||
|
||||
Reference in New Issue
Block a user