jberger / Galileo

A Simple Modern Perl CMS
http://galileo-cms.herokuapp.com
166 stars 38 forks source link

Embedded HTML in Markdown (pagedown) #18

Closed borisdaeppen closed 11 years ago

borisdaeppen commented 11 years ago

I tried to embed some HTML in the wiki editor, but it does not seem to work. I tried img and table.

This seems kind of important to me. Otherwise it is just to limited! Sometimes you just want to have images not centred, or some data in a table. Also to set some styles with CSS it would be helpful to set own attributes for the tags... (afaik and imho)

Is it that the pagedown ( http://code.google.com/p/pagedown/wiki/PageDown ) engine used for formatting does not support that? Or am I just not getting the trick?

jberger commented 11 years ago

Pagedown operates in two modes. In the configuration file you can pick a sanitizing editor or not. Sadly this is a global choice, but I can't figure out how to effectively set it per page. See https://github.com/jberger/Galileo/blob/master/lib/Galileo.pm#L50

It is also in the configuration utility.

Cheers On Sep 27, 2013 5:46 PM, "Boris Däppen" notifications@github.com wrote:

I tried to embed some HTML in the wiki editor, but it does not seem to work. I tried img and table.

This seems kind of important to me. Otherwise it is just to limited! Sometimes you just want to have images not centred, or some data in a table. Also to set some styles with CSS it would be helpful to set own attributes for the tags... (afaik and imho)

Is it that the pagedown ( http://code.google.com/p/pagedown/wiki/PageDown) engine used for formatting does not support that? Or am I just not getting the trick?

— Reply to this email directly or view it on GitHubhttps://github.com/jberger/Galileo/issues/18 .

borisdaeppen commented 11 years ago

Hmmm... so if I understand correctly, then I have to uncheck the use sanitizing editor option? But when I'm doing so, there is an error at http://127.0.0.1:3000/store_config

Incorrect number of configuration keys at /home/perl/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Galileo/Command/setup.pm line 54.
jberger commented 11 years ago

This error, though perhaps badly worded, is supposed to help catch deprecated or incorrect configuration options. Have you looked at the configuration file and the changes files for Galileo?

borisdaeppen commented 10 years ago

Ok, I checked the config file galileo.conf and changed the value sanitize from 1 to 0 manually and now it just works...

But there is really a bug! I just set up a new page from scratch and if I uncheck this option use sanitizing editor it just gives me errors and nothing gets even created. This should be a reproducible bug can somebody else try to reproduce it? Just run galileo setup go to the URL mentioned, uncheck the option use sanitizing editor and try to create a website.

Bugs like this make people just leave their fingers from Galileo after a first test.

hrupprecht commented 10 years ago

Hi @all, When sanitized editor is unchecked, the sanitized parameter is not sent. So differs configured params from gotten params. The trick is to add a hidden field with same name and value 0, to always submit parameter even it's unchecked patch

2nd patch don't show sanitized checkbox always checked

Joel, Should I send a pull request too ?

jberger commented 10 years ago

Please do! On Nov 28, 2013 7:05 AM, "Holger Rupprecht" notifications@github.com wrote:

Hi @all https://github.com/all, When sanitized editor is unchecked, the sanitized parameter is not sent. So differs configured params from gotten params. The trick is to add a hidden field with same name and value 0, to always submit parameter even it's unchecked patchhttps://github.com/hrupprecht/Galileo/commit/afb54a7f7f1101bf8455d9b1257578772f99ce9a

2nd patchhttps://github.com/hrupprecht/Galileo/commit/482010fdd3e94531d31d16b73366c5858bbb3b9f#diff-34993db23fddba3bab459e3988d37224don't show sanitized checkbox always checked

Joel, Should I send a pull request too ?

— Reply to this email directly or view it on GitHubhttps://github.com/jberger/Galileo/issues/18#issuecomment-29462225 .