Skip to content

Commit f281a12

Browse files
committed
update readme
1 parent 1272847 commit f281a12

File tree

12 files changed

+60
-95
lines changed

12 files changed

+60
-95
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.rest

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
POST https://xv1.dapatkanbansosspkh2025.kggaw.com/req/thr.php

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# A document editor
1+
# Make Your Thesis Easily? :D

app/Http/Controllers/DocumentController.php

+13-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private function filter($contents)
3131
if ($c['attrs']['level'] !== 1) {
3232
$result[] = $c;
3333
}
34-
}else {
34+
} else {
3535

3636
$result[] = $c;
3737
}
@@ -107,15 +107,23 @@ public function save(Request $request, $chapter)
107107
}
108108
}
109109

110-
public function delete(Document $document){
110+
public function delete(Document $document)
111+
{
111112

112113
Storage::disk('local')->deleteDirectory("documents/{$document->id}");
113114
$document->delete();
114-
return ;
115+
return back()->with('success', 'Document Terhapus!');
116+
}
115117

116118

117-
}
119+
public function compile(Document $document)
120+
{
118121

122+
$files = Storage::disk('local')->allFiles("documents/{$document->id}");
119123

120-
public function compile() {}
124+
foreach ($files as $file) {
125+
$object = json_decode($file);
126+
// $object->compile();
127+
}
128+
}
121129
}

index.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
require __DIR__ . '/../oktaax/vendor/autoload.php';
4+
5+
$app = new class extends \Oktaax\Oktaax {
6+
// use Oktaax\Trait\Laravelable;
7+
};
8+
9+
// $app->laravelRegister(new Oktaax\Types\Laravel(__DIR__));
10+
$app->get("/",function($req, $res){
11+
return 1 ;
12+
});
13+
14+
$app->listen(8000,function($url){
15+
echo "started at $url";
16+
});

resources/js/Components/TableSettings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const TableSetting: React.FC<TableSettingOptions> = ({ editor }) => {
8383
<div className="flex px-0.5 py-0.5">
8484
<button
8585
onClick={() => {
86-
editor?.chain().focus().deleteFigureTable().run()
86+
editor?.chain().focus().deleteNode("figureTable").run()
8787
}}
8888
className="disabled:opacity-50 text-xs text-center px-2 py-0.5 bg-red-800 rounded-md text-white">Delete Table</button>
8989
</div>

resources/js/Pages/Tes.tsx

-57
This file was deleted.

resources/js/Tiptap/Extenstions/FigureTable.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ export const FigureTable = Figure.extend({
127127

128128
],
129129
}).run(),
130-
deleteFigureTable:()=> this.editor
130+
deleteFigureTable:()=> {return this.editor
131131
.chain()
132132
.focus()
133-
.deleteNode('figureTable')
134-
.run()
133+
.deleteNode('figureTable')}
134+
135135

136136
}
137137

resources/js/Tiptap/Extenstions/Image.ts

-5
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ declare module "@tiptap/core"{
141141

142142

143143

144-
},addKeyboardShortcuts() {
145-
return {
146-
"Delete": () => this.editor.commands.deleteImage(),
147-
"Backspace": () => this.editor.commands.deleteImage(),
148-
};
149144
}
150145

151146

resources/js/Tiptap/Extenstions/Table.ts

+21-22
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,28 @@ const CustomTableCell = TableCell.extend({
5959
},
6060
addNodeView() {
6161
return ({ node }) => {
62-
const td = document.createElement('td');
63-
const wrapper = document.createElement('div');
64-
td.setAttribute('align', node.attrs.align);
65-
wrapper.style.display = 'flex';
66-
wrapper.style.flexDirection = "row"
67-
// wrapper.style.width = '100%';
68-
wrapper.style.alignItems = "center";
69-
wrapper.style.justifyContent = node.attrs.align === 'center' ? 'center' : node.attrs.align === 'right' ? 'flex-end' : 'flex-start';
70-
td.appendChild(wrapper);
71-
return {
72-
dom: td,
73-
contentDOM: wrapper,
74-
update(updatedNode) {
75-
if (updatedNode.type !== node.type) return false;
76-
node = updatedNode;
77-
td.setAttribute('align', node.attrs.align);
78-
td.setAttribute('colspan',node.attrs.colspan)
79-
td.setAttribute('rowspan',node.attrs.rowspan)
80-
wrapper.style.justifyContent = node.attrs.align === 'center' ? 'center' : node.attrs.align === 'right' ? 'flex-end' : 'flex-start';
81-
return true;
82-
},
62+
const td = document.createElement('td');
63+
const wrapper = document.createElement('div');
64+
td.setAttribute('align', 'center');
65+
wrapper.style.display = 'flex';
66+
wrapper.style.flexDirection = "row"
67+
wrapper.style.alignItems = "center";
68+
wrapper.style.justifyContent = "center";
69+
td.appendChild(wrapper);
70+
return {
71+
dom: td,
72+
contentDOM: wrapper,
73+
update(updatedNode) {
74+
if (updatedNode.type !== node.type) return false;
75+
node = updatedNode;
76+
td.setAttribute('align', 'center');
77+
td.setAttribute('colspan',node.attrs.colspan)
78+
td.setAttribute('rowspan',node.attrs.rowspan)
79+
wrapper.style.justifyContent = "center";
80+
return true;
81+
},
82+
};
8383
};
84-
};
8584
},
8685
addCommands(): Partial<any> {
8786
return {

resources/js/ziggy.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/app.blade.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
1414

1515
<!-- Scripts -->
16+
1617
@routes
1718
@viteReactRefresh
1819
@vite(['resources/js/app.tsx', "resources/js/Pages/{$page['component']}.tsx"])
1920
@inertiaHead
21+
2022
<script>
2123
window.addEventListener("load", () => {
2224
localStorage.removeItem('document-saved')
@@ -26,7 +28,6 @@
2628

2729
<body class="font-sans antialiased">
2830
@inertia
29-
{{-- <script src="http://127.0.0.1:5500/index.js"></script> --}}
3031

3132
</body>
3233

0 commit comments

Comments
 (0)