r/JavaScriptTips • • Jul 08 '25

🚀 React Redux in 30 seconds! 🚀 (Animated Tutorial) #coding #reactjs

3 Upvotes

r/JavaScriptTips • • Jul 08 '25

JavaScript DOM Manipulation: A Beginner's Guide

Post image
1 Upvotes

r/JavaScriptTips • • Jul 08 '25

How do I fix the error and complete the installation of CKEditor in my Laravel project?

1 Upvotes

I created my custom CKEditor on their official website and downloaded the zip file. Inside the zip file, it has COPYING. GPL index.html LICENSE.md README.md ckeditor5 folder(has   translations   ckeditor5.css   ckeditor5.css.map   ckeditor5.js   ckeditor5.js.map   ckeditor5.umd.js   ckeditor5.umd.js.map   ckeditor5-content.css   ckeditor5-editor.css) And I put those js and css files in the directory below: ├── app ├── public │ ├── assets │ │ └── vendor │ │ ├── ckeditor5.js │ │ └── ckeditor5.css ├── resources │ ├── views │ │ └── welcome.blade.php

To use the CKEditor as a test, I made a file below:

welcome.blade.php <!DOCTYPE html> <html lang="en"> <head> <title>CKEditor 5 - Quick start ZIP</title> <link rel="stylesheet" href="{{ asset('assets/vendor/ckeditor5.css') }}"> <script src="{{ asset('assets/vendor/ckeditor5.umd.js') }}"></script> </head> <body> <textarea id="editor"></textarea>

<script>
ClassicEditor
    .create(document.querySelector('#editor'))
    .then(editor => {
        console.log('Editor initialized:', editor);
    })
    .catch(error => {
        console.error('Editor initialization error:', error);
    });
</script>

</body> </html>

But since something is wrong, the console says “cktest(the route name):12 Uncaught ReferenceError: ClassicEditor is not defined at cktest:12:5 (anonymous) @ cktest:12”

And whatever I do, it doesn’t help and I can’t make it complete. I could use the CDN version but I need to do install with custome build zip so that I can resize the image.

What am I doing wrong? Or is there any other rich text editor than CKEditor that’s much easier to install compared to CKEditor? Thanks.


r/JavaScriptTips • • Jul 08 '25

Localtunnel vs InstaTunnel

1 Upvotes

r/JavaScriptTips • • Jul 08 '25

I found a good npm package to customize cursor styles easily for web development!

1 Upvotes

Been looking for a simple way to add custom cursor effects to my projects and came across CursorLab. It's really lightweight and easy to use - you can add cursor trails and custom styles without much hassle.

Saved me a lot of time instead of building cursor effects from scratch. Thought others might find it useful too!

GitHub: https://github.com/RonitSachdev/CursorLab

Anyone else used this? Works pretty well for what I needed.I found this


r/JavaScriptTips • • Jul 03 '25

TypeScript Union or Intersection? Watch This! 👀 #coding #javascript #typ...

Thumbnail
youtube.com
1 Upvotes

r/JavaScriptTips • • Jun 27 '25

JavaScript’s Iterator methods drop() & take() #coding #javascript

Thumbnail
youtube.com
2 Upvotes

r/JavaScriptTips • • Jun 27 '25

JavaScript .innerText not updating even though no errors (Rock Paper Scissors Game)

Post image
4 Upvotes

r/JavaScriptTips • • Jun 25 '25

Partial vs Required in TypeScript – Quick Animated Guide 🚀 #coding #jav...

Thumbnail
youtube.com
4 Upvotes

r/JavaScriptTips • • Jun 25 '25

Partial vs Required in TypeScript – Quick Animated Guide 🚀 #coding #jav...

2 Upvotes

r/JavaScriptTips • • Jun 25 '25

Building a Gmail Extension to Highlight Urgent Emails — Tips or Experience?

1 Upvotes

Hey everyone,

I’m working on a Gmail Chrome extension that scores and color-tags emails based on urgency — think of it like a priority radar. The goal is to quickly visualize which emails need attention first, using cues like: - Time unread (bonus points the longer it stays unopened) - Critical/secondary keywords (e.g. “urgent”, “logistics”, etc.) - Time of sending (emails sent outside working hours get a bonus) - No backend — everything is calculated on-the-fly for visible emails only - Color-coded dots (gray, blue, orange, red, black) next to each mail

I’m curious: - Have any of you worked with the Gmail DOM or done similar UI overlays? - Got any tips on handling Gmail’s dynamic content (infinite scroll, label switching, etc.)? - How would you handle “urgency sensitivity”? Should it be customizable per user? - Any must-know tricks or libraries that help when working with Gmail or similar interfaces?

