Closed farley13 closed 7 years ago
@akarasev - so still seeing a few issues here -
"My first paragraph
my second paragraph"
is rendered as <p> My first paragraph my second paragraph </p>
- I think we should render it as either
`
My first paragraph
my second paragraph
` or `My first paragraphmy second paragraph
` 4. It looks like the text is still editable when you are logged out - I logged in, made some changes. Logged out and when visiting that article, still was able to edit the text.Instead of developing custom code to fix those issues, I have used a plugin X-editable. This approach works much better.
@akarasev - this is looking much better - I think 2 could still use a cleanup - maybe we can increase the size of the text in the editor via CSS?
@akarasev - I also see the same text being used when I switch back and forth between slides - and it doesn't look like it's saving the text... :(
I can't save the article with two section. I have an error:
db_1 | STATEMENT: update "article_sections" set "name" = $1, "display_order" = $2 where "article_sections"."id" = 1
web_1 | 03:48:36 [error] application - Unknown error
web_1 | org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "article_sections_name_article_id_key"
web_1 | Detail: Key (name, article_id)=(New Section, 1) already exists.
Why did it happen?
Anyway, changing text in slides seems to be fixed, now. Please, take a look at your environment.
CSS issue. We could use inputclass
as described here, but other bootstrap css needs to be fixed as well, because if I'll just add h2
and h3
, x-editable buttons looks corrupted.
CSS almost fixed.
I've disabled buttons for single line inputs and added classes to render input text. Now, to submit edited text, hit enter.
The last problem is to add !important
to the h2
and h3
classes. I'm not familiar with sass. Please, tell me where it can be done?
@akarasev - so on the error - I think that's something I can improve in my branch - it's complaining because there is already a slide named "New Section" - if you rename the first slide (to say "My First Slide" and save, it should work.
For css - you can add it to application_styles.scss - it supports vanilla css - so that should work fine.
@akarasev - on the h2,h3 editors - can you update it so in addition to enter - clicking outside the text also updates the text. Meaning only the X inside the text box will cancel the update.
@akarasev - When editing slide 2 - I am still getting slide 1's text in the editor. Without editing - things look good - they switch back and forth - but once I start editing - I see the old text instead of the current text.
repo steps:
create 2 slides. edit heading for 1 to be slide 1, edit heading for 2 to be slide 2. Go back to slide 1. Edit 1, it shows "slide 1" but once the editor loads, the text in the editor will be "slide 2". This might be due to form posts or similar? On confirmation you might set both text and value (I know for textarea this was required).
I was able to reproduce it. Interesting thing, it's related to slides, but not to article's title. Will try to find out the reason.
There are a few issues here:
Given 1 and 2 - we shouldn't be able to edit text when we don't have permissions as you can currently (though can't save obviously).