添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Flag this post as spam?

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?

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

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>
                

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

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.