wordpress-mobile / azteceditor-ios Goto Github PK
View Code? Open in Web Editor NEWA reusable native iOS visual HTML text editor component.
License: Mozilla Public License 2.0
A reusable native iOS visual HTML text editor component.
License: Mozilla Public License 2.0
Text editing right now works partially.
What works:
It works perfectly in HTML mode and reflects the changes when switching to visual mode.
What doesn't work:
When editing in visual mode the changes are not reflected after switching to HTML mode.
Enable the lists button and add the logic to edit lists in the editor. List behavior is as follows:
Should create a new list, and turn the whole paragraph into a list item.
Should turn the item into a plain paragraph. Following list items should be renumbered.
Should change the type of the entire list, and update the list markers appropriately.
Should add the non-list text to the list and update the item numbering.
Should create a new list from the selected paragraph, but do not make changes to the other list.
Should Remove the list.
Should change the type of the list and update its numbering, but make no changes to the non list paragraph.
The caret position should be maintained when switching modes.
Since we have pretty good mechanisms for range matching between HTML and visual mode, we could also use this to match a position.
Title has it.
We need to implement the logic to update the DOM data whenever an edit takes place. The best way to start is by focusing on the full editing logic for a singly style, in order to tackle the problem atomically.
We should expect this code to be reusable for other styles.
Scenarios to handle:
Title has it. Formatting should work for the following types:
How to reproduce:
There's a problem in when we're invalidating the layout when adding images. This causes the app to sometimes show errors in the log, and sometimes crash.
How to reproduce:
Repeat the exact steps from this video.
If you have html content with tags that are self closing/empty tags like this:
<img src="a.jpg" />
<br/>
they get converted back to
<img src="a.jpg">
<br>
and even if you have something like this:
<img src="a.jpg">Imagem</img>
It gets converted to
<img src="a.jpg">
HTML tags can come with extra spacing and invisible characters that should be trimmed (in most cases).
For example:
<html><body>
hello
</body></html>
Should be rendered as hello
.
Implements style editing for Italic. The result should affect the HTML output.
Scenarios to handle:
Implements style editing for strikethrough. The result should affect the HTML output.
Scenarios to handle:
We want to have shortcode parity with the existing WPiOS HTML editor.
This ticket is open for discussion, I'll create a new one once we can agree to a more precise specification.
Here's the list of shortcodes that WordPress.com supports.
There's a very weird bug that's causing the Visual Editor default font to change, if you select a styled text-range and switch to HTML and back to Visual.
Video showing the issue here.
Add copy / paste support.
Implements style editing for underline. The result should affect the HTML output.
Scenarios to handle:
Convert HTML paragraphs to double line breaks in HTML mode so that the user doesn't need to edit <p>
tags.
The inverse conversion should also take care of generating paragraphs wherever it detects double line breaks.
This should be an optional conversion setting, since other editors could prefer to use regular paragraph elements.
Add media support in WPiOS. It doesn't really need to access any services at all. It only needs to emulate uploading and all media interactions just like the old editor did (we can use it for reference).
Tasks:
There's a partially-working undo support in Aztec, however the DOM structure is not properly re-created when performing more complex undo / redo operations.
Make sure full support is added.
Feature flag Aztec in WPiOS so that it works as a hidden feature.
I'm adding some tentative requirements, but feel free to re-engineer.
Requirements:
Implement copy / paste support for blockquotes.
Typing between two non-editable elements in visual mode is not creating the necessary text node in-between.
There's an example video here.
When editing styled text, we're getting duplicated tags.
Video here.
This is the master thread for all things GUI in WPiOS.
If you try to start editing in the demo app without loading the sample content and loading an empty string instead, the editor has several issues breaking it.
You can test this in branch issue/53-editing-blank-content
If you have html like this:
<!-- This is a comment --!>
It gets converted to
<comment></comment>
Add link editing to the Demo App.
We should add a fake-upload demo in the example app. It'd allow the user to test cancelling uploads, and it'd allow us to make sure we have everything in place to offer support for real uploads.
Implement copy / paste support for links.
Master issue for the HTML export component.
When trying to edit in visual mode between images, the app crashes.
See this video showing the crash.
Props to @SergioEstevao for finding this one.
Set up BuddyBuild so we can distribute the Example application to testers.
/fyi @sendhil
Implement copy / paste support for lists.
Add media support in the demo app. It doesn't really need to access any services at all. It only needs to emulate uploading and all media interactions just like the old editor did (we can use it for reference).
Tasks:
Wire the exporter to the demo app, so we can test exporting our changes to a post.
When "saving" a post, a new VC should be pushed, showing a text view with the post's raw HTML. There's no need to make it editable.
This can also be used to implement the HTML mode.
When adding a tag to the DOM, we need to reduce tag fragmentation to the minimum. This implies that nodes need to be added in a "smart" way.
The following is an example showing the selected text wrapped by [
and ]
.
<em>Hello there<u>[ man!</u> How are you?]</em>
After applying bold, the non-smart result would be:
<em>Hello there<u><b> man!</b></u><b> How are you?</b></em>
The smart result we must achieve is:
<em>Hello there<b><u> man!</u> How are you?</b></em>
Here's a list of some possible improvements for this method:
TextNode
s.TextNode
.ElementNode
s at the bottom level. Evaluate if we need to include them too in the results of this method.This method can serve as inspiration on how to store the return value.
Title has it. This is scoped for the Demo App only.
After editing image attributes on the editor, any custom class attributes on the img node will be removed.
Master issue for the HTML import component.
When in the image-attributes VC: there should be an option to cancel editing image attributes, that closes the VC without it affecting the HTML.
The editor should provide the necessary tools to cope with the result of image uploads.
The upload will be handled by the parent application, but the editor should provide all the necessary interfaces to replace local images with remote ones when necessary.
Add an app setting (available only in DEBUG builds) to enable Aztec in WPiOS.
Implement copy / paste support for images.
I'm seeing performance issues when copy-pasting the full range of text.
Evaluate and improve Aztec's performance.
Look for alternatives to add Proofread Writing to Aztec.
References:
This is the master thread for all things GUI in the Demo App.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.