Open slightfoot opened 3 years ago
@bk-one @salihgueler let's figure out where this ticket belongs in terms of priority
not important right now
Sorry to hear it, FWIW it's important to us...
Let's aim then for the next release? We do only add markdown right now, but happy to reevaluate after we released 0.1 in the coming weeks
That would be awesome, thank you!
That said if there's support for markdown I believe it's backwards/forward convertible to HTML so it should work for us as is
@hillelcoren please check serializeDocumentToMarkdown
and deserializeMarkdownToDocument
functions for Markdown implementation.
@hillelcoren have you or anyone on your team tried out the editor? I was generally aware of your interest in the editor but wasn't aware that you were keeping an eye on it. Can you say a little bit about your timeline for adoption and list your MVP features for the editor?
I've actually jus started working on it, if the editor is ready we'd go live with it immediately. We were going to use HTML but if markdown is ready that could work for us, our main use case is to generate HTML based emails.
We won't know if it's ready until you tell us it's ready :)
I would recommend trying to integrate it and then filing issues for any bugs you come across, or MVP feature requests. As you file issue, it would also be helpful to see any visual designs or screenshots of that part of your product in action so that we can glean surrounding context.
I spent a few hours this morning working on it, here are my notes.
pub get
to complete on the stable channel but following a suggestion from @matthew-carroll I was able to get it to work on dev.super_editor/lib/src/default_editor/document_interaction.dart:639:31: Error: A value of type 'bool'
can't be returned from a function with return type 'KeyEventResult'.
- 'KeyEventResult' is from 'package:flutter/src/widgets/focus_manager.dart'
('../flutter/packages/flutter/lib/src/widgets/focus_manager.dart').
onKey: (node, event) => true,
^
Happy to create a separate issue if needed...
@hillelcoren I think a separate issue would be good. Let's keep this issue tracking HTML support.
When you file a new issue, can you include the code that causes the error, and include the platform you're running on and the flutter --version
info?
@hillelcoren can you outline your requirements for HTML (de)serialization? It looks like this ticket was filed as an empty placeholder, so we'll need to figure out what the specific deliverable is before we can work on this.
Our main use case initially is to provide a WYSIWYG editor for HTML emails. We'd like to support basic formatting (bold, italic, font size, etc) but don't need to support complex layouts. Note: markdown would also work.
In the future we'd like to support something closer to this: https://grapesjs.com
Thanks for your work on the project, it's already pretty impressive!
@hillelcoren if markdown will work for you then that would make more sense because we already support markdown.
grapejs looks to be a full-blown application that goes far beyond document layouts. You may be able to use some of the building blocks from super_editor
in building such a tool, but general layout definitely goes beyond the goals of document layout and editing.
Until we hear otherwise from a customer, I'm going to consider this ticket as being on-hold because there doesn't appear to be anyone that truly needs this behavior at this time.
Hi @matthew-carroll, for my use-case I'm parsing and pre-processing html documents, and currently rendering them in a ListView
with HtmlWidgets. HtmlWidget
currently doesn't support selectable text, so it would be convenient if I can render directly using super_editor
.
Hi @sabetAI. I have a couple questions about your use-case:
super_editor
by leveraging an existing package to go from HTML to markdown, and then from markdown back to HTML?Hi @matthew-carroll,
<p>
and <a>
elements at the moment, with some styling ie bold font, italics, sup. Nothing layout-related. @sabetAI yeah, my guess is that you can do HTML -> markdown without issue. Please post back after you get a chance to try that and let us know if it works for your needs.
I can't remember for sure, but I think the markdown
package that we're already including may offer HTML-to-markdown translation.
I've got a basic implementation with test coverage, it's probably worth completing https://github.com/superlistapp/super_editor/issues/86 before integrating it in the repo though as it depends on the html package.
I think this issue should be explained better. How can I keep this document suitable for api. SuperEditor export not explained
@bugrevealingbme can you please rephrase your comment as a specific question?
EDIT: This ticket was filed early in the project lifecycle because we assumed HTML would be an important interchange format for
super_editor
. At this time, we haven't identified any specific requirements among customers that require HTML instead of markdown (which we already support). Therefore, I'm marking this ticket as parked.