Skip to content
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

Add support for placeholder text #140

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KhodorAmmar
Copy link

Adds a new default options "placeholder".
Adding a placeholder will add a data-placeholder attribute on the contenteditable area.
Using css's :empty show and hide the "placeholder" text on the content area.

@KhodorAmmar
Copy link
Author

Closes #136

@lougreenwood
Copy link

Any movement on this PR? looks like an excellent addition @jaredreich?

@pleerock
Copy link

  • 1

@lougreenwood
Copy link

@jaredreich any news on this PR? Looks mighty useful for the community - perhaps you have some concerns which @KhodorAmmar can address?

@KhodorAmmar
Copy link
Author

I can see a conflict in the demo.html now, but i can update if the maintainer is happy with the edits

@jaredreich jaredreich added this to To do in v2 Apr 25, 2019
@Duder-onomy
Copy link

@jaredreich FWIW, I am using @KhodorAmmar's code in a fork in production right now.
The placeholder support works well.

@EamonNerbonne
Copy link

Hmm, as the linked #174 shows, it's not necessarily the case that "conceptually blank" maps very well to css :empty. This PR would kind of require that that mapping stay supported in the future, to avoid breaking changes.

Wouldn't a better alternative be for pell to set some marker class conceptuallyEmpty or whatever, and let people style that? That way, you're not dependant on potentially invisible markup differences in determining whether to show the placeholder; and it also means that if in the future you want to start with a top-level <p> or whatever - you can.

Possibly even simpler to implement and reason about, and potentially good enough for a placeholder might be a concept hasNeverContainedContent which you only ever set to false (i.e. give up on re-showing the placeholder if the user explicitly makes the editable area empty).

@ghaiat
Copy link

ghaiat commented Oct 15, 2019

Hello , any chance this gets merged anytime soon ?

@patzila
Copy link

patzila commented Nov 6, 2019

+1

I would also like this to get merged

@jaredreich
Copy link
Owner

Apologies to everyone waiting for this. I'm planning to give pell some love very soon.

@RossMWoods
Copy link

I was looking for a program that produced skinny html and Pell is the best I have found so far.

Here are my reasons:

  1. Easy to install. Just copy the folder and create a desktop link to demo.html. (Most of the competitors have complicated instructions and plugins.)
  2. Skinny html is simple, clean code.
  3. I just copy stuff in and format it with buttons, and immediately get a section of skinny html that I can copy and paste elsewhere.

The future:

  1. I can't see the need for the "text" output box.
  2. Some things could shrink even more but adding features will grow it.
  3. I'd like to see the features equal those of tinymce and its plugins, and most of those form Trumbowyg, including copy and paste from other file types. I'd also like to see a simple head and /head added with a save file option.
  4. I wonder if there will be two versions: one simply to generate html files (as I need), and one to be used in online forms like tinymce.

@antony
Copy link

antony commented Mar 18, 2020

I'm also in favour of this

@simonfranzen
Copy link

Code works as expected! Good job! Please merge someone :D

@ryansully
Copy link

This sounds great! When can this be merged?

@leonetti
Copy link

Would love this to be merged!

@mcat-ee
Copy link

mcat-ee commented Jul 9, 2021

@jaredreich is there a timeline on resolving this?

@VaelVictus
Copy link

Does anyone know if it's possible to fork Pell and then pull some of these requests in? I think our god has abandoned us.

@antony
Copy link

antony commented Nov 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
v2
To do
Development

Successfully merging this pull request may close these issues.

None yet