mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
wip [skip-ci]
This commit is contained in:
Vendored
+268368
-3
File diff suppressed because one or more lines are too long
Vendored
+825
-2
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/js/filament.js": "/js/filament.js?id=f6f25b9e29038b97ab02",
|
||||
"/css/filament.css": "/css/filament.css?id=6c535b061a634e638d45"
|
||||
"/js/filament.js": "/js/filament.js",
|
||||
"/css/filament.css": "/css/filament.css"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
@pushonce('filament-styles:markdown-editor-component')
|
||||
<style>
|
||||
.markdown-editor .prose pre {
|
||||
color: inherit;
|
||||
background-color: inherit;
|
||||
}
|
||||
</style>
|
||||
@endpushonce
|
||||
|
||||
@pushonce('filament-scripts:markdown-editor-component')
|
||||
<script src="http://127.0.0.1:5500/dist/oak.umd.js"></script>
|
||||
@endpushonce
|
||||
|
||||
<x-forms::field-group
|
||||
:column-span="$formComponent->getColumnSpan()"
|
||||
:error-key="$formComponent->getName()"
|
||||
:for="$formComponent->getId()"
|
||||
:help-message="$formComponent->getHelpMessage()"
|
||||
:hint="$formComponent->getHint()"
|
||||
:label="$formComponent->getLabel()"
|
||||
:required="$formComponent->isRequired()"
|
||||
>
|
||||
<div
|
||||
x-data="Oak({
|
||||
value: null,
|
||||
onUpdate(_, value) {
|
||||
this.value = value
|
||||
},
|
||||
classes: {
|
||||
textarea: 'block w-full px-2.5 rounded shadow-sm placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $errors->has($formComponent->getName()) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}'
|
||||
},
|
||||
placeholder: {{ json_encode($formComponent->getPlaceholder()) }},
|
||||
})"
|
||||
x-init="init"
|
||||
class="markdown-editor"
|
||||
wire:ignore
|
||||
>
|
||||
<div
|
||||
x-spread="elements.editor"
|
||||
class="block w-full p-2 font-sans placeholder-gray-400 placeholder-opacity-100 bg-white border-gray-300 rounded shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 max-w-none"
|
||||
></div>
|
||||
</div>
|
||||
</x-forms::field-group>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Filament\Forms\Components;
|
||||
|
||||
class MarkdownEditor extends Field
|
||||
{
|
||||
use Concerns\HasPlaceholder;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Filament\Resources\Forms\Components;
|
||||
|
||||
class MarkdownEditor extends \Filament\Forms\Components\MarkdownEditor
|
||||
{
|
||||
use Concerns\InteractsWithResource;
|
||||
}
|
||||
Reference in New Issue
Block a user