Katana Editor

Medium style content editor for blog posts and more

How to use

          
<!-- Themed stylesheet -->
<link rel="stylesheet" href="build_path/css/main.{current_hash}.css" />

<!-- Bundled script -->
<script src="build_path/main.{current_hash}.js"></script>
          
        
          
<script type="javascript">
  // Configuration options
  const katanaObj = {
    selector: '#editor', // Id of element to attach to
    mode: 'write',
    base_content_options: ['image', 'video', 'section'], // Content toolbar options
    editorType: 'blog', // blog | publication 
    enableDraft: false, // When enabled lets you subscribe to changes 
    image : {
      upload: false,
      url: '/upload'
    },
    embed: {
      enabled: false,
      url: ''
    },
    placeholders: {
      title: 'Title here',
      subtitle: 'Start with introduction ..',
      embed: 'Paste a YouTube video link, and press Enter'
    }
  };
  const editor = new KatanaEditor(katanaObj);
  editor.init(() => {});
</script>
          
        

Editor modes

Editor can be initalized in various modes to support different feature set

  • write - Default blog writing mode with various editing and formatting options
  • read - Reader can leave notes against individual paragraphs, and share content on social media platforms
  • edit - Collaboration mode to share notes privately among editors
  • publication - Allows section to add different types of listing(requires backend support)

Text formatting

Supports following formatting options out of the box

Text toolbar options

Header 1

Header 2

Header 3

Paragraph

blockquote
Strong
Emphasis
Text align
Strong emphasis
Link

Embed Options

  • Images (multiple)
  • Videos
  • Sections
  • Blog listing section(publication mode)

Image Embed

  • Default position
  • Text inset
  • Page width
  • Text over background with parallax effect

Image Grid

Image grid with multiple layout options

  • Centered Grid
  • Page width

Examples

Miscellaneous

Image grids
Parallax effect with background images.
Support for user to leave notes.
Partial save for content