- support for simplified Chinese
blockquote
plugin- select last added paragraph after action
- review icons
- smaller border radius in color picker
- prevent undefined error when detecting active element
- remove unexpected console.log
- bump Stencil
- if user paste a link as plain text then convert it to link automatically
- generate link with inline editor with the
target=_blank
- bump Stencil
- fix usage of the library in
vite
projects
e.g. import
in SvelteKit
:
<script lang="ts">
import {defineCustomElements} from '@papyrs/stylo/dist/loader';
defineCustomElements();
import {createEmptyElement} from '@papyrs/stylo';
</script>
<stylo-editor></stylo-editor>
- clean
console.log
in release
- japanese translation
- keyboard shortcuts: control or command-{B, I, U, K} for bold, italic, underline, insert hyperlink
- tab support for
ol
anddl
list as well (not justul
)
- sublist with "Tab" and "Shift+Tab"
- filter plugins with keyboards
e.g.
- Large title
- Small title
- Paragraph
Type "title" to only display the two first plugins. If one plugin only is filter, it gets the focus automatically.
- backtick after various tests on various keyboards types
- backtick support for us keyboards
- ordered list plugin
- filter updated paragraphs that have just been added for events
updateParagraphs
- workaround delay for empty placeholder
- clean meta and support phrasing content in past hijacker
- undo redo input text if
target
is the container
- bump dependencies
- set range to start to preserve leaf if target is editable
- add iOS and Android to
isMobile()
detection to consider such devices as Samsung Note as mobile devices too
- miscellaneous fix for tab hijacker
- merge default list of excluded attributes with custom configuration
- add
autocomplete
to the list of excluded attributes - support replace text selection on
enter
- support replace text selection on
paste
- improve paste hijacker to handle texts and elements differently
- japanese support (or at least try to fix it)
- hi-jack
parse
to clean html (removeclass
orstyle
) before being added to the content and prevent leaves (no text leaf has direct child of the content editable)
- clean
outerhtml
for undo-redo update too
- prevent "out of range" cursor move on undo-redo
- re-evaluate node depths when moving element from undo to redo queue
- color and link overlay close and glitchy toolbar display
- detect empty paragraph only for text paragraphs type
- detect empty paragraph only for placeholders type
- rename
stylo-empty
intostyle-placeholder-empty
- add class for second element in content editable only if there are no other paragraphs
- Create link was broken because the new listener was resetting the toolbar when in fact it was effectively active
- clean class
stylo-empty
in case it would be automatically copied by the browser
- update class
stylo-empty
also when there is no selected paragraph
- attach container listener in components
- detect first two paragraphs and set a class
stylo-empty
if empty - display "+" when code blocks or images are clicked
- attach all keydown listener to container
- close colors and link overlays
- set plugins scroll properties to
auto
- display button "+" when backspace or delete are used to remove the all content of a paragraph
- display button "+" on click in margin too
- stack previous element (not node) for undo-redo update
- incorrect undo-redo history on transform paragraph
REVERTED: Fix was invalid. Code was reverted and unpublished from npm.
previousSibling
reference not correctly set on transform paragraph which leads to an incorrect undo-redo history
- use and add an attribute
paragraph_id
(can be customized) to identify each paragraph - more Grammarly attributes to ignore
deleteParagraph
triggered sometimes even though no paragraph was deleted
Note:
I wish there was another solution but did not manage to properly identify which DOM elements are paragraphs or not when deletion happen. The Mutation Observer API and Dom API do not provide yet enough information or customization about it. That's why this new feature to detect deleted paragraphs more accurately.
- placeholder default color
rgba(55, 53, 47, 0.5)
- placeholder color style variable typo
--stylo-placeholder-color
not--style-placeholder-color
- delete backward empty paragraph
- right click - context menu support
- focusout only for iOS
- focusout for iOS devices
- debounce display of placeholder "Press "/" for plugins"
- position of all paragraphs set to
relative
and placeholder set toabsolute
- color picker height and alignment for Brave and Safari
- button color on iOS
- transform very first paragraph
- delete content backward
- placeholder position if browser adds a
<br/>
at begin of new paragraph
- use no height if invisible
- placeholder and add colors
- focus list of plugins on display
- miscellaneous selection and order fixes for undo-redo
- preserve cursor position on undo-redo tab
- inline
plugin
style to bypass.hydrated
class
- expose
i18n
types
- integration of Stylo inside of other webcomponents
- "enter" new paragraph if focus at begin of an existing paragraph
- range 0 is not a valid index (on window resize)
- bump Stencil
- custom
deleteContentBackward
in Firefox
- reset undo stack on destroy
- display placeholders "Press / for plugins"
- create preventive HTML element for text inputs only if targeted container does not accept text
- on
deleteContentBackward
reset range to cover the all target paragraphs (do not keep empty elements in dom)
deleteContentBackward
amend zeroWidthSpace and preventDefault
- "undo-redo" array of inputs because
characterdata
changes can actually be triggered in multiple paragraphs at once
- "DOMException: Failed to execute 'setStart' on 'Range': The offset 7 is larger than the node's length (1)."
- preserve styles when removing links (except Firefox)
- prevent creation of text nodes - i.e. leaves - when user is typing (direct children of the content editable should all be HTML elements)
<img/>
and<hr/>
do not need to be wrapped in a parentcontenteditable=false
anymore- redo user selection after "undo-redo"
- add link on Firefox
- Android v12 keyboard appearing and disappearing at the same time
- clone image on drag
- remove target paragraph on
deleteContentBackward
("avoid text to get title style when deleting and replacing it") - redo deleted paragraphs content
- on "shift + enter" if the context is extracted it should not clean the selection and then move the cursor to start
- revert hijack "enter" - browser does not the job as expected
- improve new lines within paragraphs ("shift + enter")
- extract content in case of new paragraphs initiated within a paragraphs ("not from end of line")
- do not hijack "enter" i.e. let the browser do the job and create new paragraphs
- add multiple add, remove and update paragraphs at once in the "undo-redo" stack
StyloToolbar
renamed toStyloConfigToolbar
to avoid naming collision
- bump stencil and jest v27
Hello World 👋