Hi,
I noticed two problems with /code/ tag in editor:
1) It kills white space formatting, while it should preserve it as code should have correct indentation
2) It tried to color the code by some logic, but it looks suspicious
See comparison:
https://ae.amigalife.org/index.php?topic=1063.375
https://www.arosworld.org/infusions/forum/viewthread.php?thread_id=1116
amigamiaAdminPosted
2 years agoOK Thanks for reporting it. Let me do some testing and research. It's built-in PHPFusion CMS so I'll have to see if this is a known problem.
amigamiaAdminPosted
2 years ago[code]
$default = [
'title' => $locale['errunk'],
'status' => '505',
'back' => [
'url' => BASEDIR.'index.php',
'title' => $locale['errret']
]
];[/code]
Edited by amigamia on 29-08-2023 21:18,
2 years ago
amigamiaAdminPosted
2 years agoThe indentation and the cut off are a bugs of the TinyMCE editor I am afraid. I will have to report that to the developers and see if there is a work around.
As for the white background in the preview, that is theme specific. I think it can be fixed. I just need to find the right color codes in the theme to adjust them.
Hmm, maybe there is an option to install another/additional editor? I remember seeing some forums that had two editors to choose from.
Edit: something I found on topic: https://stackoverflow.com/questions/24595694/keep-indentation-when-paste-into-tinymce
Edited by deadwood on 16-08-2023 08:36,
2 years ago
amigamiaAdminPosted
2 years agoSo I installed a LAMP and set the whole PHP-Fusion up on a local computer. I also found where the tinyMCE.init is and tried to disable the paste plugin but it's not making any difference.
Looks like there are other people with this problem and seems to be associated with tinyMCE.
I am still playing and testing for now. Hopefully I get a breakthrough soon because it is annoying.
Thanks for working on this. Indeed it's quite annoying.
One thing I noticed is that when I hit preview with [code] tag, then the indentation is preserved and text is not colored. It actually looks acceptable for what I need. Only when the post is submitted the indentation is lost.
Also looking at this reference: https://www.php-fusion.org/bbcodes-overview.php
There is an alternative "geshi" code which seems to take language as parameter. I tried setting it to "python" (where indentations are super important), but still the spaces where eaten :/ Maybe this "geshi" element is something easier to adjust?