Code Monkey home page Code Monkey logo

Comments (19)

gunnarlium avatar gunnarlium commented on July 16, 2024

I came across this same issue when trying to find a work-around for #38. I ended up creating a new version of the directive, specifically for inline editors.

It's in my own fork of this repo: https://github.com/gunnarlium/ui-tinymce/blob/inline-editor-version/src/tinymce-inline.js.

It's really just a quick and dirty effort to get something that solves my immediate problem, but if there's any interest, I'd be happy to collaborate to create something that can me merged into the main repo.

from ui-tinymce.

rpCal avatar rpCal commented on July 16, 2024

The problem is with 51 line. Editor is saved after keyup event. This update cursor position. I dont know how to property fix but i know when i change code to this:

// Update model on keypress
ed.on('KeyUp', function (e) {
  if(!options.inline){
    ed.save();
  }
  updateView();
});

It work quite well.
Maybe someone have good solution?

from ui-tinymce.

wesleycho avatar wesleycho commented on July 16, 2024

This should be fixed via cafdfa7

from ui-tinymce.

SafinRR avatar SafinRR commented on July 16, 2024

Hello!
I find trouble with inline again.
text shows as raw

from ui-tinymce.

deeg avatar deeg commented on July 16, 2024

What version of the library are you using?

Can you please post a plunker showing your example with the issue?

from ui-tinymce.

artttj avatar artttj commented on July 16, 2024

Want to say that we have the same trouble only in Firefox.

from ui-tinymce.

deeg avatar deeg commented on July 16, 2024

What version of the library are you using?

Can you please post a plunker showing your example with the issue?

from ui-tinymce.

aske-cph avatar aske-cph commented on July 16, 2024

I have the same problem.

angular-ui-tinymce doesn't work on textareas. Text shows as raw. Cant edit anything. But the menu does show up:

on osx with:

Safari
Chrome
Firefox

versions:
Angular Ui Tinymce - 0.0.11
Tinymce 4.3.1

from ui-tinymce.

deeg avatar deeg commented on July 16, 2024

Can you please post a plunker demonstrating the issue so we can look into fixing it?

from ui-tinymce.

aske-cph avatar aske-cph commented on July 16, 2024

http://plnkr.co/edit/10H6rbwP3xycbb493F9B?p=preview

Plunkr with newest versions:

Angular Ui Tinymce - 0.0.11
Tinymce 4.3.1

As you see, the textarea doesn't parse the text and you cant edit.

from ui-tinymce.

re-gor avatar re-gor commented on July 16, 2024

I have the same problem in Chrome. I use last versions of angular-ui-tinymce and tinymce.
Noted that if I holding left mouse button on textarea I can print something. While I am printing this way error occurs in console log:

Error: [$sce:unsafe] Attempting to use an unsafe value in a safe context.
http://errors.angularjs.org/1.4.7/$sce/unsafe
at http://localhost:3001/bower_components/angular/angular.js:68:12
at htmlSanitizer (http://localhost:3001/bower_components/angular/angular.js:16673:13)
at getTrusted (http://localhost:3001/bower_components/angular/angular.js:16837:16)
at Object.sce.(anonymous function) as getTrustedHtml
at Array. (http://localhost:3001/bower_components/angular-ui-tinymce/src/tinymce.js:121:35)
at $$parseAndValidate (http://localhost:3001/bower_components/angular/angular.js:25256:38)
at $commitViewValue (http://localhost:3001/bower_components/angular/angular.js:25246:10)
at http://localhost:3001/bower_components/angular/angular.js:25389:14
at Scope.$eval (http://localhost:3001/bower_components/angular/angular.js:15989:28)
at Scope.$apply (http://localhost:3001/bower_components/angular/angular.js:16089:25)

from ui-tinymce.

aske-cph avatar aske-cph commented on July 16, 2024

Any news on the problems?

Otherwise inline seems broken in all browsers with the current versions.
And this issue should be reopened, no?

from ui-tinymce.

deeg avatar deeg commented on July 16, 2024

Sorry for the delay. I am going to look into it this week. I am going to re-open the issue for now.

from ui-tinymce.

deeg avatar deeg commented on July 16, 2024

Changing the textarea to a div in your example, everything works fine.

Their documentation states:

Most common TinyMCE integrations use the editor in its classic form-based mode. In this integration mode the editor usage is as a form field that is filled out to provide content. The editor is always visible as part of the form to be edited.

Inline editing mode blends the editable view with the readable view of the page. Elements are replaced inline with an editor once clicked rather than the editor always being visible.

Most significantly, when using inline editing TinyMCE is not isolated from the page by virtue of being encapsulated within an iframe. This has the advantage of ensuring that the content within the editor inherits the surrounding page's styles when presenting the content.

Since the editor is not sandboxed in an iframe in inline editing mode, CSS styles for the editor's content will be inherited from the page that the editor is on. This allows you to edit content exactly as it appears within the context of the page, providing a true WYSIWYG editing experience.

Is there any reason you want to use a textarea instead of a div in this situation? You will see their example also does not use a textarea. I think you will find this issue has more to do with the TinyMCE library itself, rather than the angular wrapper.

from ui-tinymce.

iJungleboy avatar iJungleboy commented on July 16, 2024

I'm new to tinymce and this module but got inline to work within minutes. Textarea should never work as inline, that is "the wrong way to do things" as inline should keep the original tag (textarea) and textarea doesn't support formating.

Here's a screenshot of successful integration in 2sxc from yesterday when I just got started

image

...so I would close this issue

from ui-tinymce.

dfabreguette avatar dfabreguette commented on July 16, 2024

Hi !
Looks like I have the exact same origin problem in inline mode.
When I type in my cursor moves to the beginning of the line. like @jonrimmer @gunnarlium.
Any idea ?

from ui-tinymce.

dfabreguette avatar dfabreguette commented on July 16, 2024

My bad, I was using on the same element "ng-bind-html".

from ui-tinymce.

mtutty avatar mtutty commented on July 16, 2024

Sorry, we're still seeing it fail. The $scope var is not updated, even though it does initially bind from the ng-model var.

Try changing the content in the first editor tab. The p below is bound to the same scope var, and the button shows the scope var. Neither of these shows the right value after changing the bound tinymce div.

http://codepen.io/mtutty/pen/NdMyBv

from ui-tinymce.

TOuhrouche avatar TOuhrouche commented on July 16, 2024

Same issue here, the caret keeps going to the beginning of the line. Tried both Div and Text area, still the same :(

from ui-tinymce.

Related Issues (20)

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.