ElkArte Community

Project Support => Support => Topic started by: augras on April 19, 2018, 05:16:35 am

Title: [SOLVED]Can't write out a quote
Post by: augras on April 19, 2018, 05:16:35 am
Hi,
When i make a quote i can't write out of this quote !
I must go to the source and write after [/quote] to make it works.
It is just for me or a general bug ?
Have a nice day,
Philippe
Title: Re: Can't write out a quote
Post by: radu81 on April 19, 2018, 05:22:06 am
Quote from: augras – It is just for me or a general bug ?
It's not just you, but you can use "View source" into the editor (it's the last icon, that with an eye and a pen)
Title: Re: Can't write out a quote
Post by: Feline on April 19, 2018, 05:56:09 am
In the source for the editor tags add a space after the closed quote tag.
That worked perfectly ...
Title: Re: Can't write out a quote
Post by: emanuele on April 19, 2018, 07:40:17 am
hmm...
Adding a new line after the blockquote in themes/default/scripts/jquery.sceditor.elkarte.js changing this line:
Code: [Select]
content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote>';
to:
Code: [Select]
content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote><br>';
will fix the issue, but will also add an empty line any time the editor is switched between source and wysiwyg (that means at least once before the text is sent for posting).
In most of the cases if the user doesn't start playing with the toggle should be fine, at least until we find a proper fix I guess.

For the record: I added this change here on elk.net.
Title: Re: Can't write out a quote
Post by: augras on April 19, 2018, 12:18:34 pm
Thank you every body !
Philippe
Title: Re: [SOLVED]Can't write out a quote
Post by: Spuds on April 19, 2018, 07:35:47 pm
Quote from: Feline – In the source for the editor tags add a space after the closed quote tag.
That worked perfectly ...
I think this is the right approach as well.
Title: Re: Can't write out a quote
Post by: Feline on April 20, 2018, 04:07:43 am
Quote from: emanuele – hmm...
Adding a new line after the blockquote in themes/default/scripts/jquery.sceditor.elkarte.js changing this line:
Code: [Select]
content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote>';
to:
Code: [Select]
content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote><br>';



This will add a newline any time you toggle the Source mode...
As I said .. add a space after the closing BBC tag like
Code: [Select]
"[/quote] " 
Title: Re: [SOLVED]Can't write out a quote
Post by: augras on April 20, 2018, 04:54:34 am
Quote from: emanuele – hmm...
Adding a new line after the blockquote in themes/default/scripts/jquery.sceditor.elkarte.js changing this line:
Code: [Select]
content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote>';
to:
Code: [Select]
content = '<blockquote author="' + attr_author + '" link="' + attr_link + '" date="' + attr_date + '"><cite>' + sAuthor + ' ' + sDate + '</cite>' + content + '</blockquote><br>';
will fix the issue, but will also add an empty line any time the editor is switched between source and wysiwyg (that means at least once before the text is sent for posting).
In most of the cases if the user doesn't start playing with the toggle should be fine, at least until we find a proper fix I guess.

For the record: I added this change here on elk.net.

Hi,
if i put together your responses i just change
Code: [Select]
'</blockquote><br>'
by
Code: [Select]
'</blockquote>&nbsp;'
It works fine like this.
Thanks emanuele for the file and the line, and thanks Feline for the solution.
We are stronger together !
Philippe

EDIT1
Here the editor is by défault with code viewing and not wysiwyg.
And each time i edit my post there is a new line between the quote and my response : a new line when i open and a new one also when i submit... seems the
Code: [Select]
<br>
at the and of the line works.

Title: Re: [SOLVED]Can't write out a quote
Post by: badmonkey on April 20, 2018, 08:22:15 am
Would you guys mind terribly making this a git commit? Indeed it may be a bandaid for the moment, but at least it's better than leaving the issue unaddressed. Sure, it can be done manually. Then comes update time, and the next, and the next. If or when a proper fix comes along ripping off the bandaid can be part of that commit.  ;)
Title: Re: [SOLVED]Can't write out a quote
Post by: Spuds on April 20, 2018, 09:30:57 am
Here you go:

https://github.com/elkarte/Elkarte/pull/3161/commits/62606278c9a9c0d3ac5a1fae6ad4b0dae5527ee0