Giter Site home page Giter Site logo

monad98 / ng2-lazy-trumbowyg Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 8.0 118 KB

Angular 2 Component for lazy loading of Trumbowyg wysiwyg editor

Home Page: https://plnkr.co/edit/dirpKmLNalUmz0mpdrk7?p=preview

License: MIT License

TypeScript 98.32% JavaScript 0.53% HTML 0.90% CSS 0.24%
trumbowyg wysiwyg-editor angular2

ng2-lazy-trumbowyg's People

Contributors

fergalmoran avatar gaboelnuevo avatar monad98 avatar sirwojtek avatar vaaguirre avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

ng2-lazy-trumbowyg's Issues

Adding the editor in a ReactiveFormsModule form

Hi, I have a question, is there any way to add the editor to a ReactiveFormsModule model driven form, using the formControlName binding?.
Something like this:

<form class="form" [formGroup]="blogForm" (ngSubmit)="saveForm();">
    <div class="row">
        <div class="col-md-12">

            .....................

            <div class="form-group">
                <label>Blog Content</label>
                <trumbowyg 
                    [options]="options1"
                    formControlName="blogContent"
                >
                </trumbowyg>
            </div>

            ....................


        </div>
    </div>
</form>

AOT: Property 'savedContent' is private and only accessible within class 'Trumbowyg'

When running my app with the --aot flag, I get this error:

Property 'savedContent' is private and only accessible within class 'Trumbowyg'.

Tu run with AOT compiler, ngc needs properties to be public. I've been trying to go around this but have failed. Have you used this component with AOT? Can you give an example? Otherwise, I could do a pull request with the fix, so you could update the npm package.

In "npm install", trumbowyg not downloading all its dependencies

I just did all the steps as given and it is working fine in dev env. After development i put my production build(ng serve --prod) into my server. From server it is trying to download two of its dependencies
1.https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.8.0/ui/trumbowyg.min.css
2.https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.8.0/trumbowyg.min.js
But the problem is i dont have internet connection in my server(Completely Intranet). Why it is not downloaded all its dependencies at the build time and what is the work around for that?
capture

Facing issue while using in Ionic 2

Hi,
This seems to be clean & neat rich text editor component.
I would like to use in ionic 2. But, I am facing issues.

'trumbowyg' is not a known element

Kindly Let me know, how can we use this.

Thanks,

ERROR in TrumbowygModule is not an NgModule

I'm getting this since the 2.0.3 release?
Create a new angular-cli (1.0.0) project
npm install --save ng2-lazy-trumbowyg

add the import to app.module.ts

ERROR in TrumbowygModule is not an NgModule webpack: Failed to compile.

Cannot add a Placeholder

I am using Trumbowyg in my Angular2 app
I trying to update my object property [(ngModel)]='scene.description'
but it doesn't work.

Here is a snippet from my code :

<trumbowyg
[(initialContent)]="scene.description" 
[options]="options1"
[(ngModel)]="scene.description"
(savedContent)="scene.description=$event">

How I can update my model from Trumbowyg ?

Build Fails Due to Missing .js.map

Thank you very much for starting this project. I'm looking forward to working with it.

I'm getting an error, however, in the javascript console, where it is looking for the trumbowyg.component.js.map file, but it is not in the npm installed directory. I'm not sure if that is something unique to my setup, or more general. I'm not sure what is requiring the .map file(s).

Any assistance you can provide would be greatly appreciated.

nocti_and_introduction_to_javascript_source_maps_-_html5_rocks

I am using ionic 2, and it may have something to do with webpack.

Copy paste not working

When user paste content from cliporboard the text area field is getting updated but the model value is not getting updated.

https://plnkr.co/edit/dirpKmLNalUmz0mpdrk7?p=preview

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

initialContent does not display on rerendering component with Trumbowyg

I'm using ng2-lazy-trumbowyg on a component which is inside an accordion. The page is loaded for the first time and when I click to open the accordion trumbowyg's initialContent is displayed as intended. Then when I close the accordion the component is destroyed, when I reopen the accordion after that the component loads as intended, but the initialContent is is never displayed.

The only solution I've been able to come up with is to use window.location.reload() on ngOnDestroy() of the component on which trumbowyg is usedbut this is obviously not ideal.

Any help or advice is appreciated.

Property 'forRoot' does not exist on type 'typeof TrumbowygModule'.

I'm working on an Angular 4 CLI project.
In imports using just TrumbowygModule works fine, but trying to use it with plugins like this:

TrumbowygModule.forRoot({plugins: ['colors', 'noembed', 'preformatted', 'pasteimage', 'upload'], version: '2.8.0'})

Gives the error: Property 'forRoot' does not exist on type 'typeof TrumbowygModule'.

iFrame being removed after "enter event" on Firefox

The iframe is being removed after the following steps:

  1. I do click in the html option
  2. I add an iframe tag
  3. I do click in the text option
  4. The iframe is rendered
  5. I do press the enter key down
  6. The iframe is being removed

Angular 4 +webpack - _this.trumbowygEl.trumbowyg is not a function

Hi!

I'm working on Angular 4 + webpack project.

I'm using you example from plunker, but I open page I see error in console:

ERROR TypeError: _this.trumbowygEl.trumbowyg is not a function
at e._next (trumbowyg.component.js:49)
at e.__tryOrUnsub (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:24)
at e.next (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:24)
at e._next (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:24)
at e.next (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:24)
at TakeSubscriber._next (take.js:80)
at TakeSubscriber.e.next (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:24)
at e._next (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:958)
at e.next (vendor.js?v=-o-XpSTt9o8y2f_jbxF6xZa0KLcXFW53squgzaA85xA:24)
at SwitchMapSubscriber.notifyNext (switchMap.js:124)

Can you help me ?

The first line should start inside a paragraph

The first line starts without any wrapper, and just after an enter key event, the paragraph is created and the first line is wrapped.
This DOM change modifies the y position of the line while the user is typing. I received reports from users thinking this behaviour is a bug.

How to change styles

I'm sorry to bother you again, but I can't find a way to change the style of the editor.

The official documentation says to make a copy of the /src/ui/ folder and edit the css in that, but in ng2-lazy-trumbowyg there are no css/style files that I can see.
https://alex-d.github.io/Trumbowyg/documentation/#custom-skin

Where are you taking the styles from, and is there a way to customize them?

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.