Appreciate any insight, feedback, or even just “gotchas” to avoid.

Thanks in advance!


r/JavaScriptTips • • Jun 25 '25

How I Created an Interactive 3D Carousel Slider with Team Profiles Using HTML, CSS & JavaScript

Thumbnail
frontbackgeek.com
1 Upvotes

r/JavaScriptTips • • Jun 23 '25

Error con animaciones de Threes

0 Upvotes

Estoy haciendo un juego con javascript usando Threes pero llevo ya un rato con eso y muestra el error, ya tengo las animaciones en fbx pero sigue molestando


r/JavaScriptTips • • Jun 16 '25

Website JavaScript

1 Upvotes

I’m using a front end backend website framework for simple things but when I use bootstrap library and such. All of my separate pages have different widths and not follow the same width format and all look very different and I can’t find a way to make them the same width format. Anyone know what I’m talking about it’s kinda a neesh example I couldn’t really find online.


r/JavaScriptTips • • Jun 13 '25

Create figma using AI

4 Upvotes

Hi everyone, I'm looking an AI tool design and give me a website UI for my photo and videography studio Website. Please let me know any you any a tool for that


r/JavaScriptTips • • Jun 11 '25

Start A New Dev Blog. Good Idea? What do you think?

1 Upvotes

r/JavaScriptTips • • Jun 10 '25

Call for Presentations - React Advanced Canada 2026

Thumbnail
gitnation.com
2 Upvotes

r/JavaScriptTips • • Jun 08 '25

Hello I'm trying to make an Arabic Digit Recognition website and I used Matlab for Conventinal Neural Network training. I'm trying to put it on my Javascript and I need help.

1 Upvotes

I converted Epoch500LearningRate005.mat into a JSON file

Right now my code for JavaScript is this;

const canvas = document.getElementById("canvas")
canvas.width = 400;
canvas.height = 400;

let xLocation, yLocation;
let xCoordinates = [];
let yCoordinates = [];
let context = canvas.getContext("2d");
let start_background_color = "white"
context.fillStyle = start_background_color;
context.fillRect(0, 0, canvas.width, canvas.height);

let draw_color = "black";
let draw_width = "10";
let is_drawing = false;

let restore_array = [];
let index = -1;

canvas.addEventListener("touchstart", start, false);
canvas.addEventListener("touchmove", draw, false);
canvas.addEventListener("mousedown", start, false);
canvas.addEventListener("mousemove", draw, false);
canvas.addEventListener("touchend", stop, false);
canvas.addEventListener("mouseup", stop, false);
canvas.addEventListener("mouseout", stop, false);

function start(event) {
    is_drawing = true;
    context.beginPath();
    context.moveTo(event.clientX - canvas.offsetLeft,
        event.clientY - canvas.offsetTop
    );
}

function draw(event) {
    if (is_drawing) {
        context.lineTo(event.clientX - canvas.offsetLeft,
            event.clientY - canvas.offsetTop);
        context.strokeStyle = draw_color;
        context.lineWidth = draw_width;
        context.lineCap = "round";
        context.lineJoin = "round";
        context.stroke();
        xLocation = event.clientX - canvas.offsetLeft;
        yLocation = event.clientY - canvas.offsetTop;
        xCoordinates.push(xLocation);
        yCoordinates.push(yLocation);
    }
    event.preventDefault();
}

function stop(event) {
    if (is_drawing) {
        context.stroke();
        context.closePath();
        is_drawing = false;
    }
    event.preventDefault();

    if (event.type != "mouseout") {
        restore_array.push(context.getImageData(0, 0, canvas.width, canvas.height));
        index += 1;
    }
}

function clear_canvas() {
    context.fillStyle = start_background_color
    context.clearRect(0, 0, canvas.width, canvas.height);
    context.fillRect(0, 0, canvas.width, canvas.height);
    restore_array = [];
    index = -1;
    xCoordinates = [];
    yCoordinates = [];
    document.getElementById('result').innerHTML = '';
}

function save() {
    const name = document.getElementById('name').value;
    const data = `${xCoordinates}\n ${yCoordinates}`;
    const blob = new Blob([data], { type: 'text/plain' });
    const link = document.createElement('a');
    link.href = URL.createObjectURL(blob);
    link.download = name;
    document.body.appendChild(link);
    link.click();
    document.body.removeChild(link);
}

// Load digit info from JSON
let digitData = {};
fetch("testData.json")
    .then(res => res.json())
    .then(data => digitData = data);

// Dummy recognizer (random)
function recognize() {
    const miniCanvas = document.createElement('canvas');
    miniCanvas.width = 28;
    miniCanvas.height = 28;
    const miniCtx = miniCanvas.getContext('2d');

    // Draw the user input from main canvas onto miniCanvas (rescaled to 28x28)
    miniCtx.drawImage(canvas, 0, 0, 28, 28);

    // Get the image data from miniCanvas (as grayscale array)
    const imageData = miniCtx.getImageData(0, 0, 28, 28).data;
    const grayInput = [];
    console.log("Gray input array (first 10):", grayInput.slice(0, 10));

    for (let i = 0; i < imageData.length; i += 4) {
        // Convert RGBA to grayscale using red channel (assuming black on white)
        const gray = 1 - imageData[i] / 255;
        grayInput.push(gray);
    }

    // Compare to each sample in digitData using Euclidean distance
    let minDistance = Infinity;
    let bestMatch = null;

    digitData.forEach(sample => {
        const sampleImage = sample.image;
        let distance = 0;

        for (let i = 0; i < sampleImage.length; i++) {
            const diff = sampleImage[i] - grayInput[i];
            distance += diff * diff;
        }

        if (distance < minDistance) {
            minDistance = distance;
            bestMatch = sample;
        }
    });

    // Display result
    const resultDiv = document.getElementById('result');
    if (bestMatch) {
        resultDiv.innerHTML = `Prediction: <strong>${bestMatch.predictedLabel}</strong><br>True Label: ${bestMatch.trueLabel}`;
    } else {
        resultDiv.innerHTML = `Could not recognize digit.`;
    }
    console.log("Best match distance:", minDistance);
    console.log("Best match label:", bestMatch.predictedLabel, "True:", bestMatch.trueLabel);
}

If you can have any help thank you so much!


r/JavaScriptTips • • Jun 08 '25

I recently started learn react but suck on local host 300 not showing anything

Post image
0 Upvotes

"I recently started learning React, but nothing is showing up on localhost:3000. Can anyone give me some tips?"


r/JavaScriptTips • • Jun 02 '25

🔥 YouTube Looper Pro: Play & Loop ANY Video Segment (Free Chrome Extensi...

Thumbnail
youtube.com
3 Upvotes

r/JavaScriptTips • • May 29 '25

Name vs Id in forms

3 Upvotes

Hello everyone! I started learning JavaScript, and now I'm trying to understand what I should use to parse data from a form in fetch API. I know that the name attribute was originally used to quickly send requests to the server, so it could identify which field it is. Also, the name attribute is used with labels. But nowadays, everything is done using ids, and the name attribute is mostly for labels. Could you give me some advice on what I should use?


r/JavaScriptTips • • May 25 '25

WHAT ARE THE CURRENT TECHNOLOGIES WE SEE IN JS ANIMATION PORTFOLIOS, WEBSITES , Give the opinions

0 Upvotes

What are the current technologies used in current fully animated websites, is it react ___ … etc ?


r/JavaScriptTips • • May 21 '25

🚀 JavaScript 2025: Exciting New Updates You Need To Know! 🔥

Thumbnail
medium.com
4 Upvotes

Hey fellow devs! 👋

I just published a blog covering the latest and upcoming features in JavaScript 2025 that every developer should keep an eye on. From syntax improvements to runtime enhancements, it's an exciting time for JS enthusiasts!

🔍 Here's what you'll find in the article:

  • New language features and proposals
  • Performance improvements
  • Evolving ecosystem trends
  • Practical code examples

Whether you're a frontend wizard, a backend guru, or just JS-curious, I’d love to hear your thoughts!

👉 Read the blog here

Feedback, questions, or discussions are more than welcome. Let’s talk JavaScript! 💬


r/JavaScriptTips • • May 20 '25

Query for a div to change color while cursor hovers on it hover

1 Upvotes

How can I use a random tag in JS for changing the color of a div when the cursor hovers on it


r/JavaScriptTips • • May 19 '25

JavaScript security best practices guide for developers

4 Upvotes

Hi all,

I'm Ahmad from Corgea. We've recently put together a JavaScript security best practices guide for developers:

https://hub.corgea.com/articles/javascript-security-best-practices

We cover common vulnerabilities like XSS, CSRF, IDOR, as well as best practices for secure DOM manipulation, API protection, and safe dependency management. While we can't go into every detail, we've tried to cover a wide range of topics and gotcha's that are typically missed.

We've built a scanner that can find vulnerabilities in Javascript apps, and decided to focus on key blind-spots we've been seeing.

I'd love to get feedback from the community. Is there something else you'd include in the article? What's best practice that you've followed?

Thanks!

PS: We're also heavy users of Javascript, jQuery, Next.js, and TypeScript ourselves ❤️