aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-editor-view.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 736476 - Space lost on the end of linemasterTomas Popela2014-09-121-13/+20
| | | | | | | | Again this had something to do with WebKit behavior regarding to the DOM selection. The thing is that when the selection is saved and afterwards restored on the same position it is not restored on the same position. So we hav to determine if we are writing into the quoted text differently without saving the selection.
* EHTMLEditorView - Don't try to fix the HTML structure after pasting when it ↵Tomas Popela2014-09-111-0/+2
| | | | is not needed
* EHTMLEditorView - Fix the leaks of the node content inside the ↵Tomas Popela2014-09-101-4/+2
| | | | process_elements function
* EHTMLEditorView - Save the text that can be written inside the tabulator wrapperTomas Popela2014-09-101-0/+4
| | | | | | | It can happen sometimes that the text can be written inside the tabulator wrapper. So when this happens append the text into the plain text version of the message (in the HTML version it already is) and don't throw it away.
* EHTMLEditorView - Fix the HTML structure after the selected text inside the ↵Tomas Popela2014-09-051-0/+96
| | | | quoted content is deleted
* EHTMLEditor - Use get_parent_block_node_from_child where possibleTomas Popela2014-09-051-22/+25
| | | | | | This will ensure that the right node (the block node) will be returned when the selection is saved inside the bold/italic/underlined text or inside the anchor.
* EHTMLEditorView - Avoid extra new line when quoting the textTomas Popela2014-09-051-1/+6
| | | | | Don't insert the unnecessary BR element before the BR element that is used for wrapping as it will end in unnecessary new line.
* EHTMLEditorView - Correctly remove all child nodes from the HEAD elementTomas Popela2014-08-271-2/+2
| | | | To avoid the critical warnings printed in the console.
* Fix handling of the selection in the composer when saving the message draftTomas Popela2014-08-271-11/+9
| | | | | | | When saving the draft don't lose the active selection in the web view. Also restore the selection when the draft is again opened. Also fix the situations when the spell check was not activated when the composer was opened.
* When changing the composer mode from HTML to Plain Text avoid reloading of ↵Tomas Popela2014-08-271-28/+35
| | | | | | the web view Also preserve the selection (if it is possible) when changing the mode.
* EHTMLEditorView - Avoid critical warnings when pressing backspace on the ↵Tomas Popela2014-08-171-19/+23
| | | | beginning of the quoted content
* EHTMLEditorView - Remove classes that were used for marking the BR elements ↵Tomas Popela2014-08-151-0/+7
| | | | from converted text
* EHTMLEditor - Change the way how the Indent/Unindent and Alignment worksTomas Popela2014-08-141-10/+36
| | | | | | | | | | Before this change the indent was done with BLOCKQUOTE element. But the BLOCKQUOTE elements have marings around them set by the HTML engine. For composer we can override them, but when someone will receive that HTML message he will have unwanted margin around them. To solve this we will use the DIV elements instead. Also for the alignment we switched away from WebKit Editor, but we are doing it ourselves.
* EHTMLEditorView - Unset the bold font when the return is pressed in the ↵Tomas Popela2014-08-141-0/+9
| | | | | | | | Heading 1 - 6 block When the return is pressed in a H1-6 element, WebKit doesn't continue with the same element, but creates normal paragraph, so we have to unset the bold font, otherwise the UI will report that we are still writing in bold.
* EHTMLEditorView - Fix critical warning when creating Address and Header 1 - ↵Tomas Popela2014-08-141-1/+3
| | | | 6 blocks
* EHTMLEditorView - Process the plain text version the right way when sending ↵Tomas Popela2014-08-071-4/+7
| | | | the HTML mail
* EHTMLEditorView - Remove the unneeded commentTomas Popela2014-08-071-1/+0
|
* EHTMLEditorView - Turn on the spell check if the inline spelling option is setTomas Popela2014-08-071-1/+3
| | | | | Otherwise the spell check is not forced when the message is loaded into the composer.
* Reduce the memory used by DOM variablesTomas Popela2014-08-071-1/+42
| | | | | Free some of the DOM variables when they are not needed, before they are automatically freed when the frame is destroyed
* Bug 733973 - Calling e_html_editor_view_get_text_html() changes editors contentTomas Popela2014-08-011-5/+7
| | | | | Do all the changes (remove the ids, classes, ... used internally by composer) on the BODY clone instead of doing them on real BODY.
* EHTMLEditorView - Fix the HTML structure after pasting the multiline content ↵Tomas Popela2014-08-011-22/+36
| | | | that was copied from composer
* EHTMLEditorSelection - Introduce e_html_editor_selection_is_collapsed and ↵Tomas Popela2014-07-311-2/+2
| | | | | | | use it where possible Before we were comparing the selection text to look if the selection is collapsed. Use webkit_dom_range_get_collapsed instead.
* EHTMLEditorView - Don't insert the new line character, when the empty line ↵Tomas Popela2014-07-311-3/+5
| | | | in the quoted content is on the end of it
* Bug 733954 - Enter doesn't delete selection with cited textTomas Popela2014-07-311-48/+83
| | | | | | | | The problem was that we were manipulating with the selection before the WebKit Editor call (and we hit again problems with selections in WebKit). So as a fix we reworked how the new line is inserted when the enter is pressed on empty line in quoted content (and completely avoid the WebKit Editor call there).
* Bug 733956 - Multiple quotations should be deleted by oneTomas Popela2014-07-301-34/+117
|
* EHTMLEditorView - Wrap just paragraphs that are not in the quoted contentTomas Popela2014-07-301-5/+6
| | | | | Paragraphs in the quoted content are already wrapped, so we were just waisting the time there.
* Bug 733953 - Citation marks incorrectly transformed on sendTomas Popela2014-07-301-0/+15
| | | | | | Insert the new line characters on empty lines in quoted content. Also insert the NL when the BR element that is used for wrapping is processed.
* Propagate settings from Prefences to the EHTMLEditorViewTomas Popela2014-07-291-29/+72
| | | | | | | Namely "Use the same fonts as other applications", "Standard Font", "Fixed Width Font", "Highlight quotations with color", "Automatically insert emoticon images" and "Check spelling while I type". Also remove unneded properties from EWebView.
* Bug 733846 - Empty lines removed on send (quoted text edited)Tomas Popela2014-07-291-14/+14
| | | | | Fix handling on new line characters after the citation end and in epmty blocks.
* Bug 733725 - Runtime critical when pasting test from the same composer instanceTomas Popela2014-07-291-21/+51
| | | | | Fix the warnings and also fix the wrong structure of the composer content when we were pasting multiline content into the composer.
* EHTMLEditorView - Avoid wrapping of the preformatted block when it is inside ↵Tomas Popela2014-07-291-1/+1
| | | | the quoted text
* EHTMLEditorView - Avoid forcing of the spell check when the body has no childrenTomas Popela2014-07-291-0/+3
|
* Bug 733825 - Busy loop/deadlock when changing paragraph style in quoted partTomas Popela2014-07-291-14/+21
| | | | | We have to insert the text node that marks the end of the block on right position.
* Bug 733010 - Cannot split quotation after an empty lineTomas Popela2014-07-221-24/+99
| | | | | | | We have to manually move the selection after the element with empty line. Afterwards WebKit creates the new line in the quoted content correctly, but it duplicates the node with empty line, so we have to remove it.
* EHTMLEditorView - Select the right node for processing after the new line ↵Tomas Popela2014-07-221-2/+5
| | | | was inserted into the quoted content
* Bug 733477 - Paste can select following textTomas Popela2014-07-221-0/+17
| | | | | | When pasting the content that was copied from the composer, WebKit restores the selection wrongly, thus is saved wrongly and we have to fix it.
* EHTMLEditorView - Don't put unnecessary new lines in the quoted content when ↵Tomas Popela2014-07-211-14/+31
| | | | generating the plain text version of the message
* EHTMLEditorView - When the link has non-breaking space in the prefix skip itTomas Popela2014-07-211-10/+13
|
* EHTMLEditorView - Don't put quote characters after the anchor when it is in ↵Tomas Popela2014-07-211-3/+7
| | | | the middle of the quoted text
* EHTMLEditorView - Wrap and quote just the first block after newly inserted ↵Tomas Popela2014-07-211-58/+74
| | | | | | | | | | line into the citation Previously, the whole blockquote that was created after the newly inserted line was wrapped and quoted. Now just the first block is processed. Also rewrap the content as when enter was pressed in the middle of the paragraph the line ends wouldn't match the character count for word wrap.
* EHTMLEditorView - When writing into the citation rewrap and requote just ↵Tomas Popela2014-07-211-1/+7
| | | | when it is necessary
* EHTMLEditorView - Speed up quoting of the block that was wrappedTomas Popela2014-07-211-29/+72
| | | | | Instead of going through the whole block just insert the quote characters on the beginning of each line (marker by BR element).
* EHTMLEditor - Fix e_html_editor_view_force_spell_check_for_current_paragraph ↵Tomas Popela2014-07-211-11/+29
| | | | | | | | and use it where possible Save the end node that we are using to mark the end of the paragraph into the right place to avoid the busy loop. Use e_html_editor_selection_save/restore to avoid lose of selection.
* EHTMLEditorView - Move the paragraph from citation into the body only when ↵Tomas Popela2014-07-211-0/+4
| | | | the backspace is pressed in the beginning of it
* Bug 733000 - Splitting quoted part changes clipboard contentTomas Popela2014-07-151-1/+3
| | | | | | | Temporarily remove the HTML input event listener from the body element to avoid unwanted modification of the clipboard content. In callback we are selecting all the content in composer (badically Ctrl + A) that's modifying the clipboard content.
* EHTMLEditorView - Don't leak dom-evo-draft outside evolutionYanko Kaneti2014-07-151-0/+1
|
* Bug 733140 - Backspace removes too much when editing quotationTomas Popela2014-07-151-1/+1
| | | | | We have to ask for the previous sibling of element that marks the selection start instead of the end.
* EHTMLEditorView - Replace the Tab characters in the text nodes just when ↵Tomas Popela2014-07-151-25/+27
| | | | generating the plain text version of the message
* EHTMLEditorView - Remove our attributes from blockquotes when generating the ↵Tomas Popela2014-07-151-0/+2
| | | | HTML version of the message
* EHTMLEditor - Fix indent/undent of the blockTomas Popela2014-07-151-1/+14
|
* Bug 732608 - Composer paste issuesTomas Popela2014-07-151-45/+289
| | | | | | We have to treat the pasting into the normal and the quoted content separately. We have to also correctly process the new lines on the beginning/end of the pasted content to avoid their lose.
* EHTMLEditorView - Don't lose the empty lines when converting HTML to plain textTomas Popela2014-07-151-2/+25
| | | | | Namely don't lose the new line on the beginning or on the end of processed content and also on the lines with zero width space character.
* EHTMLEditorView - Introduce functions to register/remove the HTML "input" ↵Tomas Popela2014-07-151-12/+46
| | | | | | | | event on body There are some cases that we want to avoid the call of the callback (performance reasons and the avoidance of the unwanted modifications of the composer content).
* EHTMLEditorView - Save selection instead of just caret position when forcing ↵Tomas Popela2014-07-151-32/+34
| | | | the spell check
* Bug 732891 - Crash under process_elements() at e-html-editor-view.c:5004Tomas Popela2014-07-101-9/+15
| | | | | Check if the buffer already contains some data before doing some work on it.
* EHTMLEditorView - Fix reply to messageTomas Popela2014-07-031-3/+1
| | | | | | After commit 8a004f3e we are finally sure that the text that is passed into e_html_editor_view_set_text_html function has always the HTML content, so don't try to treat it as plain text.
* When setting some content into the composer body we have to specify if it is ↵Tomas Popela2014-07-011-3/+12
| | | | | | | | | a HTML content Code paths for HTML content and plain text content are different. When we will try to load plain text content as a HTML content we will lose the new line characters. In the opposite case when HTML content is load as a plain text at least the whole structure is lost.
* EHTMLEditorView - Create new paragraph in body if body is empty and save ↵Tomas Popela2014-07-011-0/+8
| | | | caret there
* EHTMLEditorView - Fix quoting of the lines with anchorsTomas Popela2014-06-301-7/+4
| | | | | Remove bogus new line character insertion and don't quote the anchor element if it has caret/selection inside.
* EHTMLEditorView - Refactor the code that triggers the surround of links with ↵Tomas Popela2014-06-301-6/+9
| | | | | | anchor elements And add www to patterns.
* EHTMLEditorView - Correctly replace tabulators with spacesTomas Popela2014-06-301-18/+96
| | | | | Don't replace them with 8 spaces, but count the right amount of spaces to relace the tab character with.
* EHTMLEditorView - Fix clipboard paste into quoted contentTomas Popela2014-06-251-628/+665
| | | | | When pasting the text from clipboard into the quoted content in the composer paste it into it and not into the body.
* Bug 731508 - [webkit-composer] no option to paste as text (without formatting)Tomas Popela2014-06-251-0/+44
|
* EHTMLEditorView - Process the element only if it has childrenTomas Popela2014-06-251-11/+12
|
* EHTMLEditorView - Preserve empty lines when processing the text in convertorTomas Popela2014-06-251-3/+7
| | | | | Also insert the BR elements instead of the non-breaking space as a content to empty paragraphs to avoid unwanted character there.
* EHTMLEditorView - Preserve spaces and create anchors for the links in the ↵Tomas Popela2014-06-241-14/+36
| | | | text after the last BR element
* EHTMLEditor - Process text in convertor when pasting plain text from clipboardTomas Popela2014-06-231-0/+10
|
* EHTMLEditorView - Insert quote symbols before HTML element when it has no ↵Tomas Popela2014-06-231-0/+4
| | | | | | | previous sibling This fixes the situation when the paragraphs with just i.e. anchor were not properly quoted.
* EHTMLEditorView - Replace 2+ spaces with non-breaking spaces and create ↵Tomas Popela2014-06-231-8/+106
| | | | | | | | | | | | | anchors for links when processing data from convertor When converting text we want to preserve spaces from original text. For this we have to use the non-breaking spaces for it as two and more normal spaces is WebKit replacing with just one. But we want the text from convertor to be wrapped (non-breaking space is preventing from it) so we will replace 2+ spaces with non-breaking spaces and leave the space of length one as it is. Also when we are going through the text from the convertor we will surround the links with anchor element to make them clickable.
* EHTMLEditorView - Generate new line into plain text version even when ↵Tomas Popela2014-06-231-0/+3
| | | | paragraph has no children
* EHTMLEditorView - Improve the writing into quoted contentTomas Popela2014-06-191-77/+341
| | | | | | | | After this change when we start writing into quoted content it will automatically rewrap the paragraph and reinserts the quote marks if the block format is set to Normal. Also when the caret is in the beginning of the quoted line and BackSpace is pressed the quoted content is tooked out from the quote and inserted into body.
* EHTMLEditorView - When quoting the elements correctly skip the selection markersTomas Popela2014-06-191-3/+28
|
* Bug 731766 - [webkit-composer] Emoticon cannot be inserted at the end of the ↵Tomas Popela2014-06-191-40/+137
| | | | | | | | | | email Rework how the emoticons are inserted into composer. There were certain situations where the previous version failed from various reasons like wrongly saved caret position. Together with previous commits (preventing the selection markers to be saved into body) this change fixes the insertion of emoticons.
* EHTMLEditor - Make functions that remove quote and wrap elements publicTomas Popela2014-06-191-28/+3
| | | | Use them whenever it's possible and remove their duplicates from EHTMLEditorView.
* EHTMLEditorView - Activate inline image resize just when hovering over imageTomas Popela2014-06-191-8/+2
| | | | | When we will leave the CSS "display: inline-block" on inline images they will break the caret move with Home/End keys.
* Bug 731767 - [webkit-composer] Inline images not attached to the emailTomas Popela2014-06-171-36/+26
| | | | Change image's source value immediately after creating the Camel part for it.
* Bug 702703 - Be able to overwrite domain in Message IDsMilan Crha2014-06-171-5/+7
|
* EHTMLEditor: Move remove_node and remove_node_if_empty to EWebViewTomas Popela2014-06-161-121/+44
| | | | And use them in EHTMLEditorView if possible.
* EHTMLEditorView: Remove unused functionTomas Popela2014-06-161-21/+0
|
* EHTMLEditor - Fix block format change with selection in quoted contentTomas Popela2014-06-131-2/+3
|
* EHTMLEditorView - When changing from html to plain text mode adjust ↵Tomas Popela2014-06-131-8/+11
| | | | | | composer's content Apply width limits to paragraphs, remove images and replace smileys with its text version.
* Bug 731551 - [webkit-composer] Whitespace lost on message reply (plain text)Tomas Popela2014-06-131-1/+18
| | | | | | Replace whitespace with non breaking space ( ) to avoid its lost. Also when generating the plain text version of final message replace non breaking space with normal space.
* Check whether value really changed in callbacks of GSettings::changed signalMilan Crha2014-06-121-6/+37
| | | | | Just two more places, which are new after a merge of the webkit-composer branch changes.
* EHTMLEditor: Set right width to paragraphs that are quotedTomas Popela2014-06-111-2/+2
|
* EHTMLEditorView: Introduce is_return_key and use it where possibleTomas Popela2014-06-111-20/+14
|
* EHTMLEditorView: Rename quote_character class to -x-evo-quote-characterTomas Popela2014-06-111-16/+16
|
* EHTMLEditor: Fix various bugs in block in/undentTomas Popela2014-06-101-5/+1
| | | | | | Fix the wrong position of caret when in/undenting empty block and don't lose spell checked words when in/undenting. Also don't insert unnecessary empty lines into plain text version of message when processing indented block.
* EHTMLEditorView: Skip BR on the end of HTML that's parsed into paragraphsTomas Popela2014-06-101-1/+1
| | | | Do that to avoid unnecessary empty paragraph element.
* EHTMLEditorView: Replace Tab character with 8 spaces instead of 4Tomas Popela2014-06-101-3/+3
|
* Bug 540362: [webkit-composer] Use webkit for composerTomas Popela2014-06-091-0/+6303
Merge wip/webkit-composer branch into master.