Hello Everyone,

HELP!  It seems I need training regarding how to use the Forum WYSIWYG editor:

INPUT:

OUTPUT:

Most helpful answers

If anyone finds any issues with the forum site, it would be helpful if they be reported in https://github.com/backdrop-ops/forum.backdropcms.org/issues. People who are maintaining these sites are not always going to be reading content on the sites to look for issues :) 

Someone sent me a PM about the issue (thank you Graham) - and though I'm not exactly sure what the problem is, it sounded like there was a request to allow a <BR> tag on the Standard / filtered_html format, and since that seemed like a harmless change, I have done that. 

If anything else is needed, please use the issue queue to ensure the request is not overlooked.

 

I already wrote on this forum that for more flexible formatting you need to allow the <br> tag, it is necessary. But it was never turned on.

“Allowed HTML tags” can be found in the settings of each CKEditor format, like /admin/config/content/formats/filtered_html

Comments

I'd recommend that you use the Markdown filter instead of Standard. Standard has many issues. Click on Formatting Options and chose Markdown. 

Markdown is a shorthand non-WYSIWYG that is super helpful for writing code blocks etc. 

https://www.markdownguide.org/basic-syntax/

This is a test <NL>
of the WYSIWYG editor <CR>

That features a code block <CR>

function code_block() {

  $whatever = "whatever";

}

...seems to be working now...except for <NL>....<CR>

Let's try a bunch of <NL>, whch are CTRL-ENTERs

<NL>
<NL>
<NL>

OK, <NL> is now preserved in the editor window, let's look at the HTML thus generated (which is also preserved in the editor window):

<p>
   &lt;NL&gt;<br>
   &lt;NL&gt;<br>
   &lt;NL&gt;
</p>
<p>
   Nope, &lt;NL&gt; is never preserved
</p>

But, the EDIT display is not preserved when the post is SAVED:
 

Here's the post source:

Here's the page source:

Looks like <br> (which should be <br/> no?) are being stripped from the posting.

Perhaps this is a configurable element of the WYSIWYG widget?

Is the following setting in force (assuming the WYSIWYG widget is CKEDITOR)?
 

 

Docs, more docs and small demo

Source:

https://stackoverflow.com/questions/38538680/how-to-remove-br-tags-in-ckeditor

Also:

In:

config-body.js 

As:

 

CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.uiColor = '#AADC6E';
config.autoParagraph = false;
config.AllowedContent = 'br[clear]';
};

 

Source:

https://processwire.com/talk/topic/14279-ckeditor-strips-tags-from-input/

Also:

https://github.com/ckeditor/ckeditor5/issues/766

 Finally:

 

 

I already wrote on this forum that for more flexible formatting you need to allow the <br> tag, it is necessary. But it was never turned on.

“Allowed HTML tags” can be found in the settings of each CKEditor format, like /admin/config/content/formats/filtered_html

Hello @Enthusiast,

OK, great!  Good to know I'm not alone when it comes to this issue.

Have escalated.  

Let's see if this can get fixed.

It sure is a drag to see a well-crafted post turn into scrambled eggs.   :)

jenlampton's picture

If anyone finds any issues with the forum site, it would be helpful if they be reported in https://github.com/backdrop-ops/forum.backdropcms.org/issues. People who are maintaining these sites are not always going to be reading content on the sites to look for issues :) 

Someone sent me a PM about the issue (thank you Graham) - and though I'm not exactly sure what the problem is, it sounded like there was a request to allow a <BR> tag on the Standard / filtered_html format, and since that seemed like a harmless change, I have done that. 

If anything else is needed, please use the issue queue to ensure the request is not overlooked.

INPUT & PREVIEW:

OUTPUT:

Thanks @jenlampton!

TESTING <NL>
the new setting that accepts <BR> in <CR>

Message Postings <NL>

function forum_working() {

  $hope_forum_is_working = TRUE;

}

Let's take a look....

YAAY!  @jenlampton has saved the day! <NL>
<NL>

...ooops!  Maybe not....

OK,

Take 2: <NL>
<NL>
I was told by @jenlampton that the feature had to be re-implemented due to an unrelated systems upgrade that <NL>
Caused a rollback.<CR>

According to her, the <BR> handling has since been re-implemented.<NL>
<NL>
Here's some code: <CR>

function take_two() {

  $hope_it_works_this_time = TRUE;

}
<CR>

g.

----

INPUT:

I suggest we let the changes regarding < BR > roll until next week and if there's no further reports of postings being scrambled we close it and consider it solved....and document how it was solved...

g.

----

As a content manager, I have edited and published thousands of texts with different content, and there has never been a case where a harmless <BR> created problems, it is impossible.

Hello Everyone,

After a few days of posting I think we can consider this issue RESOLVED.

Addressing this issue involved asking the Administrator of the Forum to adjust the content filtering settings in CKEDITOR5 to allow the <BR> tag to be allowed to propagate from the edit window to the published posting.  An example of the interface where these values can be set in CKEDITOR5 can be seen at:

https://i.sstatic.net/Ec5BM.png

Previously, the <BR> tag was not in the list of allowed HTML tags.  

Now it is.  Thanks @jenlampton!

g.
----