Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "kythor"

I switched to TinyMCE, and I got it working but I had to add this script to Index.html:

$(document).on('focusin', function (e) {
            if ($(e.target).closest(".mce-window, .moxman-window").length) {
                e.stopImmediatePropagation();
            }
        });

now I need to add code to the "open" function of the modal, I tried this, but it doesnt work:

(_permissions.edit) {
                            $('<button class="btn btn-default btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
                                .appendTo($span)
                                .click(function () {
                                    debugger;
                                    _createOrEditModal.open({
                                        id: data.record.id
                                        
                                    },
                                    function (event, ui) {
                                        tinyMCE.init({
                                            selector: '#Body',
                                            height: 600,
                                            theme: 'modern'
                                        });
                                    });
                                });
                        }

This is what I did:

  • add <script src="//cdn.ckeditor.com/4.5.11/standard/ckeditor.js"></script> to index.cshtml
  • add this to _createOrEditModel.cshtml
<textarea class="form-control@(Model.Article.Body.IsNullOrEmpty() ? "" : " edited")" name="Body" id="Body" tabindex="1" required>@Model.Article.Body</textarea>
                    
                    <script type="text/javascript">
                                   CKEDITOR.replace('Body');
                    </script>

this will create the CKEditor field without problems. But first thing you will see is that when adding a picture or a link, the extra CKEditor popup will be behind the current modal. This can be "fixed" with adding extra css:

.modal-dialog {
                width:800px !important;
                margin: 30px auto
            }

        .cke_dialog {
            z-index: 1000001 !important;
        }

        .cke_panel {
            z-index: 1000002 !important;
        }

               .cke_skin_v2 input.cke_dialog_ui_input_text, .cke_skin_v2 input.cke_dialog_ui_input_password {
            background-color: white;
            border: none;
            padding: 0;
            width: 100%;
            height: 14px;
            /* new lines */
            position: relative;
            z-index: 1000003 !important;
        }

the ckeditor popup will now display in front of the modal, but you cannot edit the fields. That's where I am stuck for now.

Answer

It works, thanks!

Answer

can you please show me how to add this into this code:

var articles = _articleRepository .GetAll() .OrderByDescending(a => a.ViewCount) .Take(howMany) .ToList();

Answer

I'm a bit confused by this.

I have a custom entity Article inheriting FullAuditedEntity. So the fields CreatorUserId,... are created in the db. Now I want to get a list of articles, showing the Creator User Name in the list.

So do I add this to ArticleListDto:

public FullAuditedEntity<int, User> CreationUser { get; set; }

??

Now I'm getting: "attempted to access an unloaded appdomain"...

I followed these instructions, but still get errors. I'm using the IP Address in my connectionstring, but tools like DTCPing require Netbios name. Could that be an issue?

Oh, and when I set breakpoints in the code and do an F5 while first receiving the error, the second time it runs the code without problem, but doesnt load the view (still showing the error)....

while debugging, whenever I try to login with a user from the separate tenant db, I get this error:

'The underlying provider failed on Open'

why?

I have added the fields to the tenant db that were missing. And in production everything works fine. But when I'm debugging, I get this error

thanks for the info. I will try your suggestion.

Now I reverted the last 2 migrations, effectifly removing the new fields from the host database. everytime running Migrator to be sure the tenant db's are on the same version.

When re-adding the migration to add the fields, they are added to the host db. Running Migrator now without problems, but the fields are NOT added to the tenant db.....

Showing 61 to 70 of 93 entries