Giter VIP home page Giter VIP logo

meteor-autoform-summernote's People

Contributors

bryankennedy avatar dandv avatar macncheeze avatar michalw avatar mpowaga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

meteor-autoform-summernote's Issues

Safari issue

I'm not being able to edit text on safari, changing to code view allows editing.
It's working properly on chrome and firefox.
This is happening in meteor 1.2.0.2 and 1.2.1, with different versions of autoform-summernote and summernote itself. This could be related with using autoform-modal.
I'm getting this error when clicking on the edit area:

TypeError: null is not an object (evaluating 'rng.isCollapsed')
update summernote.js:5971
summernote.keyup summernote.mouseup summernote.change summernote.scroll summernote.js:5935
dispatchjquery.js:4664
handlejquery.js:4332
triggerjquery.js:4573
(anonymous function)jquery.js:5283
eachjquery.js:383
eachjquery.js:135
triggerjquery.js:5282
triggerEventsummernote.js:1601
(anonymous function)summernote.js:3743
dispatchjquery.js:4664
handlejquery.js:4332

UPDATE: This is definitely related to using autoform-modals, regular autoform works ok.

No Databinding in Meteor 1.3.x

Good Afternoon,

i have updated to Meteor 1.3.x coming from 0.x Version.
Summernote worked fine before, but now existing text is not reflected in the control anymore. Same new typed text seems not to be bound to data as i receive a message that the string text is missing.

Something i missed to change?

thanks

Uncaught TypeError: undefined is not a function

Hi, After implementing summernote using the instructions in the README I am getting the error above when I try to submit the form. When I click on the error in the console, this function appears

AutoForm.addInputType('summernote', {
    template: 'afSummernote',
    valueOut: function() {
        return this.code();  (An 'x' Shows up on this line as the offender)
    }
});

I use Autoform 5.1.2

Summernote outputting code instead of formatted text in the browser

I am able to insert data in database successfully however, while outputting data in the browser it shows code like this

<p><b>abstract text comes here...</b></p> 

instead of

abstract text comes here...

Article schema

@Articles = new Meteor.Collection('articles');

Schema = {}

Schemas.Articles = new SimpleSchema
    abstract:
        optional:true
        type: String
        autoform:
            afFieldInput:
                type: 'summernote'
                class: 'abstract'
                height: 200

