Open mhicauber opened 3 years ago
Based on the log, I guess your current formatting is called CKEditor
, not html
.
Also:
common_mark
format installed (it's still not released, see #32424), we have also released Docker images with this patch, links are in the ticket). Or you can use either the old markdown
for now.Hi @mhicauber
Did you have success with CKEditor migration to markdown? I have a similar issue.
Did you have success with CKEditor migration to markdown? I have a similar issue.
The issue in this ticket was the misconfigured from_formatting
, it should have been CKEditor
, not html
.
Hi @mhicauber Yes, I see that. But it is more about the migration in general, like service was used for migration, I mean what is inside of "http://localhost:9999".
As I understand there is no defaukt pipeline to convert html/ckeditor to markdown.
I would also like to know how this plugin could be used to convert from CKEditor's html format to either Textile or Markdown format.
I tried using the method provided by redmine_ckeditor :
rails redmine_ckeditor:migrate RAILS_ENV=production FROM=html TO=textile
But it gives poor results with textile, and really awful results with markdown.
I did a straightforward script that converted everything in DB using pandoc from HTML to markdown + remove all HTML attributes using Lua filter, for example, images still have it.
the result is more or less good, except for tables which broken, but we have no many of them.
conversation to commonmark is much better as it is partly support HTML, so tables is fine., but redmine_visual_editor plugging does not support commonmark yet, so I use redcarpet.
Thanks for the hint @rtyshyk. Would you care to share your conversion script ?
Using the command line I shared above to convert from html to Textile, some formatting was kept : <strong> <em> <h2> <img> <ul>
but some was lost :
<span style="">
for text color or other propertiesIt is php app, I was expecting to use it as a webserver for redmine_format, and do something complicated... but then just decided to do changes directly in db and keep in simple...
To convert it use
docker run --env DATABASE_URL='mysql://user:password@mysql:3306/redmine?serverVersion=8.0' rtyshyk/redmine-html-convert php -d memory_limit=1024M bin/console app:convert
To see sources
docker run rtyshyk/redmine-html-convert cat /app/src/Command/ConvertCommand.php
It seems that your server doesn't allow unauthenticated access :
$ docker run registry.711media.de/711media-internal/redmine/converter cat /app/src/Command/ConvertCommand.php
Unable to find image 'registry.711media.de/711media-internal/redmine/converter:latest' locally
docker: Error response from daemon: Head "https://registry.711media.de/v2/711media-internal/redmine/converter/manifests/latest": denied: access forbidden.
If the code is not too long, maybe you could post it here, as it is relevant to this issue's topic.
@sylvainfaivre I updated comment above with proper image name https://github.com/orchitech/redmine_reformat/issues/10#issuecomment-1143576979
I was using the ckeditor plugin for redmine (as I was using a really old redmine version, that didn't have any rich text capabilities at the time. Now that I've switch to last redmine version, I'd like to stick to native markdown syntax.
So i want to transform all this html stored content to markdown.
I've used following config, but I'm having an error
Any idea what might be wrong ?