editor-js / quote Goto Github PK
View Code? Open in Web Editor NEWQuote Tool for Editor.js 2.0
License: MIT License
Quote Tool for Editor.js 2.0
License: MIT License
Cant translate "Left alignment" and "Right alignment"
I have entered two paragraphs inside the quote separated by Enter key. This is the result:
{
"type": "quote",
"data": {
"text": "first paragraphsecond paragraph",
"caption": "caption",
"alignment": "left"
}
}
The best solution would be if Quote supported the nested elements, so there would be two paragraphs. If it is not possible from a technical point of view, then whitespace must not be consumed:
{
"type": "quote",
"data": {
"text": "first paragraph second paragraph",
"caption": "caption",
"alignment": "left"
}
}
It seems to be an issue that changes on the tune menu (i.e. align) don’t trigger the onChange listener of EditorJS. It was also posted here: codex-team/editor.js#757
For a valid quote block, can the text
, caption
, or alignment
properties under any circumstances (now or in the future) be null
or omitted? Or are they guaranteed to always be present and non-null
for this block to be valid?
Context: I'm a back-end .NET developer needing to parse Editor.js documents. The readme lists all of the aforementioned properties, but does not explicitly guarantee that they will always be present and non-null. Back-end deserialization/parsing in strongly typed languages would be easier with some guarantees about which properties can and can not be null/omitted. (Ideally, any such guarantees should be added to the readme to ensure they are formalized and kept in the future.)
I prefer to have quote tool without the caption as it consumes too much space. Would you add a configuration option to hide it?
Btw is this correct that the empty caption is generated?
{
"type": "quote",
"data": {
"text": "a",
"caption": "",
"alignment": "left"
}
}
The quote manual cdn refers to version 2.0.0
instead of latest
From readme:
It takes no effect while editing, but saved the «alignment» param.
Why this choice?
I think that this option should be improved or removed.
Try npm i --save-dev @types/editorjs__quote if it exists or add a new declaration (.d.ts) file containing
declare module '@editorjs/quote';`
This error is showing for all editorjs files except header and editorjs.
Can you publish other npm packages for typescript
hi
i want to use the quote tool without the alignment option. just a quote and maybe a caption.
is there a possibility to remove the alignment option?
thanks for the great work though!
Editor version: 2.7.20
Quote version: 2.1.3
There is no multi line (aka paragraph) support, so every line is concatenated to prev one even without space. But it is common thing to have a long quote, so it looks useful.
Use case:
line1
line2
line3
Expected behavior:
<p>line1</p>
<p>line2</p>
<p>line3</p>
Actual behavior:
line1line2line3
I see errors in the Chrome console.
I'm still not sure exactly when this happens. I did the same things in both the quote field and the caption field and got errors.
What I did:
But sometimes after the same steps, the error doesn't show. You can see it again if you press 'Enter' more than 2 times, enter a line, place the cursor on a blank line below the first line and press Backspace'
this is my config for quote: { class: Quote, inlineToolbar: true, shortcut: 'CMD+SHIFT+O', config: { captionPlaceholder: this.$t('Author name') // this.$t() - it's i18n translation function }}
The option to left or centre align the quote content shows however changing the alignment does not seem to do anything.
Reproduction: change the alignment.
Why it matters: without triggering change event, an auto saving functionality cannot detect and update change of the editor.
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.