GithubHelp home page GithubHelp logo

Comments (3)

jarlg avatar jarlg commented on August 22, 2024

How would you like this to be implemented? Could add a simple data-disable-placeholders='true', what do you think of that?

I think currently the placeholders aren't very nice. I am working a bit on implementing "templates" where you set some default elements (ex: h3, h4 and p) within your .editable and interpret these as a template, and each of the elements has a placeholder. This conflicts with current placeholders, and I would need to make something like data-disable-placeholders='true' and data-enable-templates='true'. I don't think that's really nice. A solution would be to not have placeholders enabled by default, but something like the user manually adds the element to .medium-editor-placeholder.

I have made a suggestion here: jarlg/Medium-Editor@dc12d1783fd94332ff99a6d92a01e9ca04baaf9b and another commit (child of this one) that fixes some styling issues, but that might be just on my side.

Vaguely related:
Also, I've been wondering a bit about that "boundaries" of this project. Currently it says in the readme it is a clone of the medium toolbar, in which case I don't think placeholders/markdown should be implemented at all actually. However, the project is called Medium-Editor and in that context it makes more sense. What do you think, @daviferreira?

from medium-editor.

daviferreira avatar daviferreira commented on August 22, 2024

I think it should follow the disable-return and disable-toolbar pattern, with a global and a per element option to disable the placeholders. But I'm also not happy with current placeholders. I think perhaps they should be elements instead of pseudo elements for better styling and manipulation.

Well, it's not about the toolbar anymore, I think it never was since we have implemented contenteditable. I think the foucs should be on manipulating selected texts/elements. What I don't want to do is: image action, tables etc.

from medium-editor.

nmielnik avatar nmielnik commented on August 22, 2024

This is now supported via 'disablePlaceholders', though there isn't a data-disable-placeholder that can make the same functionality work...If we still want this, we should open a new issue.

from medium-editor.

Related Issues (20)

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.