Skip to content

🐛 fix bug on editor form with highlightjs #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"axios": "^0.21.1",
"canvas-confetti": "^1.4.0",
"choices.js": "^9.0.1",
"highlight.js": "^11.7.0",
"htm": "^3.1.0",
"intl-tel-input": "^17.0.13",
"preact": "^10.5.15",
Expand Down
14,032 changes: 14,021 additions & 11 deletions public/css/app.css

Large diffs are not rendered by default.

11,606 changes: 11,602 additions & 4 deletions public/css/filament.css

Large diffs are not rendered by default.

73,683 changes: 73,681 additions & 2 deletions public/js/app.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=14e78ed3da0550befb1ae94a465013f5",
"/css/app.css": "/css/app.css?id=e949df09924e368d035a31b5f215b118",
"/css/filament.css": "/css/filament.css?id=31807c66ef04b2d10d4b1a197a767d07"
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css",
"/css/filament.css": "/css/filament.css"
}
1 change: 1 addition & 0 deletions resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "tailwindcss/utilities";

@import '../../vendor/filament/forms/dist/module.esm.css';
@import "~highlight.js/styles/atom-one-dark.css";
@import '~choices.js/public/assets/styles/choices.css';
@import '~intl-tel-input/build/css/intlTelInput.css';

Expand Down
8 changes: 8 additions & 0 deletions resources/js/helpers.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import hljs from 'highlight.js'
import Choices from 'choices.js'

// Create a multiselect element.
window.choices = (element) => {
return new Choices(element, { maxItemCount: 3, removeItemButton: true });
}

// Syntax highlight code blocks.
window.highlightCode = (element) => {
element.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block);
})
}

// Create Capitalize string
window.capitalize = (string) => string.replace(/^\w/, (c) => c.toUpperCase())

Expand Down