Article Template

        <table class="table table-bordered article-table">
            <tbody>
                {{#each articles}}
                    <tr>
                        <td colspan="2">
                            <h3>{{title}}</h3>
                            <p class="abstract-wrapper">
                                <p class="abstracts">
                                    {{abstract}}
                                </p>
                            </p>
                        </td>
                        <td>
                            <button type="button" class="btn btn-primary edit">Edit</button>
                        </td>
                        <td>
                            <button type="button" class="btn btn-danger delete">Delete</button>
                        </td>
                    </tr>
                {{/each}}
            </tbody>
        </table>

Tooltips position

I'm having problems with the location of tooltips on my app. They appear on layers below the modal.
This is happening on chrome, safari and firefox.
Is there a way to disable tooltips for the time being?

field is not populated reactively

When I "update" an autoform, the original form content is automatically populated. In my case, meteor usually subscribes a subset of the fields of the form. When the form is displayed, the client then subscribe all fields of the form. In this case, the form is rendered twice, once only showing a subset of fields populated, then it should show all fields populated. However, none of the summernote fields in the form are populated if it is subscribed in the second time. But all other non-summernote fields are still populated even if they are subscribed in the second time.

This is an issue with summernote fields?

Compatibility with [email protected]

Good afternoon,

Your package is really great and works like a charm. However, I need to switch to AutoForm 6.0 but your api version forbids it. Have you tried your package against AutoForm 6.0 and do you think you can release a new version with this compatibility?

Many thanks in advance.

Invalid definition for content field

I have a field named content, with the following definition, and for a reason I can't quite understand, I'm getting this field definition error.

content: {
        type: String,
        afFieldInput: {
            type: 'summernote',
            class: 'editor', // optional
            settings: {}// summernote options goes here
        }
    }

and the error:

W20160731-17:16:41.382(-4)? (STDERR) Error: Invalid definition for content field.
W20160731-17:16:41.382(-4)? (STDERR)     at packages/aldeed_simple-schema/simple-schema.js:457:1
W20160731-17:16:41.382(-4)? (STDERR)     at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
W20160731-17:16:41.383(-4)? (STDERR)     at [object Object].SimpleSchema (packages/aldeed_simple-schema/simple-schema.js:454:1)
W20160731-17:16:41.383(-4)? (STDERR)     at meteorInstall.collections.pages.js (collections/pages.js:3:17)
W20160731-17:16:41.383(-4)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
W20160731-17:16:41.384(-4)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
W20160731-17:16:41.384(-4)? (STDERR)     at i18n/en.i18n.json:14:1
W20160731-17:16:41.384(-4)? (STDERR)     at /Users/Julian/Google Drive/Meteor/beyond-words/.meteor/local/build/programs/server/boot.js:297:10
W20160731-17:16:41.385(-4)? (STDERR)     at Array.forEach (native)
W20160731-17:16:41.385(-4)? (STDERR)     at Function._.each._.forEach (/Users/Julian/.meteor/packages/meteor-tool/.1.4.0.1779qjh++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
=> Exited with code: 1                        
=> Your application is crashing. Waiting for file change.

I'm looking for ideas on why this may be happening.

Custom Button (Dropdown)

Hi
I'm trying to implement a custom button into my summernote toolbar. Using mpowaga/meteor-autoform-summernote.

My Schema refers to autoform and summernote:

autoform: {
  afFieldInput: {
    type: 'summernote',
    class: 'editor', // optional
    settings: SummernoteConfig.description // summernote options goes here
  },
}

my config is

SummernoteConfig = {};

var ObjectInsertButton = function (context) {
var ui = $.summernote.ui;
var buttonGroup = ui.buttonGroup([
  ui.button({
    contents: '<i class="fa fa-external-link"/><span class="caret"></span>',
    tooltip: 'Add an object from your universe',
    data:{
    toggle: 'dropdown'
  }
}),
ui.dropdown({
  className: 'dropdown-style',
    contents: "<ol><li>hello</li><li>hello europe</li><li>hello europe</li></ol>",
    callback: function ($dropdown) {
      $dropdown.find('li').each(function () {
        $(this).click(function() {
          context.invoke('editor.insertText', 'hello');
        });
      });
    }
})
]);

 return buttonGroup.render();   // return button as query object
};

SummernoteConfig.description = {
height: 250,
toolbar: [
  // [groupName, [list of button]]
  ['paragraph',['style']],
  ['style', ['bold', 'italic', 'underline', 'clear']],
  ['color', ['color']],
  ['para', ['ul', 'ol', 'paragraph']],
  ['mayouga',['objectinsertbtn']]
],
buttons: {
  objectinsertbtn: ObjectInsertButton
}
};

when invoking the click event context is undefined.

What do i have to do? Help appreciated.

TypeError: $node.attr(...).tooltip is not a function

Hi,

i got this error with this setup

Books = new Meteor.Collection('Books')

var BookSchema = new SimpleSchema({
  title: {
    type: String,
    label: "Title",
    max: 200
  },
  content: {
    type: String,
    label: "Yet another poem",
    autoform: {
      afFieldInput: {
        type: 'summernote',
        class: 'editor', // optional
        settings: {
          height: 200
        }
      }
    }
  }
});
Books.attachSchema(BookSchema)

template

<body>
  {{#autoForm id="booksform" collection="Books" type="insert"}}
    {{> afQuickField name='title'}}
    {{> afQuickField name='content'}}
  {{/autoForm}}
</body>

packages

aldeed:autoform
aldeed:collection2
aldeed:simple-schema
mpowaga:autoform-summernote
fortawesome:fontawesome

How to fix this?

can't set placeholder

I can't set place holder for my textarea

    description: {
      type: String,
      label: "Description",
      max: 10000,
      autoform: {
        afFieldInput: SUMMERNOTE_OPTIONS,
        placeholder: "Tell us something unique about yourself"
      }
    }

summernote options:

SUMMERNOTE_OPTIONS = {
  type: 'summernote',
  height: 300,
  minHeight: 300,
  toolbar: [
    ['style', ['style']],
    ['font', ['bold', 'italic', 'underline', 'clear']],
    ['para', ['ul', 'ol']],
    ['insert', ['link','hr']],
    ['misc', ['codeview']]
  ],
  styleWithSpan: false
};

It does not show the placeholder

How to sanitize html?

In readme, you have mentioned
" Remember to sanitize the HTML on the server!"

Can you please give me an example of how to do it?

I am inserting docs in collection using yogiben:admin.

Thanks.

autosave isn't working

autoForm has the autosave option, which does not seem to work with summernote in this repo.
Is there a way to achieve it?

With other text fields in autoform, an autosave means saving upon a blur event.

type image file TIF can't insert

hi , i'm using summernote now , i have some problem with insert image type TIF , i can't insert it . have any idea about this problem ? thank for advance !!!

Example of Sanitizing String with Autoform, SimpleSchema & Insert Method?

Can you provide a quick example of how to sanitize with this package?

You provide some insight here:

#13

But I'm not sure it's relevant to using summer-note w/ autoform is it? And autoform hooks are client-side, so we can't use sanatize in an autoform before hook?

It seems other people are confused as well. This person (link below) is trying to put the allowed values into the simpleschema's summer-note settings object , but it seems like the sanatize call has to happen in a method? That's assuming your autoform is submitted and updated using a method?

SO below:

http://stackoverflow.com/questions/36240098/sanatize-html-on-server-in-schema

Lastly, great package! Thanks.

How to customize the toolbar

I have tried doing the following but it's not working

settings: [
                    ['style', ['bold', 'italic', 'underline', 'clear']],
                    ['font', ['strikethrough', 'superscript', 'subscript']],
                    ['color', ['color']],
                    ['para', ['ul', 'ol', 'paragraph']]
                ]

toolbar: [
                    ['style', ['bold', 'italic', 'underline', 'clear']],
                    ['font', ['strikethrough', 'superscript', 'subscript']],
                    ['color', ['color']],
                    ['para', ['ul', 'ol', 'paragraph']]
                ]

Does not resize in autoform

The menu controls do not respond to browser size changes. The controls do not rearrange (multiple rows) when I make the browser window smaller than the full sized summernote item:

capture

Update to autoform 5.0.0?

Any chance on updating it to autoform 5?
If you just update the api.use section I can test it and confirm everything is working.

Thanks!

Lang Es-es

Hi! i put the option in mi collection:.
Efecto: { type: String, min: 10, optional: true, autoform: { afFieldInput: { type: 'summernote', lang: 'es-ES', class: 'editor', // optional settings:"" // summernote options goes here } } },

who can download and put the file, like a lang/summernote-es-ES.js, i donwload this file, but i can't use, the error is jquery is not defined

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.