Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Html converter #178

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/notus/example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:notus/convert.dart';
import 'package:notus/notus.dart';

void main() {
Expand All @@ -21,6 +22,9 @@ void main() {
print(change);
});

final a = NotusHTMLCodec().encode(doc.toDelta());
print(a);

// Dispose resources allocated by this document, e.g. closes "changes" stream.
// After document is closed it cannot be modified.
doc.close();
Expand Down
4 changes: 4 additions & 0 deletions packages/notus/lib/convert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
/// Provides codecs to convert Notus documents to other formats.
library notus.convert;

import 'src/convert/html.dart';
import 'src/convert/markdown.dart';

export 'src/convert/html.dart';
export 'src/convert/markdown.dart';

/// Markdown codec for Notus documents.
const NotusMarkdownCodec notusMarkdown = NotusMarkdownCodec();

const NotusHTMLCodec notusHTML = NotusHTMLCodec();
Loading