Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, Im trying to add some text to a richtext in a customsection
Controller:
angular.module("umbraco").controller("TextController", function ($scope, notificationsService) { $scope.textEditor = { label: 'bodyText', view: 'rte', value: $scope.testvalue, config: { editor: { toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "table"], stylesheets: [], dimensions: { height: 400, width: "90%" } } } }; $scope.addField = function () { $scope.textEditor = "new value"; $scope.testvalue = "new value"; }; });
Html
<ng-form> <umb-editor model="textEditor"></umb-editor> </ng-form>
When I run the addField function the value in the richtext updates but the textarea value does not change. No errors in the log. Any ideas?
Hi,
I tried several ways of reusing existing property editors. A way that works I explain in this article :
http://24days.in/umbraco/2014/umbraco-angular-tips/
Read the section about Reusing existing datatypes. There are some links to source code as well.
Dave
Hi Dave, I have no trouble reusing the rte datatype, my only problem is that i cant add text to the editor dynamically.
//H
I know I tried your approach as well and had some issues with it. The way I describe is the only way I found it fully functioning.
Hi Dave, I was not able to get your code to work. Is the Datatypecacheprovider required? Isnt there a workaround?
The datatype cacheprovider caches the retreival of datatype information. So it's a performance improvement.
Did you get the solution of it ? I am having the same issue. Text is not changing.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Adding text to Richtext editor - Customproperty, Angularjs
Hi, Im trying to add some text to a richtext in a customsection
Controller:
Html
When I run the addField function the value in the richtext updates but the textarea value does not change. No errors in the log. Any ideas?
Hi,
I tried several ways of reusing existing property editors. A way that works I explain in this article :
http://24days.in/umbraco/2014/umbraco-angular-tips/
Read the section about Reusing existing datatypes. There are some links to source code as well.
Dave
Hi Dave, I have no trouble reusing the rte datatype, my only problem is that i cant add text to the editor dynamically.
//H
I know I tried your approach as well and had some issues with it. The way I describe is the only way I found it fully functioning.
Dave
Hi Dave, I was not able to get your code to work. Is the Datatypecacheprovider required? Isnt there a workaround?
The datatype cacheprovider caches the retreival of datatype information. So it's a performance improvement.
Dave
Did you get the solution of it ? I am having the same issue. Text is not changing.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.