removed lazy tinymce mount since the relation are now preloaded

This commit is contained in:
Gani Georgiev
2026-04-23 00:01:30 +03:00
parent 3566ba3729
commit 257f03e1fa
4 changed files with 16 additions and 23 deletions

View File

File diff suppressed because one or more lines are too long

2
ui/dist/index.html vendored
View File

@@ -13,7 +13,7 @@
<!-- prism -->
<script src="./libs/prism/prism.js" data-manual></script>
<script type="module" crossorigin src="./assets/index-CZV9KoEP.js"></script>
<script type="module" crossorigin src="./assets/index-CzeH6zOJ.js"></script>
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
<link rel="stylesheet" crossorigin href="./assets/index-h3OAAQQg.css">
</head>

View File

@@ -249,7 +249,7 @@ window.app.components.select = function(propsArg = {}) {
tabIndex: -1,
role: "button",
className: "ri-close-line link-hint btn-option-unset",
ariaLabel: app.attrs.tooltip("Unset", "left"),
ariaLabel: app.attrs.tooltip("Unset"),
onclick: () => {
toggle(opt);
return false;

View File

@@ -7,27 +7,9 @@
export function input(props) {
const uniqueId = "editor_" + app.utils.randomString();
const local = store({
lazyEditor: null,
});
return t.div(
{
className: "record-field-input field-type-editor large-modal",
onmount: () => {
requestAnimationFrame(() => {
local.lazyEditor = app.components.tinymce({
id: uniqueId,
required: () => props.field.required,
convertURLs: () => props.field.convertURLs,
name: () => props.field.name,
value: () => props.record[props.field.name] || "",
onchange: (val) => {
props.record[props.field.name] = val;
},
});
});
},
},
t.div(
{ className: "field" },
@@ -36,7 +18,18 @@ export function input(props) {
t.i({ className: app.fieldTypes.editor.icon, ariaHidden: true }),
t.span({ className: "txt" }, () => props.field.name),
),
() => local.lazyEditor,
() => {
return app.components.tinymce({
id: uniqueId,
name: () => props.field.name,
required: () => props.field.required,
convertURLs: () => props.field.convertURLs,
value: () => props.record[props.field.name] || "",
onchange: (val) => {
props.record[props.field.name] = val;
},
});
},
),
() => {
if (props.field.help) {