Code Monkey home page Code Monkey logo

ember-froala-editor's People

Contributors

dependabot[bot] avatar dianaprajescu avatar ember-tomster avatar gitter-badger avatar mani-rsg avatar mike183 avatar panman82 avatar raphaelns-developer avatar rlivsey avatar rubycalling avatar snyk-bot avatar stefanneculai avatar ursm 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-froala-editor's Issues

ember-froala-editor is not working on ios

On IOS(iphone or ipad, any version), when i click on the froala div, it don't get focused. It only gets focused when i click Bold or italic or any other tool that involves focusing in the toolbar.

Sass problems

Styles don't seem to be getting added correctly into the asset tree when used alongside ember-cli-sass. Am I missing something easy here? Let me know what would be helpful to see to assist debugging.

Allow Importing third_party Plugins

froala-editor is shipped with three third party plugins: embedly, image_aviary and spell_checker. However, ember-froala-editor doesn't allow importing them from the configuration in ember-cli-build.js, since they're in their own directory called third_party and not in plugins.

Reading through the importing code, I also don't see a way to outsmart the importer (I already tried ../third_party/embedly without success).

No content rendered

Hello!

Awesome editor!

I found one issue. When user opens the editor with already existing content passed by property in .hbs (content=userContent) - editor do not show it. From code I've investigated it occur due to the fact editor updating content only when property '_editorInitializing' is set to true, which isn't working for init load.

Please, advise

Should 'froala-wysiwyg-editor' dependency be in devDependencies?

Currently, the 'froala-wysiwyg-editor' bower dependency is within the devDependencies section of the bower.json file.

This forces users of this add-on to add the 'froala-wysiwyg-editor' bower dependency to their main applications bower.json file in order to have the froala editor itself installed when running bower install from the root of their Ember-CLI application.

Should the 'froala-wysiwyg-editor' dependency be moved from devDependencies into dependencies so that it is installed automatically?

Happy to submit a PR if so.

Using the `fillInFroalaEditor` test helper within integration tests

@raphaelns-developer I went through the latest testing stuff and made a few changes to the exported fillInFroalaEditor() test helper. Can you update to the latest beta and try the following in your integration tests?

import { fillInFroalaEditor } from 'ember-froala-editor/test-support';

// ... from within a test...
await fillInFroalaEditor('#selector', '<p>New HTML to "fill in".</p>');

Drag / Resize Options?

Curious if anyone doing anything specific to make the editor draggable / resizeable or is the best option to create a wrapper div and handle everything in there and have froala resize based on that. I'm currently doing that with Summernote but the resize in particular isn't elegant.

Thanks for the addon.

Test helper 'fillInFroalaEditor' not working

I'm tring to use the helper fillInFroalaEditor in my acceptance test but isn't working correctly. The helper fill in the froala instance with the text that i have passed, but the content property is not updated with the text unless i force the test to click in something else like a button to take the focus off the froala editor.

Event handling breaks when deleting one of multiple froala editors.

Description:

Create multiple instances of the froala-editor open up the first one and upload an image. Then delete the first editor. Try adding an image in the second editor, the popup disappears and the file explorer never opens.
http://recordit.co/veHZJUx4YC

Code Example:

