mikaelmayer / editor Goto Github PK
View Code? Open in Web Editor NEWEditor is an experimental HTTP/HTTPS server exposing webpages that can still be modified from the browser.
License: MIT License
Editor is an experimental HTTP/HTTPS server exposing webpages that can still be modified from the browser.
License: MIT License
Elements can be selected in two ways. Either by clicking directly, or moving the selection around. Currently, moving the selection around is done using this:
The icon on the left selects the parent, the next icon the previous sibling, the next icon the next sibling, and the last icon the first child.
The tag name of the selected element is below, and can be modified. The preview of the
A 2-state interface to display a node with its children. depending on the context, the selected node can be either display as a child (if it does not have any children) or as the parent (if it has children)
Something like this:
------------------------------------
| Parent Node tag/id/class |
|----------------------------------|
| child(n-1) [T] child(n) [T] child(n+1) |
|__________________________________|
If there is some non-space text between these children elements, there should be some selectable by a T icon indicating this between children that, if clicked, selects the trimmed text.
Animations are not needed for now.
When I type a long text, it sometimes removes the text I already typed.
According to HTML tests, a blockquote inside a paragraph automatically stops it
Therefore, the following example is not updated consistently (create a file test.leo
with the following content and open it with Editor)
<html><head></head><body>
<p>Hello world
<blockquote>this is a quote</blockquote>
and this is in the paragraph
</p>
</body></html>
After update, it will return:
<html><head></head><body>
<p>Hello world
</p><blockquote>this is a quote</blockquote>
and this is still in the paragraph
<p></p>
</body></html>
which can lead to unexpected results. Editor should either disable the integration of blockquote directly under
or parse it as the above.
Related to #7
Sometimes we add a plug-in which adds tons of boxes and attributes.
We would like to be able, from the Editor's interface to specify which elements should be saved and which should not, and which should always not.
Interface
Implementation
sns.objEnv.string.evaluate({a: domNodeToNative(...), b: (original one obtained after first execution of script or after a save)})("diff a b")
to obtain an expected list of differences (the diff language might change in the distant future).isghost = true
should be sufficient. For deleted nodes, we should figure out something else..editorignore
as following:
{
ghostNodes= [list of node selectors which should be ignored for this file]
ghostAttrs:= [pairs of node selectors and list of attributes that should be marked as ghost]
ignoredAttrs = [pairs of node selectors and list of attributes that should be marked as ignored]
}
When I paste something, by default it keeps the CSS style, which is usually not what a markdown writer wants
We need a way to specify some attributes that might exist from the beginning but whose changes should not be saved or trigger the save button to activate.
These attributes are different from ghosts attributes because ghost attributes are added, whereas ignored attributes already have a value.
Interface (local and global)
editor-ignore-attribute
contains a space-separated list of attribute names whose value is unchanged from the Editor's point of view.(typeof setIgnoreAttributeOnChanged !== "undefined" || []).push({node, attribute} => /*PREDICATE */)
Implementation
k
should be ignored, if not already done, we add to the node's properties the field .editorIgnore.attributes.k = mutationEvent.oldValue
. The old value can be recovered from .oldValue
from the mutation event.When I copy a title, it is inserted in source code as <h3>bla</h3>
instead of ### bla
.
Similar to the link edition, it would be useful to have a menu that can be activated by right-clicking any element, so that:
when some text is selected
Later:
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.