Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tinymce.init({
- selector: "div.Body",
- content_css : '/style/core.css',
- inline: true,
- force_br_newlines : true,
- force_p_newlines : false,
- forced_root_block: '',
- plugins: [
- "save advlist autolink lists link image charmap print preview anchor",
- "searchreplace visualblocks code fullscreen",
- "insertdatetime media table contextmenu paste"
- ],
- toolbar: "save insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
- save_onsavecallback: function ()
- {
- console.log("Sending body to database");
- var list = {};
- list.Id = "@Model.Id";
- list.Body = $("#PageBody").html();
- $.post("/home/SaveChanges", list, function (message) {
- $('#save').attr('disabled', true);
- $("#message").html("<strong>" + message + "</strong>");
- });
- }
- });
- <div id="PageBody" contenteditable="true" class="Body">
- <span id="text1">@Model.Body</span></div>
- #Body, #PanelContent #PageBody {
- border-top: 0.5em solid #009B7B;
- padding: 0.25em 0.5em 0.25em 0.5em;
- background: linear-gradient(to bottom, rgba(0,155,123,0.2) 0%,rgba(0,155,123,0.1) 50%,rgba(0,155,123,0) 100%);
- position: relative;
- width: 17.5em;
- min-height: 100%;
- margin-right: 1.25em;
- margin-bottom: 1.25em;
- clear: left;
- float: left;
- tinymce.activeEditor.setDirty(false);
- tinymce.editors[0].setDirty(false);
- editor.setDirty(false)
- editor.nodeChanged()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement