Page 1 of 1

TinyMCE and Codesample

Posted: Mon May 13, 2019 11:10 am
by mkj
I have activated Codesample which appears to work perfectly but the content isn't being saved. It appears to be Bludit is removing the code block contents when the page is being saved. I have tested this by editing the page directly and then opening the contents in the editor only to find the code has been removed yet the code tags are still in place. How can I make Bludit less restrictive to allow Codesample to work?

Re: TinyMCE and Codesample

Posted: Mon May 13, 2019 1:02 pm
by Edi
Perhaps the configuration of the firewall by your hoster causes the problem.

Re: TinyMCE and Codesample

Posted: Tue May 14, 2019 2:27 am
by Jay
Try to encode your content to entities firstly and then paste into tinymce.
Or use simplemde / tail.writer markdown editors.

Re: TinyMCE and Codesample

Posted: Tue May 14, 2019 10:58 am
by mkj
Edi wrote: Perhaps the configuration of the firewall by your hoster causes the problem.
I am using MAMP, which is pretty forgiving with regard to permissions and the like. HTACCESS file doesn't look like it would cause any problems either.
Jay wrote:
Tue May 14, 2019 2:27 am
Try to encode your content to entities firstly and then paste into tinymce.
Or use simplemde / tail.writer markdown editors.
I have tried it all ways.

TiinyMCE is working as intended and converting the code to entities (viewing the source code shows this), but on saving the code is being removed.

I have deactivated TinyMCE and used SimpleMDE which works until you try to edit the post - again, all the code is being removed.

I shall have to think outside the box and either use pictures or link to text files - something anyway.

Re: TinyMCE and Codesample

Posted: Wed May 15, 2019 1:30 am
by Jay
I had such peripeteia in wysiwyg editors.
It's either cms content processor who is responsible for clearing the content of unnecessary and possible harming code, or the wysiwyg editor plugin which is clearing the loaded content.
try to configure manually tinymce (in its config file, not bludit) as i have no idea what sort of content you try to post.
You can always disable all sort of editor plugins, and just edit the page content in a plain textarea field.


In upcoming 3.9 bludit version you can disable markdown parser if you use markdown style editors. But I don't feel it is going to solve your individual problem.
But anyway, you can try latest version in master branch, as Dignajar updated the tinymce plugin to latest 5.05(?) version.

I'm personally using Sambrishes tail.writer plugin.

ps. I assume that all the problems are related to cms and all its workflow, not the webhost security related issues.

Re: TinyMCE and Codesample

Posted: Wed May 15, 2019 10:41 am
by Edi
Which other plugins are installed and acrivated?

Re: TinyMCE and Codesample

Posted: Thu May 16, 2019 12:58 pm
by mkj
I have a workaround for this now. What I have done is to create a page and then to throw the whole lot in the HTML Entities Converter ...

https://online-toolz.com/tools/text-htm ... vertor.php

After this I edit the file created by Bludit directly in one of the text editors I have and simply paste in the above conversion. As long as I don't attempt to re-edit the file within Bludit the page will continue to display fine. I shall keep a backup in case I forget.

I have a weird setup. I wrote an Ebay Search Script, but then decided I needed a CMS attached to the script to write lots of content. All a bit of fun really but the result is quite interesting. The Bludit pages are being including through the URL $_GET variable. Works quite well. The Bludit directory is being protected with htaccess (IP restriction). I will be writing some articles with regard to Bludit in due course and including them in the site. The above page displays here ...

http://computers.searchbay.co.uk/main.p ... =BestMatch

The rest of the pages can be seen by clicking on the 'Pages' link located on the top menu.

Re: TinyMCE and Codesample

Posted: Thu May 16, 2019 1:23 pm
by Edi
mkj wrote:
Thu May 16, 2019 12:58 pm
I have a weird setup.
It seems that this causes the problem. It's not the normal behaviour of Bludit. ;-)

And: The plugin Codesample shows the code, and does not include it.