TinyMCE and Codesample

Post Reply
mkj
Jr. Bludit
Posts: 7
Joined: Sat Oct 01, 2016 9:45 am

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?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Perhaps the configuration of the firewall by your hoster causes the problem.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
Jay
Master Bludit
Posts: 133
Joined: Mon Feb 11, 2019 8:41 pm

Try to encode your content to entities firstly and then paste into tinymce.
Or use simplemde / tail.writer markdown editors.
mkj
Jr. Bludit
Posts: 7
Joined: Sat Oct 01, 2016 9:45 am

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.
User avatar
Jay
Master Bludit
Posts: 133
Joined: Mon Feb 11, 2019 8:41 pm

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.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Which other plugins are installed and activated?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
mkj
Jr. Bludit
Posts: 7
Joined: Sat Oct 01, 2016 9:45 am

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.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

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.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply