YAFLogo

GothicWizard
5 years ago
If you look here, https://worldofdarkness.news/Forums/g/posts/m/50/V20-vs-DA 

You will see YAF is rendering posts with double line breaks. In the editor it looks fine, and in other modules this does not happen only in YAF. There seems to be some setting I am overlooking to fix this, where should I look in YAF settings? Thank you!

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 years ago
Which Yaf Version? I remember this was already fixed. And also which editor are you using?
GothicWizard
5 years ago

Which Yaf Version? I remember this was already fixed. And also which editor are you using?

Originally Posted by: tha_watcha 

yaf 2.2.4.15 DNN 9.2.2 and your CKEDITOR 2.01.20

GothicWizard
5 years ago
For the record, I upgraded to your newest version of YAF and still shows the double BR.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 years ago
I can confirm the issue. the only solution is to go to the editor settings and define a custom js file in the portal home directory with the content...

CKEDITOR.on( 'instanceReady', function( ev ) {
var blockTags = ['div','h1','h2','h3','h4','h5','h6','p','pre','li','blockquote','ul','ol',
  'table','thead','tbody','tfoot','td','th',];

  for (var i = 0; i < blockTags.length; i++)
  {
     ev.editor.dataProcessor.writer.setRules( blockTags[i], {
        indent : false,
        breakBeforeOpen : false,
        breakAfterOpen : false,
        breakBeforeClose : false,
        breakAfterClose : false
     });
  }
} );

the problem is i would not recommend to use the editor with yaf. the ckeditor that is included with yaf is the better option!

GothicWizard
5 years ago
So do I name the file anything I want with the extension .js then? Because I copy that text into a text file, named it editor.js and put it int he root of my portal. I go into the CKEDITOR config and use the pull down menu under custom js file and no option appears to select. Wondering if I have to name it something specific for it to be picked up?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 years ago
Sorry i forgot, you need to add js file types to the list of allowed file types in the dnn host settings first.
GothicWizard
5 years ago

Sorry i forgot, you need to add js file types to the list of allowed file types in the dnn host settings first.

Originally Posted by: tha_watcha 

I put "js" as a allowed extension in the DNN setting. But the pull down menu still does not show any option. Just to be clear the path I should be putting the file is this, correct?

/worldofdarkness.news/wwwroot/Portals/_default

I also put it here too /worldofdarkness.news/wwwroot/Portals/0

And it still does not pick it up. Any ideas?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 years ago
You need to upload the file via the dnn file manager. Or go to the file manager and syncronize the folder with the database. Then the file will appear.