Demo of ProseMirror WYSIWYG editor#8990
Closed
linonetwo wants to merge 89 commits into
Closed
Conversation
… text" This reverts commit 8a12498.
Deekseek is silly
DEBUG: render result below body only on browser DEBUG: render result below body DEBUG: fix build DEBUG: show render result as ViewTemplate
|
Confirmed: linonetwo has already signed the Contributor License Agreement (see contributing.md) |
❌ Deploy Preview for tiddlywiki-previews failed.
|
Contributor
Author
|
Crawl all prosemirror as dependencies using this JS, and download https://cdn.jsdelivr.net/npm/prosemirror-view@latest/style/prosemirror.css and https://cdn.jsdelivr.net/npm/prosemirror-menu@latest/style/menu.css manually. const fs = require('fs');
const path = require('path');
const dependencies = [
'prosemirror-state',
'prosemirror-view',
'prosemirror-model',
'prosemirror-schema-basic',
'prosemirror-schema-list',
'prosemirror-example-setup',
'orderedmap',
'prosemirror-transform',
'prosemirror-keymap',
'prosemirror-history',
'prosemirror-commands',
'prosemirror-dropcursor',
'prosemirror-gapcursor',
'prosemirror-menu',
'prosemirror-inputrules',
'w3c-keyname',
'crelt',
'rope-sequence',
];
async function getVersionAndDownload(dep) {
try {
const response = await fetch(`https://registry.npmjs.org/${dep}/latest`);
const data = await response.json();
const version = data.version;
// const url = `https://cdn.jsdelivr.net/npm/${dep}@${version}/dist/index.cjs`;
const url = `https://cdn.jsdelivr.net/npm/${dep}@${version}`;
console.log(`Downloading ${dep}@${version} from ${url}`);
const fileResponse = await fetch(url);
const reader = fileResponse.body.getReader();
const writer = fs.createWriteStream(path.resolve(__dirname, 'plugins/tiddlywiki/prosemirror/files', `${dep}.cjs`));
const stream = new ReadableStream({
async start(controller) {
while (true) {
const { done, value } = await reader.read();
if (done) break;
controller.enqueue(value);
}
controller.close();
}
});
const responseStream = stream.pipeTo(new WritableStream({
write(chunk) {
writer.write(chunk);
},
close() {
writer.end();
}
}));
await responseStream;
} catch (error) {
console.error(`Failed to download ${dep}:`, error);
}
}
async function main() {
for (const dep of dependencies) {
await getVersionAndDownload(dep);
}
console.log('All files downloaded and renamed successfully.');
}
main();place it on tiddlywiki repo's root as |
linonetwo
force-pushed
the
feat/prosemirror-wysiwyg-editor
branch
from
March 23, 2025 14:35
bb75500 to
b5d527d
Compare
linonetwo
marked this pull request as ready for review
March 23, 2025 14:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't know why, but I can't trigger netlify site rebuild. So I create a new PR to trigger it #8991