-
Notifications
You must be signed in to change notification settings - Fork 438
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
Bugs with indented code #465
Comments
It seems that it can be solved by applying a css property |
I encountered this today: one comment was not formatted properly on site and I wanted to edit it in the admin. But in the admin, no line breaks are respected in the display and worst they are lost on save. I gave your solution a try and it fixes display, which is nice. But if I edit the comment, add line breaks and saves, the line breaks are lost. From what I understand, it comes from the fact that we rely on a div with <div id="isso-text-202">
Test 1
</div> I'll get after the edit: <div id="isso-text-202" class="" contenteditable="false">
<div>Test 1</div>
<div>Test 2</div>
</div> The display is correct (because by default I worked on a fast workaround for the admin: use To fix this in the "standard edit" on the website, I think you could do something similar: when the user is editing, we rely on a Let me know what you think. If it sounds like a good idea to you, I should be able to complete the fix for the admin and the standard edit page. |
Any thoughts on that? |
I thoroughly agree with @Jenselme - the way the whole editing is implemented as This is currently the "solution" for converting between HTML and plaintext: @Jenselme if you could re-upload your work again (repo seems deleted), I believe you might have some better approaches than my spaghetti code. |
I wonder if maybe it would be nicer to replace the admin page with instead being able to log in as an admin on the comment section. Should I make an issue to track that? |
That'd be nice as an addition, but keeping the "traditional" admin still makes sense to me.
Feel free. |
The whole part about the indentation not being preserved when editing seems to be fixed if you just add Editing anything on the admin page seems to work fine currently..? However there are drawbacks to replacing the postbox with a However, I looked at a few other examples (Commento, Remark42, Talkyard, Flarum, Discourse, even the box I'm typing in right now on GitHub) and they all use a Maybe if we can style the In summary, I think @Jenselme's solution is probably best, so I'll try and do this on the main Isso post box, based on what seems to already work on the admin dashboard. |
I wasn't able to look into this earlier. I looked at #887 and it seems like something good 👍 |
Failed to load resource: the server responded with a status of 403 () embed.min.js:18 Not authorized to remove this comment!
. Not sure what the default behavior should be in this case.I made a gif to illustrate these bugs. I find the most important that in the admin panel there is no line breaks, any comment displayed in one line.
The text was updated successfully, but these errors were encountered: