All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.bower_components.summernote.plugin.summernote-ext-hello.js Maven / Gradle / Ivy

The newest version!
(function ($) {
  // template, editor
  var tmpl = $.summernote.renderer.getTemplate();
  var editor = $.summernote.eventHandler.getEditor();

  // add plugin
  $.summernote.addPlugin({
    name: 'hello', // name of plugin
    buttons: { // buttons
      hello: function () {

        return tmpl.iconButton('fa fa-header', {
          event : 'hello',
          title: 'hello',
          hide: true
        });
      },
      helloDropdown: function () {


        var list = '
  • summernote
  • '; list += '
  • Code Mirror
  • '; var dropdown = ''; return tmpl.iconButton('fa fa-header', { title: 'hello', hide: true, dropdown : dropdown }); } }, events: { // events hello: function (layoutInfo) { // Get current editable node var $editable = layoutInfo.editable(); // Call insertText with 'hello' editor.insertText($editable, 'hello '); }, helloDropdown: function (layoutInfo, value) { // Get current editable node var $editable = layoutInfo.editable(); // Call insertText with 'hello' editor.insertText($editable, 'hello ' + value + '!!!!'); } } }); })(jQuery);




    © 2015 - 2025 Weber Informatics LLC | Privacy Policy