dotswan / filament-code-editor

Supercharge Filament with CodeMirror! Effortlessly edit CSS, HTML, JS, JSON, PHP in Filament forms.
MIT License
7 stars 1 forks source link

A couple of questions questions #1

Closed binaryfire closed 6 months ago

binaryfire commented 6 months ago

@mohaphez Hi Hessam!

I'm was looking for an alternative to the old Filament Code Editor plugin and came across yours. Just wondering if it supports dark mode and if there's an option to make the field read-only (for displaying non-editable code)?

mohaphez commented 6 months ago

Hi Dear Raj !

Yes, the editor supports the filament dark mode like this.

image

image

For now, it does not have a read-only option, but I will soon add it to the package. Stay tuned ;)

binaryfire commented 6 months ago

Hi @mohaphez. That's great, thanks! I'm going to give it a try :)

One suggestion regarding the dark mode styling: I think the line numbers bar should be dark as well. Here's an example dark theme from the CodeMirror site: https://codemirror.net/5/demo/theme.html#blackboard. Having a white line numbers bar in dark mode is a bit hard on the eyes...

Another feature that'd be great in combination with read-only mode is a an optional "Copy code" button (to copy the field contents to the clipboard). I'd normally create an Action for that but I think a lot of people would find it useful.

mohaphez commented 6 months ago

Dear Raj,

I extend my sincere gratitude for your constructive suggestions.

Following our discussions and the recommendations provided, additional features have been incorporated into the plugin, now available in version 1.1.0.

For further details, please refer to the documentation.

Should you have any further suggestions, please do not hesitate to inform us. We warmly welcome them.

binaryfire commented 6 months ago

Hi @mohaphez. Many thanks for incorporating these suggestions! And I'll definitely let you know if I have any other ideas.