]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7634
authorsoufiane <soufiane@cubedesigners.com>
Mon, 21 Jul 2025 17:11:44 +0000 (19:11 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 21 Jul 2025 17:11:44 +0000 (19:11 +0200)
resources/markdowneditor/js/markdowneditor.js
resources/markdowneditor/js/markdowneditor.undo.js
resources/markdowneditor/style/style.sass
resources/views/fluidbook_publication/markdown_editor.blade.php

index f7903601aafbb1a9c51d3f8378e818f50e67604d..b9cc82f3b876a5130636998b77a89ba202a08a20 100644 (file)
@@ -143,10 +143,9 @@ MarkdownEditor.prototype = {
     },
 
     setContentMarkdown: function() {
-        const $this = this
-        if(this.undo.states[this.getCurrentPage()] !== undefined || this.undo.states[this.getCurrentPage()] === null) {
+        if(this.undo.states[this.getCurrentPage()] !== undefined) {
             const state = this.undo.states[this.getCurrentPage()]
-            const lastKey = state.length;
+            const lastKey = state.length - 1;
             this.editor.setMarkdown(state[lastKey])
             this.editor.moveCursorToStart(true)
         }else {
index eff3553d34713e53d61f61cae575048d5d64c544..0d0767461e2280a3afbc79abd5711d05fcb9dacb 100644 (file)
@@ -68,7 +68,6 @@ MarkdowneditorUndo.prototype = {
             this.states[this.markdowneditor.getCurrentPage()] = [
                 this.markdowneditor.contentMarkdown
             ];
-            console.log('ok',this.states,this.markdowneditor.editor.getMarkdown(),'ok')
         }
 
         let cs = this.markdowneditor.editor.getMarkdown();
index c6353ead24bf79018b5711bf448f430376bb2b62..f681ef024d1a699039a766b9b5c64149412e5f58 100644 (file)
@@ -26,6 +26,9 @@ body
             margin: 0 3px
             text-align: center
             color: #5d5d5d
+            &.disabled
+                color: #bbb
+                pointer-events: none
             svg
                 position: relative
                 top: 1px
index 1af5f0535155b9ce6d84f17ce9f75b23708d69c8..05dc732af1a8e3839c12ba05facfeea410a7a789 100644 (file)
@@ -1,5 +1,4 @@
 @php
-    $content = "ok";
     $fbdata=$fluidbook->getPageData()->getRawData();
     $fbdata['settings']['pages']=$fbdata['pages']=$fluidbook->getPagesNumber();
     $fbdata['settings']['imageFormat']=$fluidbook->getImageFormat();
@@ -78,7 +77,6 @@
         @foreach($filesdata as $key => $data)
             @if(strstr($key,".md"))
                 MARKDOWN_DATA["{{explode('.',$key)[0]}}"] = `{!! $data !!}`;
-                console.log(MARKDOWN_DATA)
             @endif
         @endforeach
     </script>