Markdownify
12 min
this connector converts html text to markdown options this connector supports the following options strip a list of tags to strip this option can't be used with the convert option convert a list of tags to convert this option can't be used with the strip option autolinks a boolean indicating whether the "automatic link" style should be used when a a tag's contents match its href defaults to true default title a boolean to enable setting the title of a link to its href, if no title is given defaults to false heading style defines how headings should be converted accepted values are atx , atx closed , setext , and underlined (which is an alias for setext ) defaults to underlined bullets an iterable (string, list, or tuple) of bullet styles to be used if the iterable only contains one item, it will be used regardless of how deeply lists are nested otherwise, the bullet will alternate based on nesting level defaults to ' + ' strong em symbol in markdown, both and are used to encode strong or emphasized texts either of these symbols can be chosen by the options asterisk (default) or underscore respectively sub symbol, sup symbol define the chars that surround \<sub> and \<sup> text defaults to an empty string, because this is non standard behavior could be something like and ^ to result in sub and ^sup^ newline style defines the style of marking linebreaks ( \<br> ) in markdown the default value spaces of this option will adopt the usual two spaces and a newline, while backslash will convert a linebreak to \\\n (a backslash and a newline) while the latter convention is non standard, it is commonly preferred and supported by a lot of interpreters escape asterisks if set to false , do not escape to \\ in text defaults to true escape underscores if set to false , do not escape to \\ in text defaults to true keep inline images in images are converted to their alt text when the images are located inside headlines or table cells if some inline images should be converted to markdown images instead, this option can be set to a list of parent tags that should be allowed to contain inline images, for example \['td'] defaults to an empty list wrap, wrap width if wrap is set to true , all text paragraphs are wrapped at wrap width characters defaults to false and 80 use with newline style=backslash to keep line breaks in paragraphs actions html to markdown convert html text to markdown input argument name type required description html string required html string to convert autolinks boolean optional a boolean indicating whether the “automatic link” style should be used when a a tag’s contents match its href bullets array optional an iterable list of bullet styles to be used if the iterable only contains one item, it will be used regardless of how deeply lists are nested otherwise, the bullet will alternate based on nesting level defaults to ' + ' convert array optional a list of tags to convert this option can’t be used with the strip option default title boolean optional a boolean to enable setting the title of a link to its href, if no title is given escape asterisks boolean optional if set to false, do not escape to in text escape underscores boolean optional if set to false, do not escape to in text heading style string optional defines how headings should be converted accepted values are atx, atx closed, setext, and underlined (which is an alias for setext) keep inline images in array optional images are converted to their alt text when the images are located inside headlines or table cells if some inline images should be converted to markdown images instead, this option can be set to a list of parent tags that should be allowed to contain inline images, for example \['td'] newline style string optional defines the style of marking linebreaks ( ) in markdown the default value spaces of this option will adopt the usual two spaces and a newline, while backslash will convert a linebreak to \n (a backslash and a newline) while the latter convention is non standard, it is commonly preferred and supported by a lot of interpreters strip array optional a list of tags to strip this option can’t be used with the `convert`` option strong em symbol string optional in markdown, both and are used to encode strong or emphasized texts either of these symbols can be chosen by the options asterisk (default) or underscore respectively sub symbol string optional define the chars that surround text defaults to an empty string, because this is non standard behavior could be something like and ^ to result in sub sup symbol string optional define the chars that surround text defaults to an empty string, because this is non standard behavior could be something like and ^ to result in ^sup^ wrap boolean optional if wrap is set to true, all text paragraphs are wrapped at wrap width characters defaults to false and 80 use with newline style=backslash to keep line breaks in paragraphs wrap width number optional if wrap is set to true, all text paragraphs are wrapped at wrap width characters defaults to false and 80 use with newline style=backslash to keep line breaks in paragraphs output parameter type description markdown string output field markdown example \[ { "markdown" "string" } ]