Git Product home page Git Product logo

ckeditor-nuxt's Introduction

ckeditor-nuxt

CKEditor 5 editor for nuxt apps. The component includes all free available plugins (except CKFinder, instead simple upload adapter used)

Requirements

yarn add nuxt
npm i nuxt

Component integration

yarn add @idist/ckeditor-nuxt
npm install --save @idist/ckeditor-nuxt

List of included plugins

  • Alignment,
  • AutoImage,
  • Autoformat,
  • Autolink,
  • BlockQuote,
  • Bold,
  • CloudServices,
  • Code,
  • CodeBlock,
  • Essentials,
  • FontBackgroundColor,
  • FontColor,
  • FontFamily,
  • FontSize,
  • Heading,
  • Highlight,
  • HorizontalLine,
  • Image,
  • ImageCaption,
  • ImageInsert,
  • ImageResize,
  • ImageStyle,
  • ImageToolbar,
  • ImageUpload,
  • Indent,
  • IndentBlock,
  • Italic,
  • Link,
  • LinkImage,
  • List,
  • ListStyle,
  • MathType,
  • MediaEmbed,
  • MediaEmbedToolbar,
  • PageBreak,
  • Paragraph,
  • PasteFromOffice,
  • RemoveFormat,
  • SimpleUploadAdapter,
  • SpecialCharacters,
  • SpecialCharactersArrows,
  • SpecialCharactersCurrency,
  • SpecialCharactersEssentials,
  • SpecialCharactersLatin,
  • SpecialCharactersMathematical,
  • SpecialCharactersText,
  • Strikethrough,
  • Subscript,
  • Superscript,
  • Table,
  • TableCellProperties,
  • TableProperties,
  • TableToolbar,
  • TextTransformation,
  • Title,
  • TodoList,
  • Underline,
  • WordCount

Usage

<template>
  <client-only placeholder="loading...">
    <ckeditor-nuxt v-model="contentHolder" :config="editorConfig"  />
  </client-only>
</template>

<script>
export default {
  components: {
    'ckeditor-nuxt': () => { if (process.client) { return import('@blowstack/ckeditor-nuxt') } },
  },
  data() {
    return {
      editorConfig: {
        simpleUpload: {
          uploadUrl: 'path_to_image_controller',
          headers: {
            'Authorization': 'optional_token'
          }
        }
      },
      contentHolder: ""
    }
  }
}
</script>

Customization

To make customization use editorConfig object. It works the same way as the default ckeditor 5. More info at https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html

For example if you want to disable Title plugin:


editorConfig: {
    removePlugins: ['Title'],
}

You can also change the behaviour of any plugin. For the Title plugin you can change for example the placeholder:


editorConfig: {
    title: {
        placeholder: 'h1'
    }
}

ckeditor-nuxt's People

Contributors

andymark-by avatar blowstack avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.