question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a way to extends Convertor

See original GitHub issue

With the new customConvertor parameter, enabling usage of… a custom convertor, how to easily “extends” default one ?

I think it will be nice to be able to import Convertor, so we could write something like

import { Convertor } from 'tui-editor'

class MyConvertor extends Convertor {
    toHTML(string) {
        let toHTML = super.toHTML(string)
        /* Do custom stuff */
        return toHTML
    }
}

Is it possible, or is there already any way to do something like that ?

Version

1.4.6

Test Environment

Does not apply

Current Behavior

Does not apply

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dala00commented, Nov 2, 2019

I also need. I want to use default Convertor and convert markdown before converted to HTML.

When I convert html of around code in previewBeforeHook, the code highlight is not enabled there. So I need to convert markdown before converted.

Or I want convertBeforeHook

0reactions
dala00commented, Apr 6, 2021

No, we may want to convert when body changed immediately. So handler is needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Extending System.Convert
No, you can't add them to the Convert class - I would suggest adding conversion methods to your actual types, such as: MyCustomType....
Read more >
Extending System.Convert Class - MSDN - Microsoft
Hi,. I try to extend the System.Convert classe to add for exemple a methode to convert Image objet to byte[] (wich is pretty...
Read more >
Extending the sample by writing your own binding converter
In the Java perspective, select the Java project that contains the converter. · Right-click Properties. · Select Java Build Path > Libraries >...
Read more >
Guide to Spring Type Conversions
In this tutorial, we've seen how to use and extend Spring's type conversion system with various examples. As always, the full source code...
Read more >
org.directwebremoting.extend.Converter java code examples
How to use. Converter ... Best Java code snippets using org.directwebremoting.extend.Converter ... STARTUP.debug("- adding converter: " + converter.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found