Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10352592
content.jdd-editor.tsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
content.jdd-editor.tsx
View Options
import
type
{
Context
}
from
"koa"
;
import
type
{
FieldNames
}
from
"sealious"
;
import
{
TempstreamJSX
}
from
"tempstream"
;
import
type
Pages
from
"src/back/collections/pages.js"
;
import
{
EditJDDField
}
from
"@sealcode/jdd-editor"
;
import
html
from
"src/back/html.js"
;
import
{
registry
}
from
"src/back/jdd-components/registry.js"
;
import
{
makeJDDContext
}
from
"src/back/jdd-context.js"
;
import
{
defaultHead
}
from
"src/back/defaultHead.js"
;
import
{
PagesCRUDListURL
}
from
"src/back/routes/urls.js"
;
export
const
actionName
=
"EditPageContent"
;
export
default
new
(
class
JDDCreatePreviewPage
extends
EditJDDField
<
Pages
>
{
getCollection
(
ctx
:
Context
)
{
return
ctx
.
$app
.
collections
[
"pages"
];
}
getJDDFieldName
()
:
FieldNames
<
Pages
[
"fields"
]
>
{
return
"content"
;
}
async
renderPreParameterButtons
(
ctx
:
Context
)
{
const
item
=
await
this
.
getItem
(
ctx
);
return
(
<
div
>
<
a
href
=
{
PagesCRUDListURL
}
>
←
back
to
pages
<
/a>
<
h1
>
Edit
page
:
{
item
.
get
(
"title"
)}
<
/h1>{" "}
<
/div>
);
}
})({
html
,
registry
,
makeJDDContext
,
defaultHead
});
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sun, Nov 2, 17:26 (14 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1030453
Default Alt Text
content.jdd-editor.tsx (1 KB)
Attached To
Mode
rAPROXY Assetproxy
Attached
Detach File
Event Timeline
Log In to Comment