Bloom.Edit.EditingView.CleanHtmlAndCopyToPageDom C# (CSharp) Method

CleanHtmlAndCopyToPageDom() public method

this started as an experiment, where our textareas were not being read when we saved because of the need to change the picture
public CleanHtmlAndCopyToPageDom ( ) : void
return void
        public void CleanHtmlAndCopyToPageDom()
        {
            RunJavaScript("if (typeof(FrameExports) !=='undefined') {FrameExports.getToolboxFrameExports().removeToolboxMarkup();}");
            _browser1.ReadEditableAreasNow();
        }

Usage Example

 public void SaveNow()
 {
     if (_domForCurrentPage != null)
     {
         try
         {
             // CleanHtml already requires that we are on UI thread. But it's worth asserting here too in case that changes.
             // If we weren't sure of that we would need locking for access to _tasksToDoAfterSaving and _inProcessOfSaving,
             // and would need to be careful about whether any delayed tasks needed to be on the UI thread.
             Debug.Assert(!_view.InvokeRequired);
             _inProcessOfSaving = true;
             _tasksToDoAfterSaving.Clear();
             _view.CleanHtmlAndCopyToPageDom();
             _bookSelection.CurrentSelection.SavePage(_domForCurrentPage);
         }
         finally
         {
             _inProcessOfSaving = false;
         }
         while (_tasksToDoAfterSaving.Count > 0)
         {
             var task = _tasksToDoAfterSaving[0];
             _tasksToDoAfterSaving.RemoveAt(0);
             task();
         }
     }
 }
All Usage Examples Of Bloom.Edit.EditingView::CleanHtmlAndCopyToPageDom