Code Monkey home page Code Monkey logo

easyeditor's Introduction

Yo! 👋

🐸 I'm Hadi, a full-stack developer from Calgary, Alberta, Canada. 💪 15+ years of experience in Web Design & Development.

Linkedin Badge facebook Badge Twitter Badge Instagram Badge StackOverflow Badge Email Badge Website Badge

Tech stack 🙈

Things I do outside of work

I watch 📺  shows on Netflix, 🎮  multiplayer online game (PUBG), play around with 🎸 and eat steak! 🥩

Visit habibhadi.com for more information 👍

easyeditor's People

Contributors

hadiaugmedix avatar im4all avatar lucanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyeditor's Issues

website refresh after clicking on buttons

i have added easyeditor to my website since it was minimalistic and actually could load angularjs content i had imported to a certain div. the thing is, whenever i click any of the buttons, website refreshes.

it might be hard to present code, website is pretty complex

How to get in touch regarding a security concern

Hey there!

I belong to an open source security research community, and a member (@ning1022) has found an issue, but doesn’t know the best way to disclose it.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

Lack of documentation where lib can be imported at ES-6 modules in Vite Projects

I have a case that I need to use the EasyEditor as ES-6 Module as follows:

import EasyEditor from 'easyeditor';

Usage Scenario with vite

The scenario I am doing is that I did first:

npm install --save jquery easyeditor

Then in my laravel project I used the vite with the following vite.config.js:

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

import { readdirSync,lstatSync } from 'fs';
import { resolve } from 'path';


function getFilesFromDir(dir) {
    const filesToReturn = [];

    function walkDir(currentPath) {

        if(lstatSync(currentPath).isFile()){
            filesToReturn.push(currentPath);
            return;
        }

        const files = readdirSync(currentPath);
        for (let i in files) {
            console.log(files[i]);
            const curFile = resolve(currentPath, files[i]);
            if(lstatSync(curFile).isDirectory()){
                walkDir(curFile);
                continue;
            }
            const file = resolve(currentPath, files[i]);
            filesToReturn.push(file);
        }
    }

    walkDir(resolve(__dirname, dir));
    return filesToReturn;
}


// Get all .css and .scss files in the directory
const js = getFilesFromDir('./resources/js');

const paths = [


    ...js,

    'node_modules/jquery/dist/jquery.js',
    'node_modules/jscroll/dist/jquery.jscroll.min.js',

    "node_modules/easyeditor/src/easyeditor.css",
    "node_modules/easyeditor/src/jquery.easyeditor.js"
]



export default defineConfig({
    plugins: [
        laravel({
            input:paths,
            refresh: true,
        }),
    ],
    build: {
        rollupOptions: {
            external: [
                "js/modules/*",
            ],
            include:[
                'assets/js/utils.js'
            ]
        }
    }
});

And then I do npm run build.

But in the documentation I see no case on how can be used with ES-6 modules. To be more specific I see no usage with vite into these pages:

That helps me to reduce the nessesary dependencies upon page load because vite (and webpack or silimar tools) do optimize Js code removing unsused functions, resulting faster page load.

Is there a way to do it?

Tab Order

It appears that textareas replaced with easyeditor are no longer part of the natural tab order for the form

Link input repeats itself

When I try to insert a link, the alert dialog opens up, I put a link and press the button - the same alert opens again. It happens three times even if I cancel it.

Update: it can happen more times. I thinks it delegates the same as the other issue i reported.

TIP: I think it would be better to make the prompt window not an alert, but a div that stick to the top of the text editor area (position:absolute) and upon save it closes up, better for mobile devices.

br issue

When I load the editor everything works fine. When I inject the HTML of the editor and initialize it, when clicking enter, it put an extra
. So the third time, it put three
instead of one.

I don't know why it works like that, because I can't find anything in the local storage or something that remembers the last input. I override the html and the textarea.

After debugging, when I press ENTER, the line: 'easyEditor.prototype.handleKeypress' runs twice and goes to the line that prints

.

Edit HTML

How can I put editable HTML in the editor. I tried putting HTML (e.g. link) in the textarea, and although it is rendered as link, I can't edit it nor remove it. I need it because I am making an edit window and using it to edit a chosen HTML text. So I need to be able ti import the HTML and edit it.

How can I do that?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.