update packages and add valign
This commit is contained in:
13
scripts/reveal.js/plugin/notes/index.ts
Normal file
13
scripts/reveal.js/plugin/notes/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { RevealPlugin } from 'reveal.js';
|
||||
|
||||
// @ts-expect-error The runtime implementation remains in JS during the migration.
|
||||
import NotesImplementation from './plugin.js';
|
||||
|
||||
export interface NotesPlugin extends RevealPlugin {
|
||||
id: 'notes';
|
||||
open(): void;
|
||||
}
|
||||
|
||||
const Notes = NotesImplementation as () => NotesPlugin;
|
||||
|
||||
export default Notes;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import speakerViewHTML from './speaker-view.html'
|
||||
import speakerViewHTML from './speaker-view.html?raw'
|
||||
|
||||
import { marked } from 'marked';
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
notes.classList.remove( 'hidden' );
|
||||
notesValue.style.whiteSpace = data.whitespace;
|
||||
if( data.markdown ) {
|
||||
notesValue.innerHTML = marked( data.notes );
|
||||
notesValue.innerHTML = marked.parse( data.notes );
|
||||
}
|
||||
else {
|
||||
notesValue.innerHTML = data.notes;
|
||||
|
||||
23
scripts/reveal.js/plugin/notes/vite.config.ts
Normal file
23
scripts/reveal.js/plugin/notes/vite.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vite'
|
||||
import { appendExtension } from '../../vite.config.ts';
|
||||
import { createPluginDts } from '../vite-plugin-dts.ts';
|
||||
|
||||
// Once Vite supports multiple entries for plugins, this build can
|
||||
// be merged into the main vite.config.ts.
|
||||
// See https://github.com/vitejs/vite/pull/10609
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
lib: {
|
||||
formats: ['es', 'umd'],
|
||||
entry: {
|
||||
'plugin/notes': resolve(__dirname, 'index.ts'),
|
||||
},
|
||||
name: 'RevealNotes',
|
||||
fileName: appendExtension
|
||||
}
|
||||
},
|
||||
plugins: [createPluginDts('notes')],
|
||||
})
|
||||
Reference in New Issue
Block a user