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
I tried to follow a guide (v7) for adding a RTE as a parameter in a macro: https://our.umbraco.com/forum/templates-partial-views-and-macros/82089-tinymce-as-macro-parameter
When I try to create an instance of this macro I get a 404 error: "Request error: The URL returned a 404(not found)" . It's looking for localhost/umbraco/rte
Anyone who got this to work and could share the solution?
Hi Erik
Had a similar issue when updating my Editor Notes package:
https://github.com/marcemarc/EditorNotes/commit/513e25164faef949ab599a46554b46dc9256932b
Try setting the view to be:
view: '/umbraco/views/propertyeditors/rte/rte.html',
instead of 'rte'
and the toolbar I think has some different options: try:
editor: { toolbar: ["ace", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "umbembeddialog"]
and after the dimensions, add the new mode setting to be classic:
dimensions: { height: 200 }, mode: "classic"
I can't think of anything else I had to change...
maybe that will work!
regards
Marc
Yes yes yes! Thanks Marc
The rte has position absolute, so it covers the other parameters, so I added this - macroRte - class:
<div ng-controller="Macro.RichTextMacro"> <div class="macroRte" style="border: 1px solid #ccc"> <ng-form> <umb-editor model="textInput"></umb-editor> </ng-form> </div>
and created a css file:
.macroRte .umb-editor { position: relative;}
and added it to the manifest:
{ propertyEditors: [{ alias: "RichTextMacro", name: "RichTextMacroEditor", isParameterEditor: true, editor: { view: "~/App_Plugins/RichTextMacro/RichTextMacro.html", valueType: "TEXT" } } ], javascript: [ "~/App_Plugins/RichTextMacro/RichTextMacro.controller.js" ], css: [ "~/App_Plugins/RichTextMacro/rte.css"]}
Hi Erick W, can you post the whole solution for umbraco v8. I will appreciate it since I'm getting controller not registered error
Great Erik!
Yes, sorry now I remember - that was the other thing I had to tweak - with the old styles it was off the screen!
Can you post the whole solution. I tried implementing this but I'm getting an error about the controller not being registered
Could I bump this question for a bit?
I got the RTE working in my macro partial but... Now I want to add a RTE.css for some heading styles under 'Formats'.
Does anybody know how to get that fixed?
I have tried this in my RichTextMacro.controller.js
angular.module("umbraco") .controller("Macro.RichTextMacro", function ($scope) { $scope.textInput = { label: 'bodyText', description: '...', view: '/umbraco/views/propertyeditors/rte/rte.html', value: $scope.model.value, config: { editor: { toolbar: ["ace", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "umbembeddialog"], stylesheets: ['/css/RTE.css'], dimensions: { height: 200 }, mode: "classic" } } }; $scope.$watch('textInput.value', function (newValue, oldValue) { $scope.model.value = newValue; }); });
I thought I needed to set the stylesheet to the correct path (and yes, the file exist ;-)) but that does not seem to work.
have you tried it with doublequotes?
stylesheets: ["/css/RTE.css"],
If that doesn't work, you could try adding them as style-formats instead
style-formats: [ { "title":"Headings", "items":[ { "title":"Top Heading", "block":"h1" }, { "title":"Heading h2", "block": "h2" }, { "title":"Sub Head h3", "block":"h3" }, { "title":"Heading h4", "block":"h4" }, { "title":"Heading h5", "block":"h5" }, { "title":"Heading h6", "block":"h6" } ]}]
Hey, thanks for your quick reply!
Both options are not working... Will have to find another workaround.
Thanks anyway!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How can I use RTE as a macro parameter in V8?
I tried to follow a guide (v7) for adding a RTE as a parameter in a macro: https://our.umbraco.com/forum/templates-partial-views-and-macros/82089-tinymce-as-macro-parameter
When I try to create an instance of this macro I get a 404 error: "Request error: The URL returned a 404(not found)" . It's looking for localhost/umbraco/rte
Anyone who got this to work and could share the solution?
Hi Erik
Had a similar issue when updating my Editor Notes package:
https://github.com/marcemarc/EditorNotes/commit/513e25164faef949ab599a46554b46dc9256932b
Try setting the view to be:
instead of 'rte'
and the toolbar I think has some different options: try:
and after the dimensions, add the new mode setting to be classic:
I can't think of anything else I had to change...
maybe that will work!
regards
Marc
Yes yes yes! Thanks Marc
The rte has position absolute, so it covers the other parameters, so I added this - macroRte - class:
and created a css file:
and added it to the manifest:
Hi Erick W, can you post the whole solution for umbraco v8. I will appreciate it since I'm getting controller not registered error
Great Erik!
Yes, sorry now I remember - that was the other thing I had to tweak - with the old styles it was off the screen!
regards
Marc
Can you post the whole solution. I tried implementing this but I'm getting an error about the controller not being registered
Could I bump this question for a bit?
I got the RTE working in my macro partial but... Now I want to add a RTE.css for some heading styles under 'Formats'.
Does anybody know how to get that fixed?
I have tried this in my RichTextMacro.controller.js
I thought I needed to set the stylesheet to the correct path (and yes, the file exist ;-)) but that does not seem to work.
have you tried it with doublequotes?
If that doesn't work, you could try adding them as style-formats instead
Hey, thanks for your quick reply!
Both options are not working... Will have to find another workaround.
Thanks anyway!
is working on a reply...