Open saculNiot opened 3 months ago
I think you can do it like this, a agree actualitythis is not the best way to do this, but it working expected for me :)
// sure you have tiptap-markdown installed in you project
import { Markdown } from "tiptap-markdown";
import { simpleExtensions as novelSimpleExtensions } from "novel/extensions";
const markdown = Markdown.configure({
// your config
});
// remove markdown extension from simpleExtensions array
export const simpleExtensions = novelSimpleExtensions.filter(
(ext) => ext.name !== "markdown"
);
// export your custom config of markdown extension and another extensions
export const defaultExtensions = [
// rest of extension
markdown,
...simpleExtensions
]
Thanks for the solution. Yeah, this could be the workaround. Let me try it out. Thanks.
did it work for you @saculNiot ? No luck here EDIT: hacky variant below worked for me
const markdown = simpleExtensions.find((ext) => ext.name === "markdown")
markdown!.options.transformCopiedText = false;
Describe the feature you'd like to request
I am trying to modify the config in the markdown under the
simpleExtensions
. I am planning to maketransformCopiedText
as false. Is there any way I can do it? Thankss in advanceDescribe the solution you'd like to see
It is better if we can overwrite the extensions in
simpleExtensions
just like the rest of extensions.Additional information
No response