Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of unformatted text #197

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lang/de/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
$lang['js']['label:subscript'] = 'tief stellen';
$lang['js']['label:deleted'] = 'durchstreichen';
$lang['js']['label:monospaced'] = 'feste Zeichenbreite';
$lang['js']['label:unformatted'] = 'Wiki-Formatierung ignorieren';
$lang['js']['label:undo'] = 'rückgängig machen';
$lang['js']['label:redo'] = 'wiederherstellen';

Expand Down
1 change: 1 addition & 0 deletions lang/en/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
$lang['js']['label:subscript'] = 'subscript';
$lang['js']['label:deleted'] = 'strike through';
$lang['js']['label:monospaced'] = 'monospaced';
$lang['js']['label:unformatted'] = 'ignore wiki formatting';
$lang['js']['label:undo'] = 'undo';
$lang['js']['label:redo'] = 'redo';

Expand Down
1 change: 1 addition & 0 deletions script/plugins/Menu/MDI.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions script/plugins/Menu/MenuInitializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class MenuInitializer {
new MarkMenuItemDispatcher('subscript', 'format-subscript', lang['label:subscript']),
new MarkMenuItemDispatcher('deleted', 'format-strikethrough', lang['label:deleted']),
new MarkMenuItemDispatcher('code', 'console-line', lang['label:monospaced']),
new MarkMenuItemDispatcher('unformatted', 'translate-off', lang['label:unformatted']),
]),
LinkMenuItemDispatcher,
ImageMenuItemDispatcher,
Expand Down
4 changes: 1 addition & 3 deletions script/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,7 @@ export default function getSpec() {
});

marks = marks.addToEnd('unformatted', {
parseDOM: [
{ tag: 'span', class: 'unformatted' },
],
excludes: '_',
toDOM() {
return ['span', { class: 'unformatted' }];
},
Expand Down
7 changes: 6 additions & 1 deletion style.less
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
}
}

span.unformatted {
padding: 0.2rem;
border: 1px dotted @ini_border;
}

.footnote {
&::after {
content: counter(prosemirror-footnote) ')';
Expand Down Expand Up @@ -97,7 +102,7 @@
}

div.dropdown_content {
width: 10rem;
min-width: 12rem;

img {
max-width: 1.5rem;
Expand Down