bumpcore / editor.php Goto Github PK
View Code? Open in Web Editor NEWEditor.php is a package designed to assist in parsing and manipulating the output of Editor.js with ease.
Home Page: https://bumpcore.com/docs/editorphp
License: MIT License
Editor.php is a package designed to assist in parsing and manipulating the output of Editor.js with ease.
Home Page: https://bumpcore.com/docs/editorphp
License: MIT License
It is annoying to access $content->blocks->filter(...)
way. There's no much important doing so. I think we should able to do $content->filter(...)
. Other properties will work as same before: $content->version
or $content->time
Validation should be done beforehand, before everything is converted into associated objects. This will allow library to throw errors (if any) and prevent invalid data. Also new Laravel rule can be introduced.
Not everyone needs fake data; hence, it should be possible to avoid installing faker. If someone wants to use the fake data feature, they should install faker themselves.
Nothing special. Good old strip_tags
.
Blocks and providers too away from each other. We should able to access blocks from providers. It applies for cast too. We should able to access model from provider.
Current sanitizer is using DOMDocument with strip_tags
instead using symfony/html-sanitizer
would be more convinient since DOMDocument is not so good.
Feature that allows to resolving block type by class name. Which means we can rid of type
function.
Currently there's no standart for block types (names) in Editor.js, so automatically resolving types causes Editor.js to not recognizing blocks. To get over it, should add types to current supported blocks.
It's useless.
Pretty useless issue but it is more correct to use naming sanitize
. For now, let's just deprecate and in next major version we can remove it.
Macros for EditorPhp
class
Version in output seems to null sometimes. Should make it nullable on validation & types.
Currently we are using invokable class. We still preserve the invokable structure with additional get set methods. Currently block data takes second argument as value for setting new value. Instead invoking will only reflect get method and get method will have default value parameter.
Block is misleading
Native php templates for native php support.
Way to handling html import so migration from other editors would be much more easy. For reference we can imitate Editor.js's onPaste
event.
This is not convinient. Only pupose of this is accessing $model if EditorPhp initiated from cast. Just for this usage, it's not nice to pollute global scope.
Add new interface to determine can block generate fake data or not.
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.