Comments (20)
Same here please reopen.
from medium-editor.
Hi Guys,
I am using FF and medium editor 5.22.1 and I still have the issue... When I click an empty editable and type my first character the text move out the
wrapper and this break my design.So first I have
<p><br/></p>
and then I have <br/><p></p>
. It happens only with FF (current version 54) on linux and windows.I read a lots of thing here about this but it seems there is no real solution...
I tried to disable the placeholder but I get the same behavior...
Is there a solution in the pipe?
from medium-editor.
This issue has come back in the latest version. I think it should be re-opened, or I could open a new issue for it.
from medium-editor.
Yes, I'm running into this issue now. I've been trying to think of a workaround to no avail.
from medium-editor.
How would you go about fixing this? It's quite annoying for me, as I have a margin bottom set on my p element and everything looks great except for the first raw text segment.
from medium-editor.
This is worse than i thought... -when it's not a p element you can't change it to another block element like h1/h2
from medium-editor.
I too am seeing this behavior.
On Thursday, October 3, 2013, jwahdatehagh wrote:
This is worse than i thought... -when it's not a p element you can't
change it to another block element like h1/h2—
Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-25601138
.
Colin Treseler
+46 (0) 72-361-60-63
Twitter: @CTres
http://ctres.github.io
www.linkedin.com/in/ctres
from medium-editor.
Not sure if we need to do somehting about raw text, without elements, on a blank state.
The h1/h2 behavior was fixed with #44
from medium-editor.
I think it's fine then. It should only be addressed if there is a "clean" way to fix this.
from medium-editor.
@dmitric you could just start your contenteditable area with a <p> instead of being empty, no? But I will try to take a look at this soon.
from medium-editor.
I just updated from c4fd023 to latest, and checked out this issue before and after. Actually on c4fd023 it seemed to be the correct behaviour. Using a div for .editable, the first text entered (before enter/newline!) would be wrapped in a
tag. This is the correct behaviour in my opinion.
After updating to latest, the initial text is "raw", not in a
tag. As stated in the issue.
Starting the contenteditable with a
tag is not a solution, as this would wrap the entire written text in that
tag, and not just the first paragraph, no?
UPDATE
@daviferreira, @dmitric Reverting f963783 seems to solve this issue.
from medium-editor.
Hmmm, I don't think it has something to do with those commits. It was always like that. I tried anyway reverting and checking out, still the same.
I'm still deciding which approach to take. We could use a paragraph as placeholder, like Medium. But then there is issue #50. We could also insert a paragraph to empty contenteditables, but then we have to focus on the paragraph when the user enters the editable area. Another approach is to wrap the first character typed into a paragraph, or something like that.
from medium-editor.
@daviferreira, are you sure? I've compared the behaviour of reverted and latest two-three times now, and it works when reverted.
Given an empty .editable: <div class='editable'></div>
, writing "hello", enter and then "hello2" gives
for latest:
<div class='editable' ... >
hello
<br ></br>
<p> hello2 </p>
</div>
for revert:
<div class='editable' ... >
<p> hello </p>
<p> hello2 </p>
</div>
The latter seems to be the desired behaviour, I think.
from medium-editor.
Odd! Which browser are you using, @jarlg?
from medium-editor.
@daviferreira, I am using Firefox 24.0! I didn't think to check other browsers, so sorry for that.
from medium-editor.
Nah, my bad, got it now. You were right all along, it was because I've changed the keypress event to keyup. Cheers, man, thanks.
from medium-editor.
@daviferreira, glad to be of help!
from medium-editor.
Could you guys try it out please, it's on master.
from medium-editor.
Looks great except for now the placeholder is shifted down. In order to fix it, I set the .medium-editor-placeholder:after
pseudo element to be
position:absolute;
top: 0;
and then it was perfect! Great work.
EDIT: Sorry I see you've done the same, I use my own CSS file so missed that.
from medium-editor.
works perfectly! Thanks so much, guys!
from medium-editor.
Related Issues (20)
- Toolbar not showing on selecting text.
- Allow linebreaks instead of paragraphs for copy-pasted code HOT 2
- Import for sveltekit HOT 1
- uploadCompleted option issue
- Handling bi-directional text RTL mixed with LTR HOT 3
- Update your list of plugins
- Usage with React? HOT 3
- Use inside `ShadowRoot`: Framework LitElement
- No placeholder on elements added to editor
- Can't add images HOT 1
- Let H1 - H6 Button Icons work with fontawesome v5 & v6
- How to disable undo/redo ?
- Is it possible to reduce the amount of times a user can 'Indent'
- Duplication of First letter in Korean
- Any way to add photo through plus button like medium??
- Is there a way to always show the plus icon for the new line instead of on hovering? HOT 1
- paste with cleanPastedHTML=true dont keep line break
- Project Status HOT 3
- value goes missing when we style it second time in iframe
- Question: Is it possbile to have two toolbars on the same class? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
tag
from medium-editor.