{{#if showFroala}}
{{froala-editor options=exampleOptions toolbarInline=true}}
{{/if}}

<button {{action (mut showFroala) false}}>DELETE ONE</button>

{{froala-editor options=exampleOptions toolbarInline=true}}

Notes

What seems to be going on is that when deleting the first section, the destroy method gets called that deletes all the event handlers. ( in froala_editor.js --> FE.prototype.destroy )

Update ember-cli

Just a TODO.

Backstory, I have to support an old ember project for a bit longer so I haven't had a chance to update my local node env.

Allow each option to be a component attribute

I think this could be achieved by checking $.FE.DEFAULTS for an existing key when building the options object for initialization. Usage ex:

{{froala-editor 
    content=myContent
    key='abc'
    toolbarButtons=(array 'bold' 'italic''strikeThrough')
}}

Depreciate `defaultOptions` in favor of "merged" `options`

With the release of ember 2.4.2, I think it's now possible to just use options all-around, instead of having a defaultOptions when extending the component. Research if this will work properly with different options values, ex; options=someProp vs options=(hash foo="bar")

Make `content` read-only

This goes along the lines of embers "data down, actions up" philosophy and future direction. (This probably should have been done from the beginning since it would have removed the need for a lot of state checking.) Example usage in this case:

{{froala-editor
    content=myContent
    on-contentChanged-getHtml=(action (mut myContent))
}}

Version 2.5.0 fails to build on Heroku

I'm getting the following error when trying to deploy application to Heroku using the standard build pack.

BroccoliMergeTrees: Expected Broccoli node, got undefined for inputNodes[0]
TypeError: BroccoliMergeTrees: Expected Broccoli node, got undefined for inputNodes[0]
    at BroccoliMergeTrees.Plugin (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/broccoli-plugin/index.js:23:13)
    at new BroccoliMergeTrees (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-froala-editor/node_modules/broccoli-merge-trees/index.js:16:10)
    at Class.treeForVendor (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-froala-editor/index.js:49:12)
    at Class.superWrapper [as treeForVendor] (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/core-object/lib/assign-properties.js:34:20)
    at Class._treeFor (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-cli/lib/models/addon.js:517:33)
    at Class.treeFor (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-cli/lib/models/addon.js:477:21)
    at project.addoError running: ember build --environment production 2>&1ns.map
.addon (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-cli/lib/broccoli/ember-app.js:525:20)
    at Array.map (native)
    at EmberApp.addonTreesFor (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-cli/lib/broccoli/ember-app.js:523:30)
    at EmberApp._processedVendorTree (/tmp/build_65839bf19840f998ff0c9b06481c5c99/node_modules/ember-cli/lib/broccoli/ember-app.js:960:29)

Version 2.4.2 which does not use broccoli-merge-trees deploys without issues.

Application environment

DEBUG: -------------------------------
DEBUG: Ember             : 2.12.0-beta.2
DEBUG: Ember Data        : 2.12.0-beta.4
DEBUG: jQuery            : 3.1.1
DEBUG: Ember Simple Auth : 1.2.0
DEBUG: -------------------------------

Let me know what other information I could provide to resolve this.

Interact with the editor during automated tests

I'm writing automated tests for my app. When I need to fill a regular input, I write this:

fill_in(session, fillable_field("Title"), with: "Awesome Post")

This will search for inputs or textareas with a placeholder "Awesome Post" or with a label with the same text.

<label for="post-title">Title</label>
<input id="post-title">
<input id="post-title" placeholder="Titlte">

I can't make labels work with a Froala editor, so I'm relying on placeholders to write my tests using my own helper to find Froala.

fill_in(session, Froala.field("Title"), with: "Awesome Post")

The issue is when I'm editing a post, because the HTML element with the placeholder text is not attached to the DOM, so I can't search using the text. So, when I'm editing, I need to search for the content

fill_in(session, Froala.field("Awesome Post"), with: "Great Post")

For me, the best solution would be having labels working properly. I guess the lack of working labels can be an accessibility issue. But, alternatively, having the placeholder text as data attribute while it's not visible would help.

initOnClick should insert cursor at mouse click location, as default Froala editor does

If you view the froala example documentation, clicking on the "z" in "initialize" will initialise the editor, focus the editor and place the cursor after the 'z' character.

On the other hand, if you visit Ember Froala' s hide-on-blur and click anywhere on "Click here for an example", the editor isn't focused immediately and it requires a second click. This also ruins the user experience for hide-on-blur, as the editor only successfully hides if the user does perform the second click.

Extending the editor does not render

Trying to extend the component causes it to not render. Here is an example.

While $element.froalaEditor( this.get('_options') ); run it just doesn't do anything.

Cannot fire on-initialized action

As per the docs, any event for the froala editor listed here

https://www.froala.com/wysiwyg-editor/docs/events#initialized

can be used via ember by using an 'on' prefix. I'm working with this package right now in the following manner:

{{froala-editor params=froalaEditor.params value=model.html on-initialized=(action "integrate") focus=(action "froalaFocus")}}

My froalaFocus action is firing fine when the editor is focused on, but the initialized action (i.e. integrate) never fires. What am I missing?

error when after upload image in custom server

i am trying to upload image to my server. Image was uploaded successfully
screenshot from 2018-01-23 13-14-49

but i get an error
screenshot from 2018-01-23 13-13-32

btw this is my froala options

let options = {
      heightMin: 400,
      imageUploadParam: 'file[]',
      imageUploadParams: {image: new Image().toString()},
      imageUploadURL: `${ENV.IMAGE_API}/upload`,
    };

    if (!_.isEmpty(user)) {
      options = Object.assign(options, {
        requestHeaders: {
          Authorization: user['token']
        }
      });
    }

can anyone solve this.. sorry for my bad english :(

Attach events as callbacks on the editor instance

Currently the ember {{froala-editor}} component attaches event listeners to the DOM. Due to how/when the Froala Editor fires events, this causes weird "mis-fires" for the ember actions. This became apparent during testing. Look into using the Froala Editors events.on method to create action callbacks instead.

One large issue with this change is that it appears event objects are not passed to the handler. This would effectively cause a breaking change in the public API for Event Actions. And due to how releases are aligned with actual Froala Editor versions, it would not be possible to release a new major version separate from the Froala Editor. Please post here if you rely on the event object and/or have a large number of "Event Action" handlers.

Hide on-blur with binding

Hide on-blur with binding does not working on Ember 2.9.0 and below

{{froala-editor content=myValue update=(action (mut myValue)) options=(hash initOnClick=true) on-blur=(froala-method "reinit")}}

Ember 2.8 Support

Hi,

Is there an ETA on when the latest couple of commits (for Ember 2.8 support) will be bundled into a new release? We're in the process of upgrading our app to 2.8 and now froala is throwing all kinds of errors which are blocking our efforts.

Thanks!

licensing and local development

Hey, I couldn't find an answer for this on the Froala site.

I'm using this Ember addon. I purchased a license but can't find any documentation on whether the single-domain license includes localhost. Can you please advise?

Backspace throws error

When deploying to production, I get the following error when pressing backspace. This causes none of the text to save.

Uncaught SyntaxError: Invalid regular expression: /([๏ฟฝ-๔ฐ€-๏ฟฝโ€]+)$/: Range out of order in character class
at new RegExp ()

This just started in 2.6.6

Disappear when content is changed to null or false

{{froala-editor content=object.description update=(action (mut object.description)) on-blur=(froala-method "reinit") options=(hash initOnClick=true)}}

When I manually change content to null or false the editor disappear.

Change

this.set('object.description', false)

init value is null and its working but after change editor disappear without error.